Copy < script >
$ ( "#CHECKOUT_FORM" ) .submit ( function (event) {
var url = web_media_template .buildUrlMediaJson (
"product" ,
"purchase" ,
[ "div_asm_qct_test_json_1" ] , {
items : [
{
type : "product" ,
id : "12345" ,
name : "The Product Title 1" ,
line_item_quantity : 1 ,
line_item_sale_price : 10000 ,
line_item_discount_amount : 1000 ,
line_item_rounded_amount : 9000 ,
sale_price : 10000 ,
quantity : 1
} ,
{
type : "product" ,
id : "12346" ,
name : "The Product Title 2" ,
line_item_quantity : 2 ,
line_item_sale_price : 10000 ,
line_item_discount_amount : 0 ,
line_item_rounded_amount : 10000 ,
sale_price : 10000 ,
quantity : 2
}
] ,
dims : {
customers : {
customer_id : "36e4706566c276df8b66a39dfc06bdee" ,
phone : "2b16c9631bfdd87c9c498b6346d95cb3546f48e0e713c84182d1f1a6d75b143b" ,
gg_phone : "fd38d3edfeb70b7fb09e74e269d27f6fb24d5c75799b7e3d85604a5965a6623f" ,
fb_phone : "fd38d3edfeb70b7fb09e74e269d27f6fb24d5c75799b7e3d85604a5965a6623f" ,
email : "26c009c4a46c83c751fc1f71bbc6cb81062c360761e4b60c41dce7880ee61f13" ,
name : "Barack obama" ,
ward : "Phuong 22" ,
district : "Binh Thanh" ,
address : "92 Nguyen Huu Canh"
} ,
purchase : {
id : "123456" ,
name : "#123456" ,
customer_id : "36e4706566c276df8b66a39dfc06bdee" ,
customer_name : "Barack obama" ,
order_status : "Paid" ,
revenue : 1500 ,
delivery_method : "Giao hàng trong 48 giờ: 0 đ" ,
payment_method : "COD" ,
discount_amount : 100 ,
voucher_code : "VIP10" ,
date_created : "2020-12-11 15:30:20" ,
}
} ,
extra : {
customer_id : "36e4706566c276df8b66a39dfc06bdee" ,
customer_name : "Barack obama" ,
delivery_method : "Giao hàng trong 48 giờ: 0 đ" ,
payment_method : "COD" ,
discount_amount : 100 ,
voucher_code : "VIP10" ,
identify_time : "2020-12-11 15:30:20" ,
identify_event : "Purchase"
}
}
);
});
</ script >