mohsart Posted July 16, 2011 Share Posted July 16, 2011 I've altered the code to not show the exact stock levels, see http://mohsart.se/en/mahjong/840-chinese-mahjong-set-with-numbers-with-wooden-case.htmlThis, however, doesn't work when the product has attributes, see http://mohsart.se/en/skalar/830-woven-straw-bowls.htmlAlso, "tax incl" is not shown on a new line when there are attributes.Actually, one sees the "correct" info * for a short moment before the faulty one appears.* Except for that the stock level that flashes by is the product stock, not for the selected attribute (in the case above, "few in stock" flashes by before "50 items in stock" appears./Mats Link to comment Share on other sites More sharing options...
mohsart Posted July 16, 2011 Author Share Posted July 16, 2011 My code: {* {$product->quantity|intval} *} {if $product->quantity < 5} {l s='Few'} {else} {l s='Many'} {/if} Are products with attributes handled by another file? (not product.tpl) I cannot find another place where stock quantity is handled./Mats Link to comment Share on other sites More sharing options...
mohsart Posted July 16, 2011 Author Share Posted July 16, 2011 Actually, the "few in stock" that flashes by is really weird, since the product has Quantity in stock: 100 in the info tab in BO./Mats Link to comment Share on other sites More sharing options...
mohsart Posted July 16, 2011 Author Share Posted July 16, 2011 I removed and now it seems to work, I have no idea why thoughEdit: I needed to change the if statement too: {if ($product->quantity < 5) && ($combination.quantity < 5)} /Mats 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