Jump to content

Adding add/substract button on blockcart


Recommended Posts

Hi there ,

 

I want to add the cart's add and substract button in the front panel so that user can directly add or substract the product quantity.

 

or

 

when a user click "add to cart" for a same product multiple times, all the products should come indivisually i.e no group should be form, so that the user can delete the same products using delete key

 

I have attached a pic to clarify the situationpost-345475-0-01904800-1333369616_thumb.jpg

Link to comment
Share on other sites

  • 5 months later...

It very easy.

 

 

Please add following code to file /modules/blockcart.tpl

 

Before line

 

{/foreach}

 

 

Adding following code

 

<div id="cart_quantity_button" style="float:left;">
<a rel="nofollow" class="cart_quantity_up" id="cart_quantity_up_{$product.id_product}_{$product.id_product_attribute}" href="{$link->getPageLink('cart.php', true)}?add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&token={$token_cart}" title="{l s='Add'}"><img src="{$img_dir}icon/quantity_up.gif" alt="{l s='Add'}" width="14" height="9" /></a><br />
<a rel="nofollow" class="cart_quantity_down" id="cart_quantity_down_{$product.id_product}_{$product.id_product_attribute}" href="{$link->getPageLink('cart.php', true)}?add&id_product={$product.id_product|intval}&ipa={$product.id_product_attribute|intval}&op=down&token={$token_cart}" title="{l s='Subtract'}">
<img src="{$img_dir}icon/quantity_down.gif" alt="{l s='Subtract'}" width="14" height="9" />
</a>
</div>

 

I tried it works fines

Link to comment
Share on other sites

×
×
  • Create New...