\StockControlPing_IncomingUpdate
Example of POST: function TestPost() {
$baseURL = Director::absoluteBaseURL();
// 1) My Personal Data
$className = 'StockControlPing_IncomingUpdate';
$fields = array(
'AllowPurchase' => 0,
'InternalItemID' => "xxxx",
//below are optional (if you include ID then you leave out InternalItemID)k6
//'BuyableClassName' => 'Product',
//'BuyableID' => 123,
);
// 2) The Query
$url = "{$baseURL}/api/ecommerce/v1/{$className}.xml";
$body = $fields;
$c = curl_init($url);
curl_setopt($c, CURLOPT_POST, true);
curl_setopt($c, CURLOPT_POSTFIELDS, $body);
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
$page = curl_exec($c);
curl_close($c);
// 3) The XML Result
return $page;
}
Synopsis
class StockControlPing_IncomingUpdate
extends DataObject
{
- // members
- private static array $api_access = ;
- private static array $db = ;
- private static array $indexes = ;
- private static array $default_sort = ;
- private static string $singular_name = "External Update to Product Availability";
- private static string $plural_name = "External Updates to Product Availability";
- // methods
- public void i18n_singular_name()
- public void i18n_plural_name()
- public void canView()
- public void canCreate()
- public void canEdit()
- public void canDelete()
- protected void canDoAnything()
- public void onAfterWrite()
Hierarchy
Extends
- DataObject
Tasks
Line | Task |
---|---|
271 | move to findBuyable in Core Ecommerce Code! |
Members
private
- $api_access
- $db
- $default_sort
- $indexes
- $plural_name
- $singular_name