Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Send to ecommerce360
- $item_array = array();
- foreach($transaction->transaction_details->transaction_detail as $transaction_detail) {
- $item_array[] = array(
- "product_id" => (string)$transaction_detail->product_code,
- "product_name" => (string)$transaction_detail->product_name,
- "category_id" => 1,
- "category_name" => "Products",
- "qty" => (double)$transaction_detail->product_quantity,
- "cost" => (double)$transaction_detail->product_price,
- );
- }
- $order = array(
- "id" => $transaction_id,
- "email_id" => $custom_fields['mc_eid'],
- "email" => $customer_email,
- "total" => (double)$transaction->order_total,
- "order_date" => $transaction_date,
- "shipping" => (double)$transaction->shipping_total,
- "tax" => (double)$transaction->tax_total,
- "store_id" => (string)$transaction->store_id,
- "store_name" => "YOUR STORE NAME",
- "campaign_id" => $custom_fields['mc_cid'],
- "items" => $item_array,
- );
- $retval = $api->ecommOrderAdd($order);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement