Jump to content

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


andersburn

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. 

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