lipo999 Posted August 23, 2018 Share Posted August 23, 2018 Hello all, I have combinations from two attributes (A+B). Attributes are radio buttons (I made them like buttons in css). See enclosed screen. Problem is, that Prestashop count total quantity of each attribute. So for e.g. attribute "20cm" shows "available 5pcs", thats correct, but above must somehow dynamically show only availability connected with attribute "20cm". My code in product.tpl {if {$group.attributes_quantity[{$id_attribute|intval}]} < 1} {$product->available_later} {else} {$product->available_now} <span> {$group.attributes_quantity[{$id_attribute|intval}]} {l s='ks'} </span> {/if} Do you know somebody how to do it? Link to comment Share on other sites More sharing options...
Rolige Posted August 23, 2018 Share Posted August 23, 2018 Hello, Maybe the problem is your theme or something more, because by default PrestaShop display the stock of the selected combination, NOT the sum of all the combinations. You can validate it by changing temporary to the default theme. Regards! Link to comment Share on other sites More sharing options...
lipo999 Posted August 24, 2018 Author Share Posted August 24, 2018 Hello, yes, normally it shows like that, but I want to display under each attribute - like picture attached. I use the code above. Like here: https://www.i-living.cz/Matrace-z-pametove-peny/Zdravotni-matrace-Tropico-SUPER-FOX 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