Skip to content

Instantly share code, notes, and snippets.

@brablc
Last active October 31, 2018 15:40
Show Gist options
  • Save brablc/f3782d63ed7839e7219747feb7b7129c to your computer and use it in GitHub Desktop.
Save brablc/f3782d63ed7839e7219747feb7b7129c to your computer and use it in GitHub Desktop.
Shoptet dataLayer - new
dataLayer = [];
dataLayer.push({'shoptet' : {
"pageType": "productDetail",
"product": {
"id": 47844,
"guid": "00d1a8e3-51be-11e7-819d-002590dc5efc",
"hasVariants": true,
"codes": [
{
"code": "47844\/38",
"quantity": -5,
"stocks": [
{
"id": "ext",
"quantity": 0
},
{
"id": 1,
"quantity": 0
},
{
"id": 4,
"quantity": 0
}
]
},
{
"code": "47844\/39",
"quantity": 0,
"stocks": [
{
"id": "ext",
"quantity": 0
},
{
"id": 1,
"quantity": 0
},
{
"id": 4,
"quantity": 0
}
]
},
{
"code": "47844\/40",
"quantity": 1,
"stocks": [
{
"id": "ext",
"quantity": 0
},
{
"id": 1,
"quantity": 1
},
{
"id": 4,
"quantity": 0
}
]
},
{
"code": "47844\/41",
"quantity": 2,
"stocks": [
{
"id": "ext",
"quantity": 0
},
{
"id": 1,
"quantity": 2
},
{
"id": 4,
"quantity": 0
}
]
},
{
"code": "47844\/42",
"quantity": 2,
"stocks": [
{
"id": "ext",
"quantity": 0
},
{
"id": 1,
"quantity": 2
},
{
"id": 4,
"quantity": 0
}
]
}
],
"name": "Baler\u00edny modr\u00e9 s punt\u00edky",
"appendix": "",
"manufacturer": "Paul Green",
"currentCategory": "Testov\u00e1n\u00ed | Bez kr\u00e1tk\u00fdch popisk\u016f",
"defaultCategory": "Testov\u00e1n\u00ed | Bez kr\u00e1tk\u00fdch popisk\u016f",
"currency": "CZK",
"priceWithVat": 948
},
"stocks": [
{
"id": 4,
"title": "Brno Krpole",
"isDeliveryPoint": 1
},
{
"id": 1,
"title": "Praha Francouzsk\u00e1",
"isDeliveryPoint": 1
},
{
"id": "ext",
"title": "Extern\u00ed sklad",
"isDeliveryPoint": 0
}
],
"cart": [
{
"code": "47844\/38",
"quantity": 1
},
{
"code": "47844\/41",
"quantity": 1
}
]
}});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment