Skip to main content

Change "low-stock" threshold

More
11 hours 35 minutes ago #100000031 by Alimoso
-- HikaShop version -- : HikaShop Business: 6.6.0
-- Joomla version -- : 5.4.8
-- Browser(s) name and version -- : Firefox 140.0

Hiya everyone,
I have a question, I'd like to know how to change the low-stock threshold. (I've looked all over and can't find it)
It's currently shows at 5 products and I would like to reduce it to 3.
Could anyone point me in the right direction to where this is changed please?
Thanks in advance 8-) 

Please Log in or Create an account to join the conversation.

More
4 hours 11 minutes ago #100000039 by nicolas
Hi,

There is no low-stock threshold setting in HikaShop: the "Plus que 5 en stock" message on your product page does not come from HikaShop itself but from a customization added to the product page view of your site. In the page source it is surrounded by the comment "I added this line for minimum quantity left" and "End of modifications", placed just after the price.

To change the threshold, go to Components > HikaShop > Display > Views, filter on your frontend template and the "product" view, and open the file show_default (it should be shown as customized). Search for "minimum quantity left": just below you will find a condition comparing the product quantity with 5, something like:
Code:
if($this->element->product_quantity <= 5)

Replace the 5 with 3 and save. If the edit was made directly in a file instead, it is in templates/YOUR_TEMPLATE/html/com_hikashop/product/show_default.php.

If the condition looks different or you are unsure, copy here the few lines between "I added this line for minimum quantity left" and "End of modifications" and we will tell you what to change.

Please Log in or Create an account to join the conversation.

Time to create page: 0.152 seconds
Powered by Kunena Forum