bafke Posted April 19, 2012 Share Posted April 19, 2012 Hey people! I run into a problem regarding checking the stock status of my products combination(sizes). Basically what i want is to show one img when the products specific size in in stock and another img when it's not. this is what i wrote in the products.tpl (line 338) and I understand that it only checks the products stock status and not it's attributes: {if $product->quantity > 0} <label>{l s="In Stock : "}</label><img src="{$img_dir}_in_product/instock.png" /> {else} <label>{l s="In Stock : "}</label><img src="{$img_dir}_in_product/outstock.png" /> {/if} So now it's the instock img that shows all the time because one size is in stock. I tried looking in the file on how to solve it but I don't understand how it's used. Thank you 1 Link to comment Share on other sites More sharing options...
bafke Posted April 20, 2012 Author Share Posted April 20, 2012 Anyone? Link to comment Share on other sites More sharing options...
bafke Posted April 24, 2012 Author Share Posted April 24, 2012 Ok I still havent figured this one out. Im using the exact same statement as prestashop does when deciding to show the add to cart button or quantity option. The only difference is that I'm using a {else} statement as well. {if (!$allow_oosp && $product->quantity <= 0) OR !$product->available_for_order OR (isset($restricted_country_mode) AND $restricted_country_mode) OR $PS_CATALOG_MODE} <label><img src="{$img_dir}_in_product/_buybox/{$lang_iso}_outstock.png" /></label> {else} <label><img src="{$img_dir}_in_product/_buybox/{$lang_iso}_instock.png" /></label> {/if} Can anyone see anything crazy? Link to comment Share on other sites More sharing options...
bafke Posted April 25, 2012 Author Share Posted April 25, 2012 bump =( Link to comment Share on other sites More sharing options...
bafke Posted April 25, 2012 Author Share Posted April 25, 2012 Ok finally found the product.js file where I was able to sort it out! 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