Hide stock display - for reals

  • Posts: 20
  • Thank you received: 2
9 years 6 months ago #175519

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 2.5.24
-- PHP version -- : 5.3.10
-- Browser(s) name and version -- : Firefox 32.0.3
-- Error-message(debug-mod must be tuned on) -- : No error message.

Hikashop is a mostly wonderful product. But there are some things I would like to do that are surprisingly hard to figure out. Even after reading every line of documentation and also turning to theese forums and looking around for a long time. Which I have done. :)

Turn off the display of how much there are in stock
There are several reasons why I would not like my stock to be displayed to the world on each and every product and at the same time want to use the feature of Hikshop knowing about what is in stock and isn't.

My question:
How do I turn off the display of this text? (From the language file).

X_ITEMS_IN_STOCK="%s items in stock"

I want to turn this off, both in the product listing and also on the product page.

I did find this trick to add this line to the end of the CSS-file (to the custom.css-file for instance) you find here:

Hikashop admin > System > Configuration > Display > CSS > hit the edit icon in the form of a pencil > the css-file is show, then add this in the end:

/* HIDE STOCK*/
.hikashop_product_stock_count {
display: none;
}

That trick is mentioned in this thread:

HIDE QUANTITY ON PRODUCT PAGE:
www.hikashop.com/forum/product-category-...on-product-page.html

But this only hides it from view. It is still seen in the HTML-source. I really need this gone, and to hide it for reals. This is left in the source:
<span class="hikashop_product_stock_count">110 item in stock<br/></span>

How do I do that? Remove in stock display completely ?

This thread talks about same trick and also about hiding the quantity using views overrides. But I just can't figure out wich one of the many files I'm supposed to edit and hide the stock count message with what code.

NO STOCK DISPLAY
www.hikashop.com/forum/product-category-...o-stock-display.html

I look forward to this being a feature in the settings, to hide the in stock message completley (as mentioned in a thread about 8 months ago).

Appreciate the help I have gotten before. Thanks in advance for this.

/Ola

Attachments:
Last edit: 9 years 6 months ago by Taz_1999.
The following user(s) said Thank You: Laci

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

  • Posts: 13201
  • Thank you received: 2322
9 years 6 months ago #175542

Hi,

I think that a simple translation override is enough. ;)
Add the following override in the language file:

X_ITEMS_IN_STOCK=""
X_ITEM_FOR_X=""
X_ITEM_IN_STOCK=""

hikashop.com/support/faq.html#tran

The following user(s) said Thank You: Taz_1999, haraldundandrea

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

  • Posts: 20
  • Thank you received: 2
9 years 6 months ago #175821

Thank you, that worked.

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

  • Posts: 75
  • Thank you received: 0
9 years 4 months ago #184988

hi
I also want to move this field. Where exactly do I need to add this code? In my language file? I don't get it.
Sorry, I am totally new in Hikashop.
/Christina


/Christina

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

  • Posts: 75
  • Thank you received: 0
9 years 4 months ago #184990

sorry I found it ofcourse after I wrote my comment, after hours of searching. It was in my configuration - product - Display the quantity field on the product page.
I still have a small issue with the line "1 item in stock" how can I remove this to?


/Christina
Last edit: 9 years 4 months ago by Sunshine.

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

  • Posts: 81604
  • Thank you received: 13082
  • MODERATOR
9 years 4 months ago #185009

You can do that with a translation override, as Xavier explained:
www.hikashop.com/forum/product-category-...or-reals.html#175542
Make sure that you go to the link Xavier gave where it explains how to do translation overrides.

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

  • Posts: 75
  • Thank you received: 0
9 years 4 months ago #185047

Yes, I read that and did not understand it. The FAQ goes to how to translate the shop? Does this have something to do with a translation? I don get it. :-/


/Christina

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

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #185069

@Sunshine:
Nicolas is right, the "translation override" will do, and so will the classic Joomla "language override", which might be the easier thing for you to do. Here is a fairly simple and brief part of the Joomla documentation on this, valid for Joomla 3.x: docs.joomla.org/J3.x:Language_Overrides_in_Joomla


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: Sunshine

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

  • Posts: 75
  • Thank you received: 0
9 years 4 months ago #185116

Thank you "lousyfool", now I understand it.
I made a new constant in each language, got 3 of them, with this string

X_ITEMS_IN_STOCK=""
X_ITEM_FOR_X=""
X_ITEM_IN_STOCK=""

But the line "x items in stock" didn't disapear :(
Any ideas why?
/Christina


/Christina

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

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #185147

Uhmm, maybe I'm confused what you want and what the status at your end is.

I'm seeing on your Swedish page:
X_ITEM_IN_STOCK="%s item in stock"
X_ITEMS_IN_STOCK="%s varer på lager"

Which IMHO hasn't got much to do with what you said in your previous post at all. Unless I'm totally not getting something, of course.
Allow me to ask as well: Any ideas why? ;)


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )

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

  • Posts: 75
  • Thank you received: 0
9 years 4 months ago #185149

lousyfool wrote: Uhmm, maybe I'm confused what you want and what the status at your end is.

I'm seeing on your Swedish page:
X_ITEM_IN_STOCK="%s item in stock"
X_ITEMS_IN_STOCK="%s varer på lager"

Which IMHO hasn't got much to do with what you said in your previous post at all. Unless I'm totally not getting something, of course.
Allow me to ask as well: Any ideas why? ;)


What does IMHO means?
With the question "any ideas why", I wanted your ideas on why the "item in stock" didn't go away (:

What I want is to make the text "Varer på lager" removed, sorry for not being clear.

by the way, how did you find the swedish site, even I didn't get to that part yet.. :woohoo:


/Christina

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

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #185195

Uh, should have been "Danish", I guess? Sorry... ;)
IMHO = in my humble opinion

Check if in the folder /language you have another folder named /overrides, and inside that one file(s) in the format "en-GB.override.ini" (example for English). If not, or if your translation override strings are not inside these files, something went probably wrong in your override process.
Yes, you can open and edit these files with a code editor or a decent text editor capable of UTF-8, and then or later add other strings or further modify existing ones directly to these files.

If anything went wrong, it's hard to tell from here what that could have been as we don't know each of your steps. Then your options are probably carefully repeating and trying again, or have an expert looking at the backend of your site.


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: Sunshine

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

  • Posts: 75
  • Thank you received: 0
9 years 4 months ago #185204

Thank you, for taking your time on this
They are there, the strings.In all language files.
They look like this:
FJERNERITEMINSTOCKTEKSTEN="X_ITEMS_IN_STOCK="_QQ_""_QQ_"\nX_ITEM_FOR_X="_QQ_""_QQ_"\nX_ITEM_IN_STOCK="_QQ_""_QQ_""

The first odd word is the topic, I hope that is right? Or maybe that doesn't effect anything.
Do you think this has something to do with my template? Then I will contact a supporter for that (:


/Christina

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

  • Posts: 2143
  • Thank you received: 747
9 years 4 months ago #185213

See, something did go wrong.

Replace that funky stuff with what you had planned for before, and all should be good:

X_ITEMS_IN_STOCK=""
X_ITEM_FOR_X=""
X_ITEM_IN_STOCK=""
and/or what you prefer within the quotes ("...").


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: Sunshine

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

  • Posts: 75
  • Thank you received: 0
9 years 4 months ago #185248

I feel so STUPID, now I understand how grazy that is, that code I had in my ini files. sorry for being so sloooow.
Can I do antoher code for the "per enhed" you se right beside the price her www.butik.meisolle.com/index.php/sma-ting ?
I don't want that either. I only have one of each so it is a bit pointless. I can't find a configuration in the back that will remove it.


/Christina

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

  • Posts: 2143
  • Thank you received: 747
9 years 3 months ago #185303

Sunshine wrote: Can I do antoher code for the "per enhed" you se right beside the price her www.butik.meisolle.com/index.php/sma-ting ?
I don't want that either.

PER_UNIT=""


Need help with customisations of layouts, style or other site development? PM me!
(Don't forget to turn on "E-mail notification of new messages" )
The following user(s) said Thank You: Sunshine

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

  • Posts: 75
  • Thank you received: 0
9 years 3 months ago #185306

thank you, now it looks beautiful (:


/Christina

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

  • Posts: 13201
  • Thank you received: 2322
9 years 3 months ago #185266

Hi,

You need to override the translation key:

PER_UNIT=""

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

  • Posts: 75
  • Thank you received: 0
9 years 3 months ago #185368

Yes ;-)


/Christina

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

Time to create page: 0.123 seconds
Powered by Kunena Forum