Overview
Events are triggered by some Shoplazza resources when certain actions are completed, such as viewing the product details page, searching for products, etc.
dj.viewContent
The dj.viewContent
can be triggered by the following API request:
document.addEventListener('dj.viewContent', (e) => {
const data = e.detail;
});
{
"product": {
"id": "76f869df-8a64-41be-9aa9-ae1a4f411d13",
"title": "Cargo Culotte",
"vendor": "Nero",
"vendor_url": "",
"has_only_default_variant": false,
"requires_shipping": true,
"taxable": false,
"inventory_policy": "deny",
"inventory_quantity": 540,
"inventory_tracking": true,
"published": true,
"handle": "cargo-culotte",
"spu": "",
"note": "",
"need_variant_image": false,
"fake_sales": 0,
"display_fake_sales": false,
"independent_seo": false,
"updated_at": "2023-07-04T08:24:43Z",
"created_at": "2022-02-10T02:26:24Z",
"mixed_wholesale": false,
"product_type": "",
"tags": "Color_DarkGray,Color_Steelblue,flash_sale_2020-1-30,Location_Delaware,Price_$200-$300",
"available": true,
"price_min": "308.75",
"price": "308.75",
"price_max": "325",
"compare_at_price_min": "0",
"compare_at_price": "0",
"compare_at_price_max": "325",
"retail_price_min": "0",
"retail_price_max": "325",
"url": "/products/cargo-culotte",
"published_at": "2022-02-10T02:26:24Z",
"sales": 0,
"image": {
"src": "//cdn.shoplazza.com/166bd51166b36de0c799484765d9bd44.jpeg",
"path": "166bd51166b36de0c799484765d9bd44.jpeg",
"width": 1280,
"height": 1710,
"alt": "Cargo Culotte Nero Spring",
"aspect_ratio": 0.7485380116959064
},
"options": [
{
"id": "1b4f1215-9584-4a03-993e-09eb47753555",
"name": "Color",
"position": 1,
"values": [
"CadetBlue"
]
},
{
"id": "e971016b-9325-47d2-b2c2-e8b2f0c46f35",
"name": "Size",
"position": 2,
"values": [
"23",
"24",
"25",
"26",
"27",
"28",
"29",
"30"
]
}
],
"variants": [
{
"id": "e5af71c4-6d59-46f4-858a-4e4b89775ee7",
"product_id": "76f869df-8a64-41be-9aa9-ae1a4f411d13",
"title": "CadetBlue-23",
"weight_unit": "kg",
"inventory_quantity": 90,
"sku": "W29472834-1",
"barcode": "",
"position": 1,
"option1": "CadetBlue",
"option2": "23",
"option3": "",
"note": "",
"image": null,
"wholesale_price": [
{
"price": 308.75,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "325",
"price": "308.75",
"retail_price": "325",
"available": true,
"url": "/products/cargo-culotte?variant=e5af71c4-6d59-46f4-858a-4e4b89775ee7",
"available_quantity": 90,
"options": [
{
"name": "Color",
"value": "CadetBlue"
},
{
"name": "Size",
"value": "23"
}
],
"off_ratio": "5",
"flashsale_info": {
"variant_id": "e5af71c4-6d59-46f4-858a-4e4b89775ee7",
"product_id": "",
"quantity": 0,
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"limit_time": -1,
"limit_buy": -1,
"user_limit_buy": -1,
"discount_sales": 0,
"discount_sales_rate": "0",
"discount_stock": 90,
"ends_at": -1,
"starts_at": 1682405275,
"allow_oversold": "uncheck",
"allocation_method": "none",
"price": "308.75",
"compare_at_price": "325",
"discount_price": "308.75",
"customary_saved_price": "16.25",
"customary_off_ratio": "5",
"discount_saved_price": "16.25",
"discount_off_ratio": "5",
"use_before_price": false,
"before_price": "0",
"title": "",
"trunk_price": "0",
"total_price": "0",
"inventory_tracking": false,
"inventory_policy": "",
"inventory_quantity": 0,
"discount_applications": null,
"properties": ""
},
"sales": 0
},
{
"id": "e6965226-b2bf-4df5-8986-f067b99e4a88",
"product_id": "76f869df-8a64-41be-9aa9-ae1a4f411d13",
"title": "CadetBlue-24",
"weight_unit": "kg",
"inventory_quantity": 90,
"sku": "W29472834-2",
"barcode": "",
"position": 2,
"option1": "CadetBlue",
"option2": "24",
"option3": "",
"note": "",
"image": null,
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": true,
"url": "/products/cargo-culotte?variant=e6965226-b2bf-4df5-8986-f067b99e4a88",
"available_quantity": 90,
"options": [
{
"name": "Color",
"value": "CadetBlue"
},
{
"name": "Size",
"value": "24"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 0
},
{
"id": "ca0bb22e-9bd3-4023-8c80-6e1ef7fc7257",
"product_id": "76f869df-8a64-41be-9aa9-ae1a4f411d13",
"title": "CadetBlue-25",
"weight_unit": "kg",
"inventory_quantity": 90,
"sku": "W29472834-3",
"barcode": "",
"position": 3,
"option1": "CadetBlue",
"option2": "25",
"option3": "",
"note": "",
"image": null,
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": true,
"url": "/products/cargo-culotte?variant=ca0bb22e-9bd3-4023-8c80-6e1ef7fc7257",
"available_quantity": 90,
"options": [
{
"name": "Color",
"value": "CadetBlue"
},
{
"name": "Size",
"value": "25"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 0
},
{
"id": "57e7c92c-bb4d-4563-97cb-c8d0b0bddada",
"product_id": "76f869df-8a64-41be-9aa9-ae1a4f411d13",
"title": "CadetBlue-26",
"weight_unit": "kg",
"inventory_quantity": 90,
"sku": "W29472834-4",
"barcode": "",
"position": 4,
"option1": "CadetBlue",
"option2": "26",
"option3": "",
"note": "",
"image": null,
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": true,
"url": "/products/cargo-culotte?variant=57e7c92c-bb4d-4563-97cb-c8d0b0bddada",
"available_quantity": 90,
"options": [
{
"name": "Color",
"value": "CadetBlue"
},
{
"name": "Size",
"value": "26"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 0
},
{
"id": "56508e79-9902-4427-932d-464dba5d111d",
"product_id": "76f869df-8a64-41be-9aa9-ae1a4f411d13",
"title": "CadetBlue-27",
"weight_unit": "kg",
"inventory_quantity": 90,
"sku": "W29472834-5",
"barcode": "",
"position": 5,
"option1": "CadetBlue",
"option2": "27",
"option3": "",
"note": "",
"image": null,
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": true,
"url": "/products/cargo-culotte?variant=56508e79-9902-4427-932d-464dba5d111d",
"available_quantity": 90,
"options": [
{
"name": "Color",
"value": "CadetBlue"
},
{
"name": "Size",
"value": "27"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 0
},
{
"id": "8001bcd0-e7c2-4d41-8653-d58035a0dab5",
"product_id": "76f869df-8a64-41be-9aa9-ae1a4f411d13",
"title": "CadetBlue-28",
"weight_unit": "kg",
"inventory_quantity": 90,
"sku": "W29472834-6",
"barcode": "",
"position": 6,
"option1": "CadetBlue",
"option2": "28",
"option3": "",
"note": "",
"image": null,
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": true,
"url": "/products/cargo-culotte?variant=8001bcd0-e7c2-4d41-8653-d58035a0dab5",
"available_quantity": 90,
"options": [
{
"name": "Color",
"value": "CadetBlue"
},
{
"name": "Size",
"value": "28"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 0
},
{
"id": "796eed71-b66e-4a1f-a512-29884f7a9b7c",
"product_id": "76f869df-8a64-41be-9aa9-ae1a4f411d13",
"title": "CadetBlue-29",
"weight_unit": "kg",
"inventory_quantity": 0,
"sku": "W29472834-7",
"barcode": "",
"position": 7,
"option1": "CadetBlue",
"option2": "29",
"option3": "",
"note": "",
"image": null,
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": false,
"url": "/products/cargo-culotte?variant=796eed71-b66e-4a1f-a512-29884f7a9b7c",
"available_quantity": 0,
"options": [
{
"name": "Color",
"value": "CadetBlue"
},
{
"name": "Size",
"value": "29"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 0
},
{
"id": "0c35c3f1-36f3-4ad3-95ff-ca2049a993aa",
"product_id": "76f869df-8a64-41be-9aa9-ae1a4f411d13",
"title": "CadetBlue-30",
"weight_unit": "kg",
"inventory_quantity": 0,
"sku": "W29472834-8",
"barcode": "",
"position": 8,
"option1": "CadetBlue",
"option2": "30",
"option3": "",
"note": "",
"image": null,
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": false,
"url": "/products/cargo-culotte?variant=0c35c3f1-36f3-4ad3-95ff-ca2049a993aa",
"available_quantity": 0,
"options": [
{
"name": "Color",
"value": "CadetBlue"
},
{
"name": "Size",
"value": "30"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 0
}
],
"images": [
{
"src": "//cdn.shoplazza.com/166bd51166b36de0c799484765d9bd44.jpeg",
"path": "166bd51166b36de0c799484765d9bd44.jpeg",
"width": 1280,
"height": 1710,
"alt": "Cargo Culotte Nero Spring",
"aspect_ratio": 0.7485380116959064
},
{
"src": "//cdn.shoplazza.com/2508e4ceb27955cf50d8e6695530119e.jpeg",
"path": "2508e4ceb27955cf50d8e6695530119e.jpeg",
"width": 1280,
"height": 1710,
"alt": "Cargo Culotte Nero Spring",
"aspect_ratio": 0.7485380116959064
},
{
"src": "//cdn.shoplazza.com/fb40651b361088bb7da47a865d334e27.jpeg",
"path": "fb40651b361088bb7da47a865d334e27.jpeg",
"width": 1280,
"height": 1710,
"alt": "Cargo Culotte Nero Spring",
"aspect_ratio": 0.7485380116959064
},
{
"src": "//cdn.shoplazza.com/04ea8ebcc4105abc63fd8df00d46afc2.jpeg",
"path": "04ea8ebcc4105abc63fd8df00d46afc2.jpeg",
"width": 1280,
"height": 1710,
"alt": "Cargo Culotte Nero Spring",
"aspect_ratio": 0.7485380116959064
},
{
"src": "//cdn.shoplazza.com/327ca7fc528192adce970079d2e89660.jpeg",
"path": "327ca7fc528192adce970079d2e89660.jpeg",
"width": 1280,
"height": 1710,
"alt": "Cargo Culotte Nero Spring",
"aspect_ratio": 0.7485380116959064
}
],
"redirect": false,
"redirect_url": "",
"retail_price": "0",
"price_varies": false,
"off_ratio": "5",
"flashsale_info": {
"variant_id": "e5af71c4-6d59-46f4-858a-4e4b89775ee7",
"product_id": "",
"quantity": 0,
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"limit_time": -1,
"limit_buy": -1,
"user_limit_buy": -1,
"discount_sales": 0,
"discount_sales_rate": "0",
"discount_stock": 90,
"ends_at": -1,
"starts_at": 1682405275,
"allow_oversold": "uncheck",
"allocation_method": "none",
"price": "308.75",
"compare_at_price": "325",
"discount_price": "308.75",
"customary_saved_price": "16.25",
"customary_off_ratio": "5",
"discount_saved_price": "16.25",
"discount_off_ratio": "5",
"use_before_price": false,
"before_price": "0",
"title": "",
"trunk_price": "0",
"total_price": "0",
"inventory_tracking": false,
"inventory_policy": "",
"inventory_quantity": 0,
"discount_applications": null,
"properties": ""
}
},
"selected": {
"id": "e5af71c4-6d59-46f4-858a-4e4b89775ee7",
"product_id": "76f869df-8a64-41be-9aa9-ae1a4f411d13",
"title": "CadetBlue-23",
"weight_unit": "kg",
"inventory_quantity": 90,
"sku": "W29472834-1",
"barcode": "",
"position": 1,
"option1": "CadetBlue",
"option2": "23",
"option3": "",
"note": "",
"image": null,
"wholesale_price": [
{
"price": 308.75,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "325",
"price": "308.75",
"retail_price": "325",
"available": true,
"url": "/products/cargo-culotte?variant=e5af71c4-6d59-46f4-858a-4e4b89775ee7",
"available_quantity": 90,
"options": [
{
"name": "Color",
"value": "CadetBlue"
},
{
"name": "Size",
"value": "23"
}
],
"off_ratio": "5",
"flashsale_info": {
"variant_id": "e5af71c4-6d59-46f4-858a-4e4b89775ee7",
"product_id": "",
"quantity": 0,
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"limit_time": -1,
"limit_buy": -1,
"user_limit_buy": -1,
"discount_sales": 0,
"discount_sales_rate": "0",
"discount_stock": 90,
"ends_at": -1,
"starts_at": 1682405275,
"allow_oversold": "uncheck",
"allocation_method": "none",
"price": "308.75",
"compare_at_price": "325",
"discount_price": "308.75",
"customary_saved_price": "16.25",
"customary_off_ratio": "5",
"discount_saved_price": "16.25",
"discount_off_ratio": "5",
"use_before_price": false,
"before_price": "0",
"title": "",
"trunk_price": "0",
"total_price": "0",
"inventory_tracking": false,
"inventory_policy": "",
"inventory_quantity": 0,
"discount_applications": null,
"properties": ""
},
"sales": 0
},
"qty": 1,
"source": "pageview"
}
dj.productSearch
The dj.productSearch
can be triggered by the following API request:
document.addEventListener('dj.productSearch', (e) => {
const data = e.detail;
});
{
"keyWord": "sn",
"total": 6,
"hasResult": true,
"source": "api"
}
dj.addToCart
The dj.addToCart
can be triggered by the following API request:
- The /{locale}/api/cart
- The /{locale}/api/cart/batch
- The
/api/checkout/order
document.addEventListener('dj.addToCart', (e) => {
const data = e.detail;
});
{
"product_id": "8ef5a239-9e7a-4822-a8ca-f9dcb15d594a",
"variant_id": "dc775bbe-7435-49de-9aec-af2e8fca2f2c",
"variant": {
"option1": "Black",
"option2": "S",
"option3": ""
},
"name": "Snake Print Tee",
"item_price": "115.00",
"quantity": 1,
"number": 1,
"properties": null,
"type": ""
}
dj.cartChange
The dj.cartChange
can be triggered by the following API request:
- The /{locale}/api/cart
- The /{locale}/api/cart/batch
- The /{locale}/api/cart/{variant_id}
PATCH /{locale}/api/cart{variant_id}
DELETE /{locale}/api/cart/{variant_id}
Note
The
line_items
of thee.detail
isn't necessarily available.
document.addEventListener('dj.cartChange', (e) => {
const data = e.detail;
});
{
"line_items": [
{
"id": "299752_1825cbb82902c53fdc4e12283829e832",
"properties": "",
"note": "",
"variant_id": "3c4f8ac5-3e47-498a-9d3f-44db49f01f23",
"product_id": "f4138308-ac57-46d5-bba7-ac60b2c6aefa",
"quantity": "1",
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"limit_time": -1,
"limit_buy": 0,
"user_limit_buy": -1,
"discount_sales": 1,
"discount_sales_rate": "50",
"discount_stock": 1,
"ends_at": -1,
"starts_at": 1682405275,
"allow_oversold": "uncheck",
"allocation_method": "none",
"price": "273.6",
"compare_at_price": "288",
"discount_price": "273.6",
"customary_saved_price": "14.4",
"customary_off_ratio": 5,
"discount_saved_price": "14.4",
"discount_off_ratio": "5",
"use_before_price": false,
"before_price": "228",
"title": "促销",
"trunk_price": "0",
"total_price": "0",
"inventory_tracking": true,
"inventory_policy": "deny",
"inventory_quantity": 1,
"cart_id": "299752",
"store_id": "7126",
"user_id": "0181ba0b-1ca4-44b9-be0d-f6052e9f0fc8",
"user_sign": "",
"created_at": "2023-07-09 10:34:04",
"updated_at": "2023-07-09 10:34:04",
"custom": false,
"parts_price": null,
"variant_title": "",
"product_title": "Huntley Short Sleeve Tee",
"product_handle": "huntley-short-sleeve-tee",
"product_tags": [
"Color_Black",
"Color_DarkGray",
"Color_Lightslategray",
"Location_Colorado",
"Price_$100-$200"
],
"published": true,
"published_at": "2022-02-10T02:30:51Z",
"product_url": "/products/huntley-short-sleeve-tee",
"available": true,
"available_quantity": 1,
"cost_price": "128.00",
"weight": "0.00",
"weight_unit": "kg",
"sku": "SKU0007",
"spu": "",
"vendor": "Nero",
"vendor_url": "",
"taxable": false,
"requires_shipping": true,
"barcode": "",
"mixed_wholesale": false,
"tax_code": "",
"retail_price": "0.00",
"product_type": "",
"image": {
"src": "//cdn.shoplazza.com/edec6380231d06edd67889bb95939a12.jpeg",
"path": "edec6380231d06edd67889bb95939a12.jpeg",
"width": 1280,
"height": 1710,
"alt": ""
},
"options": [],
"wholesale_price": [
{
"min_quantity": 1,
"price": "273.60"
}
],
"discount_applications": [
{
"type": "discount_flashsale",
"subtype": "discount_flashsale",
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"title": "促销",
"value": "",
"discount_type": "",
"value_type": "",
"allocation_method": "",
"target_selection": "",
"target_type": "",
"total_discount_amount": "0",
"discount_amount": "0",
"is_free_gift": false,
"icon": "//cdn.shoplazza.com/oss/operation/372e6ab307143855fbd0ad3d28568d1e.svg"
}
],
"saved_price": 14.4,
"line_price": "273.60",
"original_line_price": 288,
"flashsale_tip": false,
"discount_info": {
"id": "299752",
"variant_id": "3c4f8ac5-3e47-498a-9d3f-44db49f01f23",
"product_id": "f4138308-ac57-46d5-bba7-ac60b2c6aefa",
"quantity": 1,
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"limit_time": -1,
"limit_buy": 0,
"user_limit_buy": -1,
"discount_sales": 1,
"discount_sales_rate": "50",
"discount_stock": 1,
"ends_at": -1,
"starts_at": 1682405275,
"allow_oversold": "uncheck",
"allocation_method": "none",
"price": "273.6",
"compare_at_price": "288",
"discount_price": "273.6",
"customary_saved_price": "14.4",
"customary_off_ratio": "5",
"discount_saved_price": "14.4",
"discount_off_ratio": "5",
"use_before_price": false,
"before_price": "228",
"title": "促销",
"trunk_price": "0",
"total_price": "0",
"inventory_tracking": true,
"inventory_policy": "deny",
"inventory_quantity": 1
},
"item_id": "299752",
"can_buy": true,
"discount_total": "0.00",
"final_line_price": "273.60",
"final_price": "273.60"
},
{
"id": "298446_d41d8cd98f00b204e9800998ecf8427e",
"properties": "",
"note": "",
"cart_id": "298446",
"store_id": "7126",
"user_id": "0181ba0b-1ca4-44b9-be0d-f6052e9f0fc8",
"user_sign": "",
"product_id": "ddd0cadc-9ef2-4854-a0c5-67d62652cc61",
"variant_id": "f4325691-9686-4e9f-baa3-17991a840467",
"quantity": "2",
"created_at": "2023-07-07 03:15:00",
"updated_at": "2023-07-07 03:15:18",
"custom": false,
"price": "289",
"trunk_price": "0",
"parts_price": null,
"variant_title": "Slategray",
"product_title": "All Glass Sunglasses",
"product_handle": "all-glass-sunglasses",
"product_tags": [
"new"
],
"published": true,
"published_at": "2022-02-10T02:30:50Z",
"product_url": "/products/all-glass-sunglasses",
"inventory_quantity": 649,
"inventory_policy": "deny",
"inventory_tracking": true,
"available": true,
"available_quantity": 649,
"compare_at_price": "0",
"cost_price": "0.00",
"weight": "0.00",
"weight_unit": "kg",
"sku": "RNB5019S",
"spu": "SPU",
"vendor": "Nero Theme Fashion",
"vendor_url": "",
"taxable": false,
"requires_shipping": false,
"barcode": "",
"mixed_wholesale": false,
"tax_code": "",
"retail_price": "0.00",
"product_type": "",
"image": {
"src": "//cdn.shoplazza.com/f4621061e95abd9455031ad7162bac15.jpeg",
"path": "f4621061e95abd9455031ad7162bac15.jpeg",
"width": 1280,
"height": 1710,
"alt": ""
},
"options": [
{
"name": "Color",
"value": "Slategray"
}
],
"wholesale_price": [
{
"min_quantity": 1,
"price": "289.00"
}
],
"total_price": "0",
"discount_applications": [],
"saved_price": -289,
"line_price": "578.00",
"original_line_price": 0,
"customary_off_ratio": 0,
"flashsale_tip": false,
"item_id": "298446",
"can_buy": true,
"discount_total": "0.00",
"final_line_price": "578.00",
"final_price": "289.00"
},
{
"id": "298098_d41d8cd98f00b204e9800998ecf8427e",
"properties": "",
"note": "",
"cart_id": "298098",
"store_id": "7126",
"user_id": "0181ba0b-1ca4-44b9-be0d-f6052e9f0fc8",
"user_sign": "",
"product_id": "6842d11a-efff-4e0f-beaf-c822ccfad6b8",
"variant_id": "485cf307-5d8b-44e7-a3a6-52644403a4b4",
"quantity": "1",
"created_at": "2023-07-06 16:14:12",
"updated_at": "2023-07-09 10:01:12",
"custom": false,
"price": "325",
"trunk_price": "0",
"parts_price": null,
"variant_title": "DarkRed-37",
"product_title": "Lace-up Leather Manston Runner",
"product_handle": "lace-up-leather-manston-runner",
"product_tags": [
"Color_Black",
"Color_Crimson",
"Color_Indianred",
"Location_Louisiana",
"Price_$300-$400"
],
"published": true,
"published_at": "2022-02-10T02:30:48Z",
"product_url": "/products/lace-up-leather-manston-runner",
"inventory_quantity": 88,
"inventory_policy": "deny",
"inventory_tracking": false,
"available": true,
"available_quantity": 999999999,
"compare_at_price": "0",
"cost_price": "0.00",
"weight": "0.00",
"weight_unit": "kg",
"sku": "WFF19FF0321D32-3",
"spu": "",
"vendor": "Nero",
"vendor_url": "",
"taxable": false,
"requires_shipping": true,
"barcode": "",
"mixed_wholesale": false,
"tax_code": "",
"retail_price": "0.00",
"product_type": "",
"image": {
"src": "//cdn.shoplazza.com/f4d670f4175e188a3cb9b0449f0ca00d.jpeg",
"path": "f4d670f4175e188a3cb9b0449f0ca00d.jpeg",
"width": 1280,
"height": 1710,
"alt": ""
},
"options": [
{
"name": "Color",
"value": "DarkRed"
},
{
"name": "Size",
"value": "37"
}
],
"wholesale_price": [
{
"min_quantity": 1,
"price": "325.00"
}
],
"total_price": "0",
"discount_applications": [],
"saved_price": -325,
"line_price": "325.00",
"original_line_price": 0,
"customary_off_ratio": 0,
"flashsale_tip": false,
"item_id": "298098",
"can_buy": true,
"discount_total": "0.00",
"final_line_price": "325.00",
"final_price": "325.00"
},
{
"id": "298084_d41d8cd98f00b204e9800998ecf8427e",
"properties": "[]",
"note": "",
"cart_id": "298084",
"store_id": "7126",
"user_id": "0181ba0b-1ca4-44b9-be0d-f6052e9f0fc8",
"user_sign": "",
"product_id": "21578cd8-9cd5-44ce-a399-efe803bb54f9",
"variant_id": "e8c2dc60-428f-4f50-be2e-2d1766fb3a3b",
"quantity": "1",
"created_at": "2023-07-06 15:26:55",
"updated_at": "2023-07-09 10:01:12",
"custom": false,
"price": "228",
"trunk_price": "0",
"parts_price": null,
"variant_title": "DarkRed",
"product_title": "Cat Eye Sunglasses",
"product_handle": "cat-eye-sunglasses",
"product_tags": [],
"published": true,
"published_at": "2022-02-10T02:28:34Z",
"product_url": "/products/cat-eye-sunglasses",
"inventory_quantity": 89,
"inventory_policy": "deny",
"inventory_tracking": true,
"available": true,
"available_quantity": 89,
"compare_at_price": "0",
"cost_price": "0.00",
"weight": "0.00",
"weight_unit": "kg",
"sku": "RNB1021S-1-1",
"spu": "",
"vendor": "Nero",
"vendor_url": "",
"taxable": false,
"requires_shipping": true,
"barcode": "",
"mixed_wholesale": false,
"tax_code": "",
"retail_price": "0.00",
"product_type": "",
"image": {
"src": "//cdn.shoplazza.com/330aa4aff48eddb11edcd44c1c2fa335.jpeg",
"path": "330aa4aff48eddb11edcd44c1c2fa335.jpeg",
"width": 1280,
"height": 1710,
"alt": ""
},
"options": [
{
"name": "Color",
"value": "DarkRed"
}
],
"wholesale_price": [
{
"min_quantity": 1,
"price": "228.00"
}
],
"total_price": "0",
"discount_applications": [],
"saved_price": -228,
"line_price": "228.00",
"original_line_price": 0,
"customary_off_ratio": 0,
"flashsale_tip": false,
"item_id": "298084",
"can_buy": true,
"discount_total": "0.00",
"final_line_price": "228.00",
"final_price": "228.00"
},
{
"id": "298083_1825cbb82902c53fdc4e12283829e832",
"properties": "",
"note": "",
"variant_id": "f0d96c46-d1e8-4b94-a80f-f79d938dbd71",
"product_id": "bfcb3b27-9a45-4499-a8a5-26808c168be9",
"quantity": "1",
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"limit_time": -1,
"limit_buy": 0,
"user_limit_buy": -1,
"discount_sales_rate": "0",
"discount_stock": 90,
"ends_at": -1,
"starts_at": 1682405275,
"allow_oversold": "uncheck",
"allocation_method": "none",
"price": "427.5",
"compare_at_price": "450",
"discount_price": "427.5",
"customary_saved_price": "22.5",
"customary_off_ratio": 5,
"discount_saved_price": "22.5",
"discount_off_ratio": "5",
"use_before_price": false,
"before_price": "350",
"title": "促销",
"trunk_price": "0",
"total_price": "0",
"inventory_tracking": true,
"inventory_policy": "deny",
"inventory_quantity": 90,
"cart_id": "298083",
"store_id": "7126",
"user_id": "0181ba0b-1ca4-44b9-be0d-f6052e9f0fc8",
"user_sign": "",
"created_at": "2023-07-06 15:25:06",
"updated_at": "2023-07-09 10:01:12",
"custom": false,
"parts_price": null,
"variant_title": "Black-XS",
"product_title": "Allegra Tank Polished Crepe Dress",
"product_handle": "allegra-tank-polished-crepe-dress",
"product_tags": [
"Color_Black",
"Color_Tomato",
"flash_sale_2020-2-30",
"Location_Louisiana",
"Price_$300-$400"
],
"published": true,
"published_at": "2022-02-10T02:29:32Z",
"product_url": "/products/allegra-tank-polished-crepe-dress",
"available": true,
"available_quantity": 90,
"cost_price": "0.00",
"weight": "0.00",
"weight_unit": "kg",
"sku": "W294T33PM-1",
"spu": "",
"vendor": "Nero",
"vendor_url": "",
"taxable": false,
"requires_shipping": true,
"barcode": "",
"mixed_wholesale": false,
"tax_code": "",
"retail_price": "0.00",
"product_type": "",
"image": {
"src": "//cdn.shoplazza.com/c61e065229336ecb335c8f37faa58334.jpeg",
"path": "c61e065229336ecb335c8f37faa58334.jpeg",
"width": 1280,
"height": 1710,
"alt": ""
},
"options": [
{
"name": "Color",
"value": "Black"
},
{
"name": "Size",
"value": "XS"
}
],
"wholesale_price": [
{
"min_quantity": 1,
"price": "427.50"
}
],
"discount_applications": [
{
"type": "discount_flashsale",
"subtype": "discount_flashsale",
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"title": "促销",
"value": "",
"discount_type": "",
"value_type": "",
"allocation_method": "",
"target_selection": "",
"target_type": "",
"total_discount_amount": "0",
"discount_amount": "0",
"is_free_gift": false,
"icon": "//cdn.shoplazza.com/oss/operation/372e6ab307143855fbd0ad3d28568d1e.svg"
}
],
"saved_price": 22.5,
"line_price": "427.50",
"original_line_price": 450,
"flashsale_tip": false,
"discount_info": {
"id": "298083",
"variant_id": "f0d96c46-d1e8-4b94-a80f-f79d938dbd71",
"product_id": "bfcb3b27-9a45-4499-a8a5-26808c168be9",
"quantity": 1,
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"limit_time": -1,
"limit_buy": 0,
"user_limit_buy": -1,
"discount_sales_rate": "0",
"discount_stock": 90,
"ends_at": -1,
"starts_at": 1682405275,
"allow_oversold": "uncheck",
"allocation_method": "none",
"price": "427.5",
"compare_at_price": "450",
"discount_price": "427.5",
"customary_saved_price": "22.5",
"customary_off_ratio": "5",
"discount_saved_price": "22.5",
"discount_off_ratio": "5",
"use_before_price": false,
"before_price": "350",
"title": "促销",
"trunk_price": "0",
"total_price": "0",
"inventory_tracking": true,
"inventory_policy": "deny",
"inventory_quantity": 90
},
"item_id": "298083",
"can_buy": true,
"discount_total": "0.00",
"final_line_price": "427.50",
"final_price": "427.50"
},
{
"id": "298049_1825cbb82902c53fdc4e12283829e832",
"properties": "",
"note": "",
"variant_id": "4a3d825c-2fac-4f72-a68b-b8604b0935c4",
"product_id": "b1ab6324-ae4f-4cca-907e-18af16839447",
"quantity": "2",
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"limit_time": -1,
"limit_buy": 0,
"user_limit_buy": -1,
"discount_sales": 2,
"discount_sales_rate": "2",
"discount_stock": 86,
"ends_at": -1,
"starts_at": 1682405275,
"allow_oversold": "uncheck",
"allocation_method": "none",
"price": "205.2",
"compare_at_price": "228",
"discount_price": "205.2",
"customary_saved_price": "22.8",
"customary_off_ratio": 10,
"discount_saved_price": "22.8",
"discount_off_ratio": "10",
"use_before_price": false,
"before_price": "188",
"title": "促销",
"trunk_price": "0",
"total_price": "0",
"inventory_tracking": true,
"inventory_policy": "deny",
"inventory_quantity": 86,
"cart_id": "298049",
"store_id": "7126",
"user_id": "0181ba0b-1ca4-44b9-be0d-f6052e9f0fc8",
"user_sign": "",
"created_at": "2023-07-06 14:09:48",
"updated_at": "2023-07-09 10:01:12",
"custom": false,
"parts_price": null,
"variant_title": "pink",
"product_title": "Squared Sunglasses ",
"product_handle": "squared-sunglasses-2o52",
"product_tags": [
"Color_Lightcoral",
"Location_Alabama",
"Price_$200-$300"
],
"published": true,
"published_at": "2022-08-11T08:15:07Z",
"product_url": "/products/squared-sunglasses-2o52",
"available": true,
"available_quantity": 86,
"cost_price": "0.00",
"weight": "0.00",
"weight_unit": "kg",
"sku": "",
"spu": "",
"vendor": "Nero Theme Fashion",
"vendor_url": "",
"taxable": false,
"requires_shipping": true,
"barcode": "",
"mixed_wholesale": false,
"tax_code": "",
"retail_price": "0.00",
"product_type": "",
"image": {
"src": "//cdn.shoplazza.com/d8217e1e2e216cd8b71b1035bde035ec.jpeg",
"path": "d8217e1e2e216cd8b71b1035bde035ec.jpeg",
"width": 1280,
"height": 1710,
"alt": ""
},
"options": [
{
"name": "Color",
"value": "pink"
}
],
"wholesale_price": [
{
"min_quantity": 1,
"price": "205.20"
}
],
"discount_applications": [
{
"type": "discount_flashsale",
"subtype": "discount_flashsale",
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"title": "促销",
"value": "",
"discount_type": "",
"value_type": "",
"allocation_method": "",
"target_selection": "",
"target_type": "",
"total_discount_amount": "0",
"discount_amount": "0",
"is_free_gift": false,
"icon": "//cdn.shoplazza.com/oss/operation/372e6ab307143855fbd0ad3d28568d1e.svg"
}
],
"saved_price": 22.8,
"line_price": "410.40",
"original_line_price": 456,
"flashsale_tip": false,
"discount_info": {
"id": "298049",
"variant_id": "4a3d825c-2fac-4f72-a68b-b8604b0935c4",
"product_id": "b1ab6324-ae4f-4cca-907e-18af16839447",
"quantity": 2,
"discount_id": "65c00d9b-060c-4206-a2d8-f2971cacee43",
"limit_time": -1,
"limit_buy": 0,
"user_limit_buy": -1,
"discount_sales": 2,
"discount_sales_rate": "2",
"discount_stock": 86,
"ends_at": -1,
"starts_at": 1682405275,
"allow_oversold": "uncheck",
"allocation_method": "none",
"price": "205.2",
"compare_at_price": "228",
"discount_price": "205.2",
"customary_saved_price": "22.8",
"customary_off_ratio": "10",
"discount_saved_price": "22.8",
"discount_off_ratio": "10",
"use_before_price": false,
"before_price": "188",
"title": "促销",
"trunk_price": "0",
"total_price": "0",
"inventory_tracking": true,
"inventory_policy": "deny",
"inventory_quantity": 86
},
"item_id": "298049",
"can_buy": true,
"discount_total": "0.00",
"final_line_price": "410.40",
"final_price": "205.20"
}
],
"ineffectives": [],
"discount_applications": [
{
"type": "discount_rebate",
"subtype": "discount_rebate",
"title": "Rebate 30",
"discount_amount": 30,
"message": "",
"discount_message": "",
"discount_id": "2ceed624-1064-494e-ab21-95e43342e3d3",
"value_type": "fixed_amount",
"target_type": "line_item",
"apply_method": "",
"target_selection": "entitled",
"discount_type": "discount_rebate",
"entitled_product_list": [
{
"product_id": "21578cd8-9cd5-44ce-a399-efe803bb54f9",
"variant_id": "e8c2dc60-428f-4f50-be2e-2d1766fb3a3b",
"price": "228",
"quantity": 1
}
]
},
{
"type": "discount_rebate",
"subtype": "discount_rebate",
"title": "满减",
"discount_amount": 20,
"message": "",
"discount_message": "",
"discount_id": "53b13206-6de7-48dd-baa5-a542f5be26f5",
"value_type": "fixed_amount",
"target_type": "line_item",
"apply_method": "",
"target_selection": "entitled",
"discount_type": "discount_rebate",
"entitled_product_list": [
{
"product_id": "b1ab6324-ae4f-4cca-907e-18af16839447",
"variant_id": "4a3d825c-2fac-4f72-a68b-b8604b0935c4",
"price": "205.2",
"quantity": 2
}
]
}
],
"total_discount": "50.00",
"discount_line_item_price": "50.00",
"invalid_msg": "",
"currency": "USD",
"note": "",
"created_at": "2023-06-27T08:56:37Z",
"updated_at": "2023-07-09T12:27:31Z",
"item_count": 8,
"original_line_price": "1194.00",
"original_total_price": "1194.00",
"line_price": "2242.50",
"total_price": "2192.50",
"total_weight": 0
}
dj.variantChange
The dj.variantChange
can be triggered by the following case:
- The viewing product detail page
- The viewing quick shop popup
document.addEventListener('dj.variantChange', (e) => {
const data = e.detail;
});
{
"product": {
"id": "6842d11a-efff-4e0f-beaf-c822ccfad6b8",
"title": "Lace-up Leather Manston Runner",
"vendor": "Nero",
"vendor_url": "",
"has_only_default_variant": false,
"requires_shipping": true,
"taxable": false,
"inventory_policy": "deny",
"inventory_quantity": 361,
"inventory_tracking": false,
"published": true,
"handle": "lace-up-leather-manston-runner",
"spu": "",
"note": "",
"need_variant_image": true,
"fake_sales": 12,
"display_fake_sales": false,
"independent_seo": false,
"updated_at": "2023-07-06T17:04:46Z",
"created_at": "2022-02-10T02:30:48Z",
"mixed_wholesale": false,
"product_type": "",
"tags": "Color_Black,Color_Crimson,Color_Indianred,Location_Louisiana,Price_$300-$400",
"available": true,
"price_min": "325",
"price": "325",
"price_max": "328",
"compare_at_price_min": "0",
"compare_at_price": "0",
"compare_at_price_max": "358",
"retail_price_min": "0",
"retail_price_max": "358",
"url": "/products/lace-up-leather-manston-runner",
"published_at": "2022-02-10T02:30:48Z",
"sales": 4,
"image": {
"src": "//cdn.shoplazza.com/4dbbac9bcc03acbf26bbe0eb69c78f10.jpeg?duration=317.4&hls=https%3A%2F%2Fvideodelivery.net%2F0ce8c522dda38eb276a8cd64ee47173f%2Fmanifest%2Fvideo.m3u8&media_type=video&mp4=https%3A%2F%2Fvideodelivery.net%2F0ce8c522dda38eb276a8cd64ee47173f%2Fdownloads%2Fdefault.mp4&vID=0ce8c522dda38eb276a8cd64ee47173f",
"path": "4dbbac9bcc03acbf26bbe0eb69c78f10.jpeg?duration=317.4&hls=https%3A%2F%2Fvideodelivery.net%2F0ce8c522dda38eb276a8cd64ee47173f%2Fmanifest%2Fvideo.m3u8&media_type=video&mp4=https%3A%2F%2Fvideodelivery.net%2F0ce8c522dda38eb276a8cd64ee47173f%2Fdownloads%2Fdefault.mp4&vID=0ce8c522dda38eb276a8cd64ee47173f",
"width": 848,
"height": 477,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 1.7777777777777777
},
"options": [
{
"id": "a57d98d2-c2ce-4a50-8003-39924220769b",
"name": "Color",
"position": 1,
"values": [
"DarkRed"
]
},
{
"id": "1c63160d-61e1-4729-9649-dc064f228f46",
"name": "Size",
"position": 2,
"values": [
"35",
"36",
"37",
"38",
"39",
"40"
]
}
],
"variants": [
{
"id": "9953d128-28fe-46d8-b6cb-357994b96b6d",
"product_id": "6842d11a-efff-4e0f-beaf-c822ccfad6b8",
"title": "DarkRed-35",
"weight_unit": "g",
"inventory_quantity": 83,
"sku": "WFF19FF0321D32-1",
"barcode": "CODE19F10021",
"position": 1,
"option1": "DarkRed",
"option2": "35",
"option3": "",
"note": "1122",
"image": {
"src": "//cdn.shoplazza.com/5afeee913a4f8ff183295949f8e9d129.jpeg",
"path": "5afeee913a4f8ff183295949f8e9d129.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
"wholesale_price": [
{
"price": 328,
"min_quantity": 1
}
],
"weight": "288",
"compare_at_price": "358",
"price": "328",
"retail_price": "358",
"available": true,
"url": "/products/lace-up-leather-manston-runner?variant=9953d128-28fe-46d8-b6cb-357994b96b6d",
"available_quantity": 999999999,
"options": [
{
"name": "Color",
"value": "DarkRed"
},
{
"name": "Size",
"value": "35"
}
],
"off_ratio": 8,
"flashsale_info": [],
"sales": 4
},
{
"id": "22c6945b-d6a8-4261-b413-d72833e705ec",
"product_id": "6842d11a-efff-4e0f-beaf-c822ccfad6b8",
"title": "DarkRed-36",
"weight_unit": "kg",
"inventory_quantity": 10,
"sku": "WFF19FF0321D32-2",
"barcode": "",
"position": 2,
"option1": "DarkRed",
"option2": "36",
"option3": "",
"note": "",
"image": {
"src": "//cdn.shoplazza.com/44cf329e8f4ebe6a2b4b9cc29674c181.jpeg",
"path": "44cf329e8f4ebe6a2b4b9cc29674c181.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": true,
"url": "/products/lace-up-leather-manston-runner?variant=22c6945b-d6a8-4261-b413-d72833e705ec",
"available_quantity": 999999999,
"options": [
{
"name": "Color",
"value": "DarkRed"
},
{
"name": "Size",
"value": "36"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 4
},
{
"id": "485cf307-5d8b-44e7-a3a6-52644403a4b4",
"product_id": "6842d11a-efff-4e0f-beaf-c822ccfad6b8",
"title": "DarkRed-37",
"weight_unit": "kg",
"inventory_quantity": 88,
"sku": "WFF19FF0321D32-3",
"barcode": "",
"position": 3,
"option1": "DarkRed",
"option2": "37",
"option3": "",
"note": "",
"image": {
"src": "//cdn.shoplazza.com/f4d670f4175e188a3cb9b0449f0ca00d.jpeg",
"path": "f4d670f4175e188a3cb9b0449f0ca00d.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": true,
"url": "/products/lace-up-leather-manston-runner?variant=485cf307-5d8b-44e7-a3a6-52644403a4b4",
"available_quantity": 999999999,
"options": [
{
"name": "Color",
"value": "DarkRed"
},
{
"name": "Size",
"value": "37"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 4
},
{
"id": "35cf7757-dba6-48c2-b331-e071c4c1d8a6",
"product_id": "6842d11a-efff-4e0f-beaf-c822ccfad6b8",
"title": "DarkRed-38",
"weight_unit": "kg",
"inventory_quantity": 0,
"sku": "WFF19FF0321D32-4",
"barcode": "",
"position": 4,
"option1": "DarkRed",
"option2": "38",
"option3": "",
"note": "",
"image": {
"src": "//cdn.shoplazza.com/c2ff6094baab824afde797a364384813.jpeg",
"path": "c2ff6094baab824afde797a364384813.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": true,
"url": "/products/lace-up-leather-manston-runner?variant=35cf7757-dba6-48c2-b331-e071c4c1d8a6",
"available_quantity": 999999999,
"options": [
{
"name": "Color",
"value": "DarkRed"
},
{
"name": "Size",
"value": "38"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 4
},
{
"id": "4a17a9cb-4374-4fff-b1ee-061ae2d23626",
"product_id": "6842d11a-efff-4e0f-beaf-c822ccfad6b8",
"title": "DarkRed-39",
"weight_unit": "kg",
"inventory_quantity": 90,
"sku": "WFF19FF0321D32-5",
"barcode": "",
"position": 5,
"option1": "DarkRed",
"option2": "39",
"option3": "",
"note": "",
"image": {
"src": "//cdn.shoplazza.com/9ca7f7e1857fd33df730497b9407bd6d.jpeg",
"path": "9ca7f7e1857fd33df730497b9407bd6d.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": true,
"url": "/products/lace-up-leather-manston-runner?variant=4a17a9cb-4374-4fff-b1ee-061ae2d23626",
"available_quantity": 999999999,
"options": [
{
"name": "Color",
"value": "DarkRed"
},
{
"name": "Size",
"value": "39"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 4
},
{
"id": "0935d4d2-e106-4599-957c-33844c20e61d",
"product_id": "6842d11a-efff-4e0f-beaf-c822ccfad6b8",
"title": "DarkRed-40",
"weight_unit": "kg",
"inventory_quantity": 90,
"sku": "WFF19FF0321D32-6",
"barcode": "",
"position": 6,
"option1": "DarkRed",
"option2": "40",
"option3": "",
"note": "",
"image": {
"src": "//cdn.shoplazza.com/5afeee913a4f8ff183295949f8e9d129.jpeg",
"path": "5afeee913a4f8ff183295949f8e9d129.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": true,
"url": "/products/lace-up-leather-manston-runner?variant=0935d4d2-e106-4599-957c-33844c20e61d",
"available_quantity": 999999999,
"options": [
{
"name": "Color",
"value": "DarkRed"
},
{
"name": "Size",
"value": "40"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 4
}
],
"images": [
{
"src": "//cdn.shoplazza.com/4dbbac9bcc03acbf26bbe0eb69c78f10.jpeg?duration=317.4&hls=https%3A%2F%2Fvideodelivery.net%2F0ce8c522dda38eb276a8cd64ee47173f%2Fmanifest%2Fvideo.m3u8&media_type=video&mp4=https%3A%2F%2Fvideodelivery.net%2F0ce8c522dda38eb276a8cd64ee47173f%2Fdownloads%2Fdefault.mp4&vID=0ce8c522dda38eb276a8cd64ee47173f",
"path": "4dbbac9bcc03acbf26bbe0eb69c78f10.jpeg?duration=317.4&hls=https%3A%2F%2Fvideodelivery.net%2F0ce8c522dda38eb276a8cd64ee47173f%2Fmanifest%2Fvideo.m3u8&media_type=video&mp4=https%3A%2F%2Fvideodelivery.net%2F0ce8c522dda38eb276a8cd64ee47173f%2Fdownloads%2Fdefault.mp4&vID=0ce8c522dda38eb276a8cd64ee47173f",
"width": 848,
"height": 477,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 1.7777777777777777
},
{
"src": "//cdn.shoplazza.com/e986c6af0165839c50193078af8902e01667466703170.png?media_type=model3d&sources=https%3A%2F%2Fshoplazza-model3d-stg.oss-accelerate.aliyuncs.com%2Fd17da5bc68537fcc881bcd3830d034681667466703480.glb",
"path": "e986c6af0165839c50193078af8902e01667466703170.png?media_type=model3d&sources=https%3A%2F%2Fshoplazza-model3d-stg.oss-accelerate.aliyuncs.com%2Fd17da5bc68537fcc881bcd3830d034681667466703480.glb",
"width": 1200,
"height": 1000,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 1.2
},
{
"src": "//cdn.shoplazza.com/5afeee913a4f8ff183295949f8e9d129.jpeg",
"path": "5afeee913a4f8ff183295949f8e9d129.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
{
"src": "//cdn.shoplazza.com/44cf329e8f4ebe6a2b4b9cc29674c181.jpeg",
"path": "44cf329e8f4ebe6a2b4b9cc29674c181.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
{
"src": "//cdn.shoplazza.com/f4d670f4175e188a3cb9b0449f0ca00d.jpeg",
"path": "f4d670f4175e188a3cb9b0449f0ca00d.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
{
"src": "//cdn.shoplazza.com/c2ff6094baab824afde797a364384813.jpeg",
"path": "c2ff6094baab824afde797a364384813.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
{
"src": "//cdn.shoplazza.com/9ca7f7e1857fd33df730497b9407bd6d.jpeg",
"path": "9ca7f7e1857fd33df730497b9407bd6d.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
{
"src": "//cdn.shoplazza.com/1410acee65f7a202b97650f3c65ee668.jpeg",
"path": "1410acee65f7a202b97650f3c65ee668.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
}
],
"redirect": false,
"redirect_url": "",
"retail_price": "0",
"price_varies": false,
"off_ratio": 0,
"flashsale_info": []
},
"selected": {
"id": "485cf307-5d8b-44e7-a3a6-52644403a4b4",
"product_id": "6842d11a-efff-4e0f-beaf-c822ccfad6b8",
"title": "DarkRed-37",
"weight_unit": "kg",
"inventory_quantity": 88,
"sku": "WFF19FF0321D32-3",
"barcode": "",
"position": 3,
"option1": "DarkRed",
"option2": "37",
"option3": "",
"note": "",
"image": {
"src": "//cdn.shoplazza.com/f4d670f4175e188a3cb9b0449f0ca00d.jpeg",
"path": "f4d670f4175e188a3cb9b0449f0ca00d.jpeg",
"width": 1280,
"height": 1710,
"alt": "Lace-up Leather Manston Runner Nero Spring",
"aspect_ratio": 0.7485380116959064
},
"wholesale_price": [
{
"price": 325,
"min_quantity": 1
}
],
"weight": "0",
"compare_at_price": "0",
"price": "325",
"retail_price": "0",
"available": true,
"url": "/products/lace-up-leather-manston-runner?variant=485cf307-5d8b-44e7-a3a6-52644403a4b4",
"available_quantity": 999999999,
"options": [
{
"name": "Color",
"value": "DarkRed"
},
{
"name": "Size",
"value": "37"
}
],
"off_ratio": 0,
"flashsale_info": [],
"sales": 4
}
}
dj.completeRegistration
The dj.completeRegistration
can be triggered by the following API request:
- The
/api/customers/sign_up
API request is successful in the register template
document.addEventListener('dj.completeRegistration', (e) => {
const data = e.detail;
});
register
dj.login
The dj.login
can be triggered by the following API request:
- The
/api/customers/sign_in
API request is successful in the login template
document.addEventListener('dj.login', (e) => {
const data = e.detail;
});
{
"login_method": "邮箱",
"shop_name": "Spring",
"login_result": true,
"fail_reason": ""
}
dj.logout
The dj.logout
can be triggered by the following API request:
- The
/api/customers/sign_out
API request is successful
document.addEventListener('dj.logout', (e) => {
const data = e.detail;
});
{}
dj.checkoutSubmit
The dj.checkoutSubmit
can be triggered by the following API request:
- The
/api/checkout/order
document.addEventListener('dj.checkoutSubmit', (e) => {
const data = e.detail;
});
{}
dj.initiateCheckout
The dj.initiateCheckout
can be triggered when the user enters the checkout page.
document.addEventListener('dj.initiateCheckout', (e) => {
// do something ...
});
dj.checkoutStepAddress
The dj.checkoutStepAddress
can be triggered when the user completes the first step in the three-step confirmation address on the checkout page.
document.addEventListener('dj.checkoutStepAddress', (e) => {
// do something ...
});
dj.addShippingMethod
The dj.addShippingMethod
can be triggered when the user completes the logistics plan confirmation on the checkout page.
document.addEventListener('dj.addShippingMethod', (e) => {
// do something ...
});
dj.checkoutStepPayment
The dj.checkoutStepPayment
can be triggered when the user completes the payment method and starts the payment on the checkout page.
document.addEventListener('dj.checkoutStepPayment', (e) => {
// do something ...
});
dj.purchase
The dj.purchase
can be triggered when the user completes the payment on the checkout page.
document.addEventListener('dj.purchase', (e) => {
// do something ...
});
Updated over 1 year ago