gunril Posted December 6, 2018 Share Posted December 6, 2018 Hello, Using prestashop 1.7.4.2 Does anyone now how to get the stock quantities like shown into the product details into the product list ? Not the into cart button but the real quantities that are available like 5 items in stock, 20 items in stock ..... I managed to do this from the product details into the product additional info but i can't get it into the product list. I already use the product availability field in the product list but does use it to show the delivery time. I thought by putting the beneed code into the theme/templates/catalog/_partials/miniatures.product.tpl but it doesn't work. {block name='product_quantities'} {if $product.show_quantities} <div class="product-quantities" style="margin:10px 0 10px 0;"> <label class="label">{l s='In stock' d='Shop.Theme.Catalog'}</label> <span data-stock="{$product.quantity}" data-allow-oosp="{$product.allow_oosp}">{$product.quantity} {$product.quantity_label}</span> </div> {/if} {/block} https://tassenverkoop.be Hope that anyone knows this. Link to comment Share on other sites More sharing options...
gunril Posted December 12, 2018 Author Share Posted December 12, 2018 Nobody ?? Link to comment Share on other sites More sharing options...
gunril Posted December 12, 2018 Author Share Posted December 12, 2018 Think i will need Vekia for it 🙂 Link to comment Share on other sites More sharing options...
snaiaja Posted February 24, 2019 Share Posted February 24, 2019 (edited) Hello, what you are trying to achieve is very simple just insert the following code where you want: Currently in stock: {$product->quantity} P.s. where "Currently in stock", use any text you want. Also add classes if needed. Edited February 25, 2019 by snaiaja (see edit history) Link to comment Share on other sites More sharing options...
DailyShopBay Posted April 8, 2019 Share Posted April 8, 2019 On 2/25/2019 at 12:59 AM, snaiaja said: Hello, what you are trying to achieve is very simple just insert the following code where you want: Currently in stock: {$product->quantity} P.s. where "Currently in stock", use any text you want. Also add classes if needed. Hi Snaiaja, I'm trying to display the product quantity for every product (regardless I have 1 piece or 100 pcs in stock)! I want to follow your suggestion, inserting Currently in stock: {$product->quantity}, but I don't know how to add it exactly in the product.tpl file. (/themes/classic/templates/catalog/_partials/miniatures/). May can you help me? https://www.dailyshopbay.com Thanks in advance Link to comment Share on other sites More sharing options...
Eautje Posted September 5, 2019 Share Posted September 5, 2019 This is working, but not when you have some options in the product. Let's say the color of product. When the page loaded, the stock is ok. But when you select another color then the quantity will not change. Is there a solution? Link to comment Share on other sites More sharing options...
Eautje Posted September 20, 2019 Share Posted September 20, 2019 Somebody? Link to comment Share on other sites More sharing options...
Atlasan Posted January 29, 2020 Share Posted January 29, 2020 Finally, time later, I had to set up the debug tool and step by step find the way to do what I was trying to archive: getting the stock available for the combination and preventing the unavailable products to be displayed!! Link to comment Share on other sites More sharing options...
[email protected] Posted April 7, 2020 Share Posted April 7, 2020 Hello, I would like to change "items" by "yards" $product.quantity_label How can I change it? www.magitexdecor.com Link to comment Share on other sites More sharing options...
Prescol Posted April 7, 2020 Share Posted April 7, 2020 2 hours ago, [email protected] said: Hello, I would like to change "items" by "yards" $product.quantity_label How can I change it? www.magitexdecor.com Open a new thread for that. This thread is for other topic Link to comment Share on other sites More sharing options...
[email protected] Posted April 7, 2020 Share Posted April 7, 2020 OK, I will Link to comment Share on other sites More sharing options...
Nickovitshj Posted November 16, 2020 Share Posted November 16, 2020 On 1/29/2020 at 4:28 PM, Atlasan said: Finally, time later, I had to set up the debug tool and step by step find the way to do what I was trying to archive: getting the stock available for the combination and preventing the unavailable products to be displayed!! How did you manage to get the stock quantity to show based on the combination??? Link to comment Share on other sites More sharing options...
[email protected] Posted November 16, 2020 Share Posted November 16, 2020 (edited) I did it using Translation (international) where I modified the items by yard Edited November 16, 2020 by [email protected] (see edit history) Link to comment Share on other sites More sharing options...
Nickovitshj Posted November 16, 2020 Share Posted November 16, 2020 That won't solve my issue i'm afraid. {$product->quantity} This shows the quantity of a product. I got it working in the product.tpl file But it doesn't update when I select another combination of my product. It does update on the product details block which has been coded by PrestaShop itself. But I can't figure out the logic. How they got it to update there whenever another combination is selected. Link to comment Share on other sites More sharing options...
TecMikro Posted September 16, 2022 Share Posted September 16, 2022 Tal vez esta información puede servir 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