Skip to main content

Remove stock level display only on category listin

More
10 years 7 months ago #230490 by danielle71
-- HikaShop version -- : 2.6.1
-- Joomla version -- : 3.4.8

Hello I would like to remove the stock level count from the product listing in categories but show it in the detailed product page.

Is there any way to accomplish this?

Thank you in advance for your help.

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

More
10 years 7 months ago #230493 by nicolas
Change the code:
Code:
if($this->row->product_quantity == 1 && JText::_('X_ITEM_IN_STOCK') != 'X_ITEM_IN_STOCK') $text = JText::sprintf('X_ITEM_IN_STOCK', $this->row->product_quantity); else $text = JText::sprintf('X_ITEMS_IN_STOCK', $this->row->product_quantity);
to:
Code:
if(!empty($this->element->product_id)){ if($this->row->product_quantity == 1 && JText::_('X_ITEM_IN_STOCK') != 'X_ITEM_IN_STOCK') $text = JText::sprintf('X_ITEM_IN_STOCK', $this->row->product_quantity); else $text = JText::sprintf('X_ITEMS_IN_STOCK', $this->row->product_quantity); }
in the file "quantity" of the view "product" via the menu Display>Views and that should do it.

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

More
10 years 7 months ago #230623 by danielle71
Thank you SOOO much Nicolas!! It worked like a charm :)))))

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

Time to create page: 0.207 seconds
Powered by Kunena Forum