Out Of Stock

  • Posts: 161
  • Thank you received: 4
9 years 1 week ago #250205

-- HikaShop version -- : Business
-- Error-message(debug-mod must be tuned on) -- : none

Hi,

I would like to show an out of stock label when the count reaches "0",
I dont want to hide the goods, just show "out of stock" so that the customer can still view the product,
how do I do this ?

thanks

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

  • Posts: 84424
  • Thank you received: 13720
  • MODERATOR
9 years 1 week ago #250211

Hi,

That's already the case.
If you don't have the "show out of stock products" setting turned on in the HikaShop configuration, the products without stock will display on the listing.
And when you click on them and display the product page, you'll get a "no stock" label instead of the quantity.

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

  • Posts: 161
  • Thank you received: 4
9 years 1 week ago #250283

Hi nicolas, thanks got it,

is it possible to hide the number in stock on the category listing but show on the product page ?

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

  • Posts: 84424
  • Thank you received: 13720
  • MODERATOR
9 years 1 week ago #250288

Hi,

In that case, it will require some code modification.
You'll have to edit the file "quantity" of the view "product" via the menu Display>Views and change the 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:
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);
}

The following user(s) said Thank You: phiddius

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

  • Posts: 161
  • Thank you received: 4
9 years 5 days ago #250675

thanks nicolas - got it

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

  • Posts: 49
  • Thank you received: 1
9 years 2 days ago #250870

Hi Nicolas,

HikaShop 2.6.3
Joomla! 3.6.2

I would like that products out of stock are showed.
I have set:
1/ the Quantity of a product to 0
2/ Display out of stock products to Yes
but this product isn't visible ?

Do you know what I'm doing wrong please ?

TIA

Regards,
Thierry

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

  • Posts: 84424
  • Thank you received: 13720
  • MODERATOR
9 years 1 day ago #250880

Hi,

There is not enough information to be able to answer.
Please provide:
- a link to the page where the product is not being displayed.
- a screenshot of the settings of the product
- screenshots of the settings of the menu item of that page.

The following user(s) said Thank You: sindb

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

  • Posts: 49
  • Thank you received: 1
9 years 1 day ago #250920

Dear Nicolas,

I was afraid that nobody would answer here to my question so I created a new ticket
hikashop.com/forum/product-category-disp...t-showed.html#250904

I will add there your remarks

TIA

Regards,
Thierry

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

Time to create page: 0.075 seconds
Powered by Kunena Forum