- Posts: 71
- Thank you received: 0
show stock last units
13 years 7 months ago #89724
by vaughan
show stock last units was created by vaughan
Hi
How I can do to show stock, only when there is less than 10 units?
Thnaks!
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.
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:
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.
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