tozi Posted January 2, 2014 Share Posted January 2, 2014 (edited) Hi all, i need in detail of product add cart buton as a link. http://simplydesign.sk/shop/index.php?id_product=2&controller=product I have this code but didn't work. <a class="button ajax_add_to_cart_button exclusive" rel="ajax_id_product_{$categoryProduct.id_product|intval}" href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$categoryProduct.id_product|intval}&token={$static_token}", false)|escape:'html'}" title="{l s='Add to cart'}"><span></span>{l s='Add to cart'}</a> Edited January 2, 2014 by tozi (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted January 2, 2014 Share Posted January 2, 2014 and what you've got instead of ? can you share url to your website? Link to comment Share on other sites More sharing options...
tozi Posted January 2, 2014 Author Share Posted January 2, 2014 Url is here http://simplydesign.sk/shop/index.php?id_product=2&controller=product When i click on the button add cart,so throw an error. Link to comment Share on other sites More sharing options...
vekia Posted January 2, 2014 Share Posted January 2, 2014 it's because of this varialbe: {$categoryProduct.id_product|intval} you use it as a id_product param in href you've got there. change it tp {$product->id} Link to comment Share on other sites More sharing options...
tozi Posted January 2, 2014 Author Share Posted January 2, 2014 Och. Thanks a lot Milos. Link to comment Share on other sites More sharing options...
vekia Posted January 2, 2014 Share Posted January 2, 2014 i can confirm now it works ! product in cart: 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