Jump to content

Please advise on adding ClickID to "Add to cart" button in product.tpl Prestashop 1.6


Recommended Posts

Hello everybody,

I would appreciate your advice.

I am trying to add a tracking ClickID to the "Add to cart" button in product.tpl.

This is so that I can better understand visitor interaction with our Prestashop site and thereby improve sales.

This is my attempt at adding the ClickID in product.tpl:

<button type="submit" name="Submit" class="exclusive">

<!-- <span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}</span>   -->


<span>{if $content_only && (isset($product->customization_required) && $product->customization_required)}{l s='Customize'}{else}{l s='Add to cart'}{/if}&sub1={mc_click_id}</span>

</button>

The result of adding that ClickID was the disappearance of the product page. So clearly my knowledge is lacking.

The version of Prestashop is 1.6.

Thank you in advance.

Best,

Bob

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...