Skip to main content

show stock last units

More
13 years 7 months ago #89724 by vaughan
Hi

How I can do to show stock, only when there is less than 10 units?

Thnaks!

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

More
13 years 7 months ago #89810 by Xavier
Replied by Xavier on topic show stock last units
Hi,

In the view "product / quantity" (HikaShop > Display > Views) you can add a "if" condition to display the stock only when less than 10 units.

The line displaying the stock is: echo '<span class="hikashop_product_stock_count">'.JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity).'</span><br/>';

You can do:
Code:
if($this->row->product_quantity <= 10) echo '<span class="hikashop_product_stock_count">'.JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity).'</span><br/>';
The following user(s) said Thank You: vaughan

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

More
13 years 7 months ago #89811 by vaughan
Replied by vaughan on topic show stock last units
thanks!!

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

Time to create page: 0.190 seconds
Powered by Kunena Forum