Jump to content
Sign in to follow this  
andersburn

Trying to add 'add to cart' buttons to the quantityDiscount box with quantity

Recommended Posts

So i'm trying to add a button after every line in the quantityDiscount box, so if i have a quantityDiscount for a quantity of 2, there's a button that adds 2 products to the cart and so on.

I have tried this:  (where 6 is {$quantity_discount.quantity|intval} ) 

<a href="{$link->getPageLink('cart',false, NULL, "add=6&id_product={$product->id|intval}&qty=6&token={$static_token}", false)|escape:'html':'UTF-8'}" data-id-product="{$product->id}" data-id-product="{$product->id}" rel="nofollow" title="Add to cart">{l s='Add to cart'}</a>
 

And:
<a href="{$link->getPageLink('cart',false, NULL, "add=1&id_product={$product->id|intval}&qty=6&token={$static_token}", false)|escape:'html':'UTF-8'}" data-id-product="{$product->id}" data-id-product="{$product->id}" rel="nofollow" title="Add to cart">{l s='Add to cart'}</a>
And:
<a href="{$link->getPageLink('cart',false, NULL, "add=6&id_product={$product->id|intval}&qty=1&token={$static_token}", false)|escape:'html':'UTF-8'}" data-id-product="{$product->id}" data-id-product="{$product->id}" rel="nofollow" title="Add to cart">{l s='Add to cart'}</a>
 

But they all just adds 1 to the cart. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More