[Skip to main content](#vessel-content)

#   Removing or styling Product Qty

##

- **[DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile")**
- [![DSCulp's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-10.jpg)](/forum/user/15687-dsculp "View DSCulp's Profile") Topic Author
- [ Offline](/forum/user/15687-dsculp)

Less More

- Posts: 9
- Thank you received: 0
-
-
-

6 years 1 month ago -  6 years 1 month ago [\#323877](#323877) by [DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile")  *[Removing or styling Product Qty](/forum/26-product-category-display/900782-removing-or-styling-product-qty#323877 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.6.40 -- Browser(s) name and version -- : Firefox 80.0.1  Background: I am responsible for maintaining a legacy website. This means that the client is VERY resistant to change so updates only occur when absolutely necessary. My skills as a web designer are limited and my grasp of .php is negligent but I fumble through. :dry:  WAS working with Joomla 2.5.28 and Hikashop 2.3.5  Something changed recently (probably hosting configuration) that meant that I was no longer able to add or edit products. (gives a 403 error on creation/edit or even cancel)  So....was able to convince client that it was time to upgrade. Upgrading fixed the issue but....because of the extreme change in versions I am now faced with re-styling MANY of the features of the webpage to get things back to looking the way they did. :angry:  Currently redoing everything with Joomla 2.5.28 and Hikashop 4.3.0  Issue: In the previous version I was able to hide the Qty by editing the (X&#95;ITEMS&#95;IN&#95;STOCK) in the language file. Additionally the program provided a class (.hikashop&#95;product&#95;no&#95;stock) when there were no items in stock that allowed me to style something when it was sold out.  See example:  The new version does not do this!! Editing the language file does not hide the Qty. and the out of stock class is not created. Can someone help me figure out how to duplicate the results of the previous version?")* was created by *[DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile")*

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 2.5.28
-- PHP version -- : 5.6.40
-- Browser(s) name and version -- : Firefox 80.0.1

**Background:**
I am responsible for maintaining a legacy website. This means that the client is VERY resistant to change so updates only occur when absolutely necessary.
My skills as a web designer are limited and my grasp of .php is negligent but I fumble through. :dry:

**WAS working with Joomla 2.5.28 and Hikashop 2.3.5**

Something changed recently (probably hosting configuration) that meant that I was no longer able to add or edit products. (gives a 403 error on creation/edit or even cancel)

So....was able to convince client that it was time to upgrade. Upgrading fixed the issue but....because of the extreme change in versions I am now faced with re-styling MANY of the features of the webpage to get things back to looking the way they did. ![:angry:](/media/kunena/emoticons/23.png ":angry:")

**Currently redoing everything with Joomla 2.5.28 and Hikashop 4.3.0**

**Issue:**
In the previous version I was able to hide the Qty by editing the (X_ITEMS_IN_STOCK) in the language file. Additionally the program provided a class (.hikashop_product_no_stock) when there were no items in stock that allowed me to style something when it was sold out.

See example:  [ ![Hikashop.jpg](/forum/attachment/50541) ](/forum/attachment/50541 "Hikashop.jpg")

The new version does not do this!! Editing the language file does not hide the Qty. and the out of stock class is not created. Can someone help me figure out how to duplicate the results of the previous version?

- [ ![Hikashop.jpg](/forum/attachment/50541) ](/forum/attachment/50541 "Hikashop.jpg") [ ](/forum/attachment/50541?download=1 "Hikashop.jpg")

Last edit: 6 years 1 month ago by [DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile"). Reason: Bad formatting, confusing

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDA3ODItcmVtb3Zpbmctb3Itc3R5bGluZy1wcm9kdWN0LXF0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86322
- Thank you received: 14279
-
-

6 years 1 month ago [\#323878](#323878) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Removing or styling Product Qty](/forum/26-product-category-display/900782-removing-or-styling-product-qty#323878 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.6.40 -- Browser(s) name and version -- : Firefox 80.0.1  Background: I am responsible for maintaining a legacy website. This means that the client is VERY resistant to change so updates only occur when absolutely necessary. My skills as a web designer are limited and my grasp of .php is negligent but I fumble through. :dry:  WAS working with Joomla 2.5.28 and Hikashop 2.3.5  Something changed recently (probably hosting configuration) that meant that I was no longer able to add or edit products. (gives a 403 error on creation/edit or even cancel)  So....was able to convince client that it was time to upgrade. Upgrading fixed the issue but....because of the extreme change in versions I am now faced with re-styling MANY of the features of the webpage to get things back to looking the way they did. :angry:  Currently redoing everything with Joomla 2.5.28 and Hikashop 4.3.0  Issue: In the previous version I was able to hide the Qty by editing the (X&#95;ITEMS&#95;IN&#95;STOCK) in the language file. Additionally the program provided a class (.hikashop&#95;product&#95;no&#95;stock) when there were no items in stock that allowed me to style something when it was sold out.  See example:  The new version does not do this!! Editing the language file does not hide the Qty. and the out of stock class is not created. Can someone help me figure out how to duplicate the results of the previous version?")*

Hi,

Translation override is still the way to go.
Note that before there was only one translation key to change but there are now two: one for the quantity is 1 and one when it's more than one. That was changed years ago so that the text could handle the singular/plurar.

Now you're right that the hikashop_product_no_stock class is gone.
But you can add one if you want by adding a translation override on NO_STOCK. For example: Code:

NO_STOCK="&lt;span class='hikashop_product_no_stock'&gt;No stock&lt;/span&gt;"

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDA3ODItcmVtb3Zpbmctb3Itc3R5bGluZy1wcm9kdWN0LXF0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile")**
- [![DSCulp's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-10.jpg)](/forum/user/15687-dsculp "View DSCulp's Profile") Topic Author
- [ Offline](/forum/user/15687-dsculp)

Less More

- Posts: 9
- Thank you received: 0
-
-
-

6 years 1 month ago -  6 years 1 month ago [\#323889](#323889) by [DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile")  Replied by *[DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile")* on topic *[Removing or styling Product Qty](/forum/26-product-category-display/900782-removing-or-styling-product-qty#323889 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.6.40 -- Browser(s) name and version -- : Firefox 80.0.1  Background: I am responsible for maintaining a legacy website. This means that the client is VERY resistant to change so updates only occur when absolutely necessary. My skills as a web designer are limited and my grasp of .php is negligent but I fumble through. :dry:  WAS working with Joomla 2.5.28 and Hikashop 2.3.5  Something changed recently (probably hosting configuration) that meant that I was no longer able to add or edit products. (gives a 403 error on creation/edit or even cancel)  So....was able to convince client that it was time to upgrade. Upgrading fixed the issue but....because of the extreme change in versions I am now faced with re-styling MANY of the features of the webpage to get things back to looking the way they did. :angry:  Currently redoing everything with Joomla 2.5.28 and Hikashop 4.3.0  Issue: In the previous version I was able to hide the Qty by editing the (X&#95;ITEMS&#95;IN&#95;STOCK) in the language file. Additionally the program provided a class (.hikashop&#95;product&#95;no&#95;stock) when there were no items in stock that allowed me to style something when it was sold out.  See example:  The new version does not do this!! Editing the language file does not hide the Qty. and the out of stock class is not created. Can someone help me figure out how to duplicate the results of the previous version?")*

Excellent, that solved part of the problem but the translation override for X_ITEMS_IN_STOCK doesn't seem to hide the Qty like it used to.

I tried to do it with **X\_ITEMS\_IN\_STOCK=""** (used to work) and then tried  **.hikashop\_product\_stock\_count {display: none}** in my .css but that hides everything, including the **NO\_STOCK** option. ![:(](/media/kunena/emoticons/22.png ":(")

To recap:
I would like to hide the Qty when there are items in stock and show SORRY IT'S SOLD when we are sold out.

Thank you so much for your help so far!! Certainly didn't think about embedding .css in the language override so that was a revelation!! :woohoo:

Last edit: 6 years 1 month ago by [DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile"). Reason: correction

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDA3ODItcmVtb3Zpbmctb3Itc3R5bGluZy1wcm9kdWN0LXF0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile")**
- [![DSCulp's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar_2013-04-10.jpg)](/forum/user/15687-dsculp "View DSCulp's Profile") Topic Author
- [ Offline](/forum/user/15687-dsculp)

Less More

- Posts: 9
- Thank you received: 0
-
-
-

6 years 1 month ago -  6 years 1 month ago [\#323896](#323896) by [DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile")  Replied by *[DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile")* on topic *[Removing or styling Product Qty](/forum/26-product-category-display/900782-removing-or-styling-product-qty#323896 "-- HikaShop version -- : 4.3.0 -- Joomla version -- : 2.5.28 -- PHP version -- : 5.6.40 -- Browser(s) name and version -- : Firefox 80.0.1  Background: I am responsible for maintaining a legacy website. This means that the client is VERY resistant to change so updates only occur when absolutely necessary. My skills as a web designer are limited and my grasp of .php is negligent but I fumble through. :dry:  WAS working with Joomla 2.5.28 and Hikashop 2.3.5  Something changed recently (probably hosting configuration) that meant that I was no longer able to add or edit products. (gives a 403 error on creation/edit or even cancel)  So....was able to convince client that it was time to upgrade. Upgrading fixed the issue but....because of the extreme change in versions I am now faced with re-styling MANY of the features of the webpage to get things back to looking the way they did. :angry:  Currently redoing everything with Joomla 2.5.28 and Hikashop 4.3.0  Issue: In the previous version I was able to hide the Qty by editing the (X&#95;ITEMS&#95;IN&#95;STOCK) in the language file. Additionally the program provided a class (.hikashop&#95;product&#95;no&#95;stock) when there were no items in stock that allowed me to style something when it was sold out.  See example:  The new version does not do this!! Editing the language file does not hide the Qty. and the out of stock class is not created. Can someone help me figure out how to duplicate the results of the previous version?")*

Nevermind, I got it!! :woohoo:

Again, thanks to you! I couldn't figure out what was going on. The Qty string appeared to be hardcoded since nothing I did would change it.

Then I reread your comment:
*"Note that before there was only one translation key to change but there are now two: **one for the quantity is 1 and one when it's more than one**. That was changed years ago so that the text could handle the singular/plurar."*

I realized that my Language file only had ONE entry for Qty and I had been making all of the changes to the X_ITEMS_IN_STOCK and I only had single items. Adding the second entry for single items and then altering it to **X\_ITEM\_IN\_STOCK=""** did the trick, just like it used to!! ![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

Last edit: 6 years 1 month ago by [DSCulp](/forum/user/15687-dsculp "View DSCulp's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI2LXByb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS85MDA3ODItcmVtb3Zpbmctb3Itc3R5bGluZy1wcm9kdWN0LXF0eT90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.062 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
