![]() |
Displaying number of items left when product quantity reaches certain level
I would like to display a message on the product page when the quantity of the product reaches a certain level.
For example, when the quantity reaches 10 (but is >0), the following message displays on the product page: "Only 10 left". Then, as further items are sold, this message changes as appropriate - i.e. "Only 9 left", "Only X left", etc When the product quantity reaches 0, then the product will be Out of Stock and will not be displayed. Thanks in advance for help. ---- Further to this: if the product quantity is above 10, then no text will be shown, i.e. "Quantity in Stock" text does not show and neither does the quantity itself. ---- This is a version 4.2.2 store. |
Re: Displaying number of items left when product quantity reaches certain level
theres a few mods on the forums for this kind of thing, you basically need an if statement to query the amount in stock, and then either display your text, or not.
|
Re: Displaying number of items left when product quantity reaches certain level
I have searched but haven't found anything suitable in the forum on the subject.
Hopefully someone can provide me with exact instructions. Thanks for your help Amy |
Re: Displaying number of items left when product quantity reaches certain level
|
Re: Displaying number of items left when product quantity reaches certain level
thanks for the link to the thread, however it doesn't quite fit what I'm after.
The statement should be something like: if qty is less than 11 but greater than 0, then display "Only qty left", otherwise if qty greater than 11, don't display any message. Note that "Only qty left" will change as the qty drops - e.g. "Only 10 left", "Only 9 left". [Note: if qty = 0, the product is not displayed at all - which can be enabled in admin anyway]. Thanks |
Re: Displaying number of items left when product quantity reaches certain level
yu just need a combination of the standard display and an if, so basically,
if qty is less than 11 disply text "Only " + qty in stock variable + "left" you need to think around mods like these to adjust them to your exact requirements. |
Re: Displaying number of items left when product quantity reaches certain level
Thanks - Appreciate your help, Amy.
|
Re: Displaying number of items left when product quantity reaches certain level
Yes I am also finding the same If the quantities are five pieces left then say"Almost Sold out" and if one piece left then say "last One" in products/product page.
Is it possible? |
Re: Displaying number of items left when product quantity reaches certain level
Yes it is. Did that for joannet. Contact me if you are interested, I can do it for you
|
Re: Displaying number of items left when product quantity reaches certain level
Quote:
Can you help me how to do this? |
All times are GMT -8. The time now is 02:38 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.