maksim.majnikov Posted November 11, 2014 Share Posted November 11, 2014 Hi everybody! Please help me. I need to add $product.cart_quantity (number of each product from cart block) in product-list.tpl I tried different ways, but I did not succeed. Using prestashop 1.5.6.2 Link to comment Share on other sites More sharing options...
eleazar Posted November 11, 2014 Share Posted November 11, 2014 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 More sharing options...
maksim.majnikov Posted November 12, 2014 Author Share Posted November 12, 2014 eleazar Thank you for reply, but that's not what I need. I need number of each item in the shopping cart. For example: if i add to cart 3 x item1, 1 x item2, 7 x item3. i need this numbers 3, 1, 7 in product-list.tpl Link to comment Share on other sites More sharing options...
benadada Posted August 27, 2016 Share Posted August 27, 2016 hello Did you find the answer? I looking for exactly the same thing.... i desesperate... Link to comment Share on other sites More sharing options...
pierre81 Posted June 22, 2017 Share Posted June 22, 2017 Hello, Did you find the solution? Thank you Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now