Show quantity in stock conditionally?
- lovelyweapon
-
Topic Author
- Offline
Less
More
14 years 3 months ago #52929
by lovelyweapon
Show quantity in stock conditionally? was created by lovelyweapon
Hi everyone. I want to know if it's possible to only show the quantity in stock when it is at 1, for each variant? Thanks in advance!
Please Log in or Create an account to join the conversation.
14 years 3 months ago #52965
by Xavier
Replied by Xavier on topic Re: Show quantity in stock conditionally?
Hi lovelyweapon,
You have to edit the view produt / quantity.php
In HikaShop > Display > Views.
Then replace the line:
By:
You have to edit the view produt / quantity.php
In HikaShop > Display > Views.
Then replace the line:
Code:
echo '<span class="hikashop_product_stock_count">'.JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity).'</span><br/>';
By:
Code:
if($this->row->product_quantity == 1){
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: lovelyweapon
Please Log in or Create an account to join the conversation.
- lovelyweapon
-
Topic Author
- Offline
14 years 3 months ago #53041
by lovelyweapon
Replied by lovelyweapon on topic Re: Show quantity in stock conditionally?
Thank you so much!
Please Log in or Create an account to join the conversation.
Time to create page: 0.173 seconds