- Posts: 7
- Thank you received: 0
Re: Hiding the stock count on the product pages
- guns1inger
-
Topic Author
- Offline
Another alternative would be to change the text to read "Still in stock" or "out of stock" as the case maybe, without showing the actual numbers.
It appears to be in the Views -> Products -> Show code, but my PHP isn't good enough to make the changes needed.
A little help would be appreciated.
Please Log in or Create an account to join the conversation.
.hikashop_product_quantity_main{display:none;}
Please Log in or Create an account to join the conversation.
- guns1inger
-
Topic Author
- Offline
- Posts: 7
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- guns1inger
-
Topic Author
- Offline
- Posts: 7
- Thank you received: 0
Please Log in or Create an account to join the conversation.
So you have two solutions:
1. Change the translations in the config under the tab languages. You can change the text or even empty it so that your users don't see the message.
2. Edit the file quantity of the view product via the menu Display->Views and remove the code:
echo JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity);
Please Log in or Create an account to join the conversation.
- guns1inger
-
Topic Author
- Offline
- Posts: 7
- Thank you received: 0
Again, thanks for your fast response.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
You can also try the CSS modification I provided at the beginning. That should work too...
The line $this->params->set('show_quantity_field', 0); is not to remove the stock level but to remove the quantity input filed next to the add to cart button.
Please Log in or Create an account to join the conversation.
product / show.php (in the more recent revisions of hikashop doesnt contain the stock level line does it)
Please Log in or Create an account to join the conversation.
It's the file quantity of the view product.
The line has slightly changed though. It's now:
echo '<span class="hikashop_product_stock_count">'.JText::sprintf('X_ITEMS_IN_STOCK',$this->row->product_quantity).'</span><br/>';
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The stock counts will still be available in the raw html but not viewable in the browser.
The other option be to remove some text in the product > quantity view but that requires altering the view.
Thanks! -- Steven
Please Log in or Create an account to join the conversation.
Thanks!
Please Log in or Create an account to join the conversation.
Yes. Change the translation key X_ITEMS_IN_STOCK to "In Stock" with a translation override:
hikashop.com/download/languages.html#modify
Please Log in or Create an account to join the conversation.
Joomla 3.6.2
Hikashop 2.6.3
Please Log in or Create an account to join the conversation.
The solutions did not changed.
I am afraid that I don't understand your question.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.