function MCAPI::campaignEcommAddOrder in Mailchimp 6.2
Same name and namespace in other branches
- 5.2 MCAPI.class.php \MCAPI::campaignEcommAddOrder()
- 5 MCAPI.class.php \MCAPI::campaignEcommAddOrder()
- 6 MCAPI.class.php \MCAPI::campaignEcommAddOrder()
- 7 MCAPI.class.php \MCAPI::campaignEcommAddOrder()
Attach Ecommerce Order Information to a Campaign. This will generall be used by ecommerce package plugins <a href="/plugins/ecomm360.phtml">that we provide</a> or by 3rd part system developers.
Related
Parameters
array $order an array of information pertaining to the order that has completed. Use the following keys:: string id the Order Id string campaign_id the Campaign Id to track this order with (see the "mc_cid" query string variable a campaign passes) string email_id the Email Id of the subscriber we should attach this order to (see the "mc_eid" query string variable a campaign passes) double total The Order Total (ie, the full amount the customer ends up paying) string order_date optional the date of the order - if this is not provided, we will default the date to now double shipping optional the total paid for Shipping Fees double tax optional the total tax paid string store_id a unique id for the store sending the order in (20 character max) string store_name optional a "nice" name for the store - typically the base web address (ie, "store.mailchimp.com"). We will automatically update this if it changes (based on store_id) string plugin_id the MailChimp assigned Plugin Id. Get yours by <a href="/api/register.php">registering here</a> array items the individual line items for an order using these keys: <div style="padding-left:30px"><table><tr><td colspan=*> integer line_num optional the line number of the item on the order. We will generate these if they are not passed integer product_id the store's internal Id for the product. Lines that do no contain this will be skipped string product_name the product name for the product_id associated with this item. We will auto update these as they change (based on product_id) integer category_id the store's internal Id for the (main) category associated with this product. Our testing has found this to be a "best guess" scenario string category_name the category name for the category_id this product is in. Our testing has found this to be a "best guess" scenario. Our plugins walk the category heirarchy up and send "Root - SubCat1 - SubCat4", etc. double qty the quantity of the item ordered double cost the cost of a single item (ie, not the extended cost of the line) </td></tr></table></div>
Return value
bool true if the data is saved, otherwise an error is thrown.
File
- ./
MCAPI.class.php, line 981
Class
Code
function campaignEcommAddOrder($order) {
$params = array();
$params["order"] = $order;
return $this
->callServer("campaignEcommAddOrder", $params);
}