I want to add a quantity box to the product listing pages (similar to on the full view product page.
I have copied the following code from product.tpl to product-list.tpl, and have managed to get the quantity box to show up, but no matter what value i put in the quantity box, when i add to cart, it only add one item.
In product-list.tpl i have added the following:
<!-- add to cart form-->
<form id="buy_block" action="{$base_dir}cart.php" method="post">
<!-- quantity wanted -->
quantity == 0) || $virtual} style="display:none;"{/if}>
<input type="text" name="qty" id="quantity_wanted" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" size="2" maxlength="3" />
</form>
and then edited the follwing:
{l s='Add to cart'}
If anyone has any idea how to do this i would really appreciate it. Im sure it cant be that difficult.



Back to top










