Jump to content

product cart_quantity in product-list.tpl


maksim.majnikov

Recommended Posts

I'm not sure what you mean. So, if you want to add an input field for quntities to add to cart then try this:

 

Open /themes/<YourTheme>/product-list.tpl. Search for

<span class="price" style="display: inline;">
		{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price_tax_exc}{/if}</span><br />
		{/if}

Add after this the following code:

<span class="quantity_wanted" {if (!$allow_oosp && $product.quantity <= 0) OR $virtual OR !$product.available_for_order OR $PS_CATALOG_MODE}style="display: none;"{/if}-->
	<a class="lnk_more" style="margin-top:15px; title="{l s='Quantity'}">{l s='Quantity'}</a>
	<input type="text" name="ajax_qty_to_add_to_cart[{$product.id_product|intval}]" id="quantity_wanted_{$product.id_product|intval}" class="text" value="{if isset($quantityBackup)}{$quantityBackup|intval}{else}1{/if}" style="text-align:center" size="2" maxlength="3" {if $product->minimal_quantity > 1}onkeyup="checkMinimalQuantity({$product->minimal_quantity});"{/if} </a>
</span><br>

The result will be a new input field for product quantities in the product list.

Link to comment
Share on other sites

  • 1 year later...
  • 9 months later...

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