don't show number of product in stock

  • Posts: 846
  • Thank you received: 92
10 years 2 months ago #169138

hi
i have a very basic question

I use for menu Product / div
Can we disable in the joomla Backend GUI the " 1 item in stock" show in FrontEnd.
I know this information is manage by quantity.php at line 120 by this code ?
echo '<span class="hikashop_product_stock_count">'.$text.'<br/></span>';


thank's

Last edit: 10 years 2 months ago by lionel75.

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

  • Posts: 82863
  • Thank you received: 13372
  • MODERATOR
10 years 2 months ago #169142

Hi,

There is no option to do it, but yes, you can modify the quantity view file to remove it. Another possibility, that we usually recommend, is to change the translation of that text with a translation override in order to remove the text without having to do a view override (upgrade will be less risky that way if you minimize the number of view overrides)

The following user(s) said Thank You: lionel75

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

  • Posts: 228
  • Thank you received: 8
9 years 8 months ago #195341

Hi,

I' have a different issue with "1 item in stock". I have a multilingual site and for some reason the "1 item in stock" is showing on the non English site as well. All other values works fine and I get the translation o.k. but 1 will always show in English :(
Tried to play with the code and add a special JText for 1 item but that didn't work either:

if($this->row->product_quantity==1){
			if(JText::_('X_ITEM_IN_STOCK')=='X_ITEM_IN_STOCK'){
				$text = JText::_('1_ITEMS_IN_STOCK');
			}else{
				$text = JText::sprintf('X_ITEM_IN_STOCK');
			}
		}else{
			$text = JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity);
		}
		echo '<span class="hikashop_product_stock_count">'.$text.'<br/></span>';
		if($config->get('button_style','normal')=='css'){
			echo '<br />';
		}

Checked maybe I have a template override but no.

Can you please help?[/strike]

UPDATE
Just after posting this I've noticed the little S that was added to the language constant and found out that this X_ITEM_IN_STOCK was missing from my language files. Problem solved thank you very much :)

Last edit: 9 years 8 months ago by theguy.

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

Time to create page: 0.069 seconds
Powered by Kunena Forum