adrianofina Posted November 5, 2019 Share Posted November 5, 2019 Hello to all, as the title suggests I need to configure Javascript code in some Prestashop pages (to be precise, the Cart, the product page and Checkout). The code to edit is as follows, could you give me a hand on "how to" call values like "SKU", "NAME", "CATEGORYNAME", etc? <script type="text/javascript"> // Set the view of a product _paq.push(['setEcommerceView', "SKU", // (required) SKU: Product unique identifier "NAME", // (optional) Product name "CATEGORYNAME", // (optional) Product category. You can also specify an array of up to 5 categories eg. ["CATEGORYNAME", "CATEGORYNAME2", "CATEGORYNAME3"] 20, // (recommended) Product price ]); // Set the view of a category _paq.push(['setEcommerceView', false, false, "CATEGORYNAME", // You can also specify an array of up to 5 categories eg. ["CATEGORYNAME", "CATEGORYNAME2", "CATEGORYNAME3"] ]); _paq.push(['trackPageView']); </script> I would be immensely grateful. Thanks Link to comment Share on other sites More sharing options...
JBW Posted November 6, 2019 Share Posted November 6, 2019 The products in the cart can be accessed via JS variable prestashop.cart.products Link to comment Share on other sites More sharing options...
adrianofina Posted November 6, 2019 Author Share Posted November 6, 2019 Could you edit the code I pasted to make it work for how it asks? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now