Jump to content

Javascript product fields setting


adrianofina

Recommended Posts

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...