show stock last units

  • Posts: 71
  • Thank you received: 0
11 years 9 months ago #89724

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.

  • Posts: 13201
  • Thank you received: 2322
11 years 9 months ago #89810

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:

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.

  • Posts: 71
  • Thank you received: 0
11 years 9 months ago #89811

thanks!!

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

Time to create page: 0.067 seconds
Powered by Kunena Forum