Lee
out of interest, what does that do if both the "warn below" and "suspend below" settings are zero?
My "one off" items all have both "warning" and "suspend" set to zero as they only ever have 1 in stock (or out of stock)
I found these were displaying the code so I created a true/false variable (in the stock tab) set to false as the top level/default and I set it to true for the ones I want it displaying on
Give me a scenario that you think will fail and i will test it my end, i have it here now if you want, just testing myself, seems perfect. I think you will have missed an 'OR' value in the blockif.
ok, I'v done it slightly differently but it's just as effective and gives me the versatility to switch it on and off on particular products, if I have some that I don't want a limited stock warning on (ie stuff I restock) but do need to "warn if below" option in use for stock reports.
I set up 2 variables.
One for "LimitedStockText" for the text shown on site. I set this at Site Level and gave it a top level value of "Limited Stock" Obviously it could be set at section level or eve product level if required. I only need one message.
One for "LimitedStockMarker" as a true/false variable to switch it "on" and "off". I set it at product level, with "default" value as "false" so I switch it "on" for the products I want it on (which is fewer than the ones I don't want it on)
then, I added the following code to the layout, above the add to cart
One slight thing i think you've forgotten Bumpsy is the flag that decides if stock monitoring is done at all. If you don't have that in your condition, then if you switched off stock monitoring, your 'limited' message would still show where it applies. This would mean you then need to go to each product with limited showing and change your variable. Try and use the standard function as much as possible, as this then retains the 'global' or 'individual' ability to switch it on/off, rather than having to do two things.
Apologies if that comes across as a pedantic pratt, it is not meant that way, its just i don't think the standard flag to switch monitoring on or off will not work under that setup.
Very well done though for that far, a pointer on how far you have come, i can think of a few designers who couldn't do that.
didn't sound pedantic at all...I didn't think of it, I suppose, because I would never switch off stock monitoring on my own website.
however, all it would need would be for me to set the LimitedStockMarker (currently at product level) at SITE level only (so over-writing ALL "true" settings) and then it would automatically set them all to false and effectively disable it, right?
I get your point though. This is the difference between me thinking in "one store" mode and you thinking in "designer" mode
however, all it would need would be for me to set the LimitedStockMarker (currently at product level) at SITE level only (so over-writing ALL "true" settings) and then it would automatically set them all to false and effectively disable it, right?
I take it you have this set on some products and not others, so i don't think that would work as setting this at site level, would only cascade to those settings still at 'use parent'. If 'true' is your parent setting, everywhere you have 'false' would not change.
That was my main (pedantic) point that you are losing the global actinic switch on/off. Or say for example you have a product now that is is showing as 'limited', but you no longer wish to stock control it. Selecting the checkbox on the stock tab will not work, you will also need to change your new variable etc.
I take it you have this set on some products and not others
Correct
Originally posted by leehack
so i don't think that would work as setting this at site level, would only cascade to those settings still at 'use parent'. If 'true' is your parent setting, everywhere you have 'false' would not change.
I didn't mean just changing it at site level, I mean REMOVING the "product level" place of setting altogether for the variable and therefore removing ALL the true settings and leaving just one, overall, global "false"
See what I mean?
Downside is, of course, that to enable again, the variable needs setting back at product level and each product, where needed, would need setting to true again, individually.
I see that
Originally posted by leehack
That was my main (pedantic) point that you are losing the global actinic switch on/off. Or say for example you have a product now that is is showing as 'limited', but you no longer wish to stock control it. Selecting the checkbox on the stock tab will not work, you will also need to change your new variable etc.
Yes, I got that point. I'm gonna fiddle with that bit later
Comment