Hi, I need to add a javascript calls to shopping cart. Where should I add these pieces of code? Also how can I pull product id, price, name (and category if possible)? I appreciate your help! I need to run this javascript code when a product gets added to cart:
window._cshq = window._cshq || []; // always confirm that the events queue exists, or create it
window._cshq.push(["_addToCart", // add the product
{
"ProductId" : product.sku,
"Quantity" : "1",
"UnitPrice" : "24.50",
"Name" : "product name"
"Denomination" : "EUR"
}
]);
and this call when a product is removed from the cart:
window._cshq = window._cshq || []; // always confirm that the events queue exists, or create it
window._cshq.push(["_removeFromCart", // remove the product
{
"ProductId" : product.sku,
"Quantity" : "1"
}
]);