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

#   Hiding Price when an item is out of stock only?

##

- **[exlemor](/forum/user/119-exlemor "View exlemor's Profile")**
- [![exlemor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar119.jpg)](/forum/user/119-exlemor "View exlemor's Profile") Topic Author
- [ Offline](/forum/user/119-exlemor)

Less More

- Posts: 108
- Thank you received: 0
-
-

11 years 3 months ago [\#208734](#208734) by [exlemor](/forum/user/119-exlemor "View exlemor's Profile")  *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208734 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")* was created by *[exlemor](/forum/user/119-exlemor "View exlemor's Profile")*

-- url of the page with the problem -- : [ www.lotuswithingallery.com](http://www.lotuswithingallery.com)
-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.3
-- PHP version -- : 5.3.28
-- Browser(s) name and version -- : Safari 8.0.5

Salut, Nicolas, Xavier etc,

I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.

So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?

To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.

I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(

I'd really like to do this WITHOUT modifying a Hikashop View if possible.

Merci,

Emmanuel

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

11 years 3 months ago [\#208764](#208764) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208764 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Salut,

There is no setting to display/hide prices based on the stock of the product.
That will have to be done with a view override.
You can edit the file "listing_price" of the view "product" and add such code at the beginning:
&lt;?php if($this-&gt;row-&gt;product_quantity==0) return; ?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[exlemor](/forum/user/119-exlemor "View exlemor's Profile")**
- [![exlemor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar119.jpg)](/forum/user/119-exlemor "View exlemor's Profile") Topic Author
- [ Offline](/forum/user/119-exlemor)

Less More

- Posts: 108
- Thank you received: 0
-
-

11 years 3 months ago [\#208788](#208788) by [exlemor](/forum/user/119-exlemor "View exlemor's Profile")  Replied by *[exlemor](/forum/user/119-exlemor "View exlemor's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208788 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Salut Nicolas,

And what does the Master of Hikashop ![;)](/media/kunena/emoticons/24.png ";)") think of adding this option so that Galleries can still show off a piece of art that they 'had' but Sold successfully.

For a Gallery, 'hiding' the product is a detriment/bad thing because then the possible client doesn't see what sort of pieces
the Gallery collects. But pricing is something that is typically removed after the sale.

Ideally the option to do this would be at the product level so that there is the most flexibility - next to the Quantity Box perhaps? [This 'could' allow someone to also hide the price even when there is a quantity and if you were to go to that level [crossing double-fingers] THEN the next functionality would be a 'Ask for Price' feature just like you see on so many sites like NewEgg or Best Buy and others for those items for which they can not advertise the price but if you put it in your cart the price displays or you email them you find out the price

(crossing-fingers) that it will be in v2.5.1 ![;)](/media/kunena/emoticons/24.png ";)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

11 years 3 months ago [\#208793](#208793) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208793 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Hi,

I don't see the point of having an option to remove the display of the price after a sale.
In that case, simply delete the price from the product and you won't see it on the product page. You don't need it anyway once you sold the product.

And there is already a "ask for price" feature. You can turn it on with the option "Display a contact button on the product page" of the HikaShop configuration.

See, you don't even have to wait for the next version ![;)](/media/kunena/emoticons/24.png ";)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[exlemor](/forum/user/119-exlemor "View exlemor's Profile")**
- [![exlemor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar119.jpg)](/forum/user/119-exlemor "View exlemor's Profile") Topic Author
- [ Offline](/forum/user/119-exlemor)

Less More

- Posts: 108
- Thank you received: 0
-
-

11 years 3 months ago [\#208808](#208808) by [exlemor](/forum/user/119-exlemor "View exlemor's Profile")  Replied by *[exlemor](/forum/user/119-exlemor "View exlemor's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208808 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Salut Nicolas,

Without trying to sound mean or anything - HOW does that solve the problem?

Removing the price from an item does NOT solve the problem requested - as the item becomes 'Free'...

The only way around this would be to change Free to SOLD but then if the client wants to have SOLD items AND Free ones this method does not work ![:(](/media/kunena/emoticons/22.png ":(")

As for the Ask for a Price feature - Awesome - I hadn't understood that to be what Display a contact button on the product page but I guess it makes sense now ![:)](/media/kunena/emoticons/3.png ":)") thanks!

Cheers,

Emmanuel

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

11 years 3 months ago -  11 years 3 months ago [\#208816](#208816) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208816 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Hi,

I see what you mean, but I don't think that there is so much use for it that an option would be useful for enough people compare to the fact that there are already too many options.
Basically, from that discussion, it would only have an application when you have products with a limited quantity that you can replenish, that you don't want to display the price of the product after the sale, but that you still want to display the sold products, and that you also have free products.
On the other end, we have so much options that even though the contact feature has been there for years, and you've been using HikaShop for years, you didn't notice it.
In such rare cases, I would recommend to just add that one line of code in the listing_price view file. It's not like this view file is going to change much in the future anyway and we already have too many options so such option would just make it more confusing.

Also, note that there are several ways to make view overrides. The way you do, where you modify the code in the override file is not the best for forward compatibility. The best is actually to remove the whole code in the override and just include the original file. That way, you can add your condition at the top of the override in order to use or not the standard listing_price view file. So you get the updates to the view file and you still have that extra condition to it.

Last edit: 11 years 3 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[exlemor](/forum/user/119-exlemor "View exlemor's Profile")**
- [![exlemor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar119.jpg)](/forum/user/119-exlemor "View exlemor's Profile") Topic Author
- [ Offline](/forum/user/119-exlemor)

Less More

- Posts: 108
- Thank you received: 0
-
-

11 years 3 months ago [\#208857](#208857) by [exlemor](/forum/user/119-exlemor "View exlemor's Profile")  Replied by *[exlemor](/forum/user/119-exlemor "View exlemor's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208857 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Salut Nicolas,

" The way you do, where you modify the code in the override file is not the best for forward compatibility. The best is actually to remove the whole code in the override and just include the original file. That way, you can add your condition at the top of the override in order to use or not the standard listing_price view file. So you get the updates to the view file and you still have that extra condition to it."

I was doing it this way because that's what you guys had recommended years ago ![:(](/media/kunena/emoticons/22.png ":(") so if there is a new enter way AWESOME, the only problem is I didn't understand the explanation that you just gave for the better way?

Si c'est plus facile une explication en Français que je peux traduire?

Thanks as always,

Emmanuel

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

11 years 3 months ago [\#208861](#208861) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208861 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Hi,

That's what we recommended because it's the simplest to understand ![;)](/media/kunena/emoticons/24.png ";)")

Basically, you remove all the content of the file when you edit it via the menu Display&gt;Views, and instead, you add: Code:

&lt;?php if($this-&gt;row-&gt;product_quantity==0) return; include(HIKASHOP_ROOT.DS.'components'.DS.'com_hikashop'.DS.'views'.DS.'product'.DS.'tmpl'.DS.'listing_price.php');

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[exlemor](/forum/user/119-exlemor "View exlemor's Profile")**
- [![exlemor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar119.jpg)](/forum/user/119-exlemor "View exlemor's Profile") Topic Author
- [ Offline](/forum/user/119-exlemor)

Less More

- Posts: 108
- Thank you received: 0
-
-

11 years 3 months ago [\#208883](#208883) by [exlemor](/forum/user/119-exlemor "View exlemor's Profile")  Replied by *[exlemor](/forum/user/119-exlemor "View exlemor's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208883 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Salut Nicolas,

I did exactly as you described but it is not really matching expectation...

The product image is there, the description is but now the ENTIRE price/quantity block is gone.

So there is no SOLD or Free wording - it's all gone and if I look in the generated code:

&lt;div id="hikashop_product_right_part" class="hikashop_product_right_part "&gt;
&lt;div id="hikashop_product_vote_mini" class="hikashop_product_vote_mini"&gt;
&lt;/div&gt;
&lt;span id="hikashop_product_price_main" class="hikashop_product_price_main"&gt;
&lt;/span&gt;
&lt;br&gt;
&lt;br&gt;
&lt;span id="hikashop_product_price_with_options_main" class="hikashop_product_price_with_options_main"&gt;
&lt;/span&gt;
&lt;div id="hikashop_product_quantity_main" class="hikashop_product_quantity_main"&gt;
&lt;/div&gt;
&lt;div id="hikashop_product_contact_main" class="hikashop_product_contact_main"&gt;
&lt;/div&gt;
&lt;div id="hikashop_product_tags_main" class="hikashop_product_tags"&gt;&lt;/div&gt;
&lt;span id="hikashop_product_id_main" class="hikashop_product_id_main"&gt;
&lt;input type="hidden" name="product_id" value="372"&gt;
&lt;/span&gt;
&lt;/div&gt;

it doesn't seem to have been generated at all... [no errors or warnings either]

[See screenshot]

Any idea?

- [ ![screenshot&#95;114.jpg](/forum/attachment/25580) ](/forum/attachment/25580 "...enshot&#95;114.jpg") [ ](/forum/attachment/25580?download=1 "...enshot&#95;114.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

11 years 3 months ago [\#208897](#208897) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208897 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Hi,

Would it be possible that you didn't edit the file "listing_price" but another one ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[exlemor](/forum/user/119-exlemor "View exlemor's Profile")**
- [![exlemor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar119.jpg)](/forum/user/119-exlemor "View exlemor's Profile") Topic Author
- [ Offline](/forum/user/119-exlemor)

Less More

- Posts: 108
- Thank you received: 0
-
-

11 years 3 months ago [\#208975](#208975) by [exlemor](/forum/user/119-exlemor "View exlemor's Profile")  Replied by *[exlemor](/forum/user/119-exlemor "View exlemor's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208975 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Hi Nicolas,

I wish...

You made me doubt so I checked but it was the right template and Product ---&gt; listing_price, wasn't it?

If so --- ![:(](/media/kunena/emoticons/22.png ":(")

Cheers,

Emmanuel.

- [ ![screenshot&#95;115.jpg](/forum/attachment/25601) ](/forum/attachment/25601 "...enshot&#95;115.jpg") [ ](/forum/attachment/25601?download=1 "...enshot&#95;115.jpg")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

11 years 3 months ago [\#208976](#208976) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#208976 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Hi,

I don't see why it would delete anything else besides the price area on the product page.
If you remove the change, does it display the other areas ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[exlemor](/forum/user/119-exlemor "View exlemor's Profile")**
- [![exlemor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar119.jpg)](/forum/user/119-exlemor "View exlemor's Profile") Topic Author
- [ Offline](/forum/user/119-exlemor)

Less More

- Posts: 108
- Thank you received: 0
-
-

11 years 3 months ago -  11 years 3 months ago [\#209008](#209008) by [exlemor](/forum/user/119-exlemor "View exlemor's Profile")  Replied by *[exlemor](/forum/user/119-exlemor "View exlemor's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#209008 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Salut Nicolas,

If I remove the change and bring back the file to the original version [no modifications],
then it shows Free (I have set the price to 0 for this item) as you had suggested.

but doesn't help.

Cheers,

Emmanuel.

- [ ![screenshot&#95;117.jpg](/forum/attachment/25606) ](/forum/attachment/25606 "...enshot&#95;117.jpg") [ ](/forum/attachment/25606?download=1 "...enshot&#95;117.jpg")

Last edit: 11 years 3 months ago by [exlemor](/forum/user/119-exlemor "View exlemor's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86555
- Thank you received: 14304
-
-

11 years 3 months ago [\#209027](#209027) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#209027 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Hi,

Wait I'm not following you.
You want to remove the price when the quantity of the product is 0:
[ www.hikashop.com/forum/product-category-...ock-only.html#208734](http://www.hikashop.com/forum/product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only.html#208734)

That's what this modification does.
So it's normal that you don't see the word "free" if you have that modification and a stock of 0, regardless of whether you have a price or not for the product.
And it's normal that you see the word free if you remove that modification and that you don't have a price for that product.

What is the problem then ?

The following user(s) said Thank You: [exlemor](/forum/user/119-exlemor "View exlemor's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[exlemor](/forum/user/119-exlemor "View exlemor's Profile")**
- [![exlemor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar119.jpg)](/forum/user/119-exlemor "View exlemor's Profile") Topic Author
- [ Offline](/forum/user/119-exlemor)

Less More

- Posts: 108
- Thank you received: 0
-
-

11 years 3 months ago [\#209140](#209140) by [exlemor](/forum/user/119-exlemor "View exlemor's Profile")  Replied by *[exlemor](/forum/user/119-exlemor "View exlemor's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#209140 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Salut Nicolas,

I guess this is a case of not 100% understanding each other...

I will try to explain it better.

This is for a Gallery type website [but they do have a physical store as well FYI], the aim is to have it still say SOLD
YET no ability to buy the product and still have it SHOW the product AND still give us the ability to have Free products for other products.

This ideally can be achieved by this new method of overriding that you showed me AND changing a couple of language strings
like FREE_PRICE="Free" or other language strings if need be...

I hope this helps!

Cheers, Emmanuel.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 3 months ago [\#209162](#209162) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#209162 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Hi,

So you can use the code given by Nicolas previously with a little modification, so add the following code at the top of the view "product / listing_price" (between php tags): Code:

if($this-&gt;row-&gt;product_quantity==0){ echo JText::_('SOLD'); return; }

This way if the product is sold so the quantity is set to "0", so the "SOLD" message will be displayed and not the price, and the "Free" text will still be displayed for the free products.

The following user(s) said Thank You: [exlemor](/forum/user/119-exlemor "View exlemor's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[exlemor](/forum/user/119-exlemor "View exlemor's Profile")**
- [![exlemor's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar119.jpg)](/forum/user/119-exlemor "View exlemor's Profile") Topic Author
- [ Offline](/forum/user/119-exlemor)

Less More

- Posts: 108
- Thank you received: 0
-
-

11 years 3 months ago -  11 years 3 months ago [\#209242](#209242) by [exlemor](/forum/user/119-exlemor "View exlemor's Profile")  Replied by *[exlemor](/forum/user/119-exlemor "View exlemor's Profile")* on topic *[SOLVED: Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#209242 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Salut Xavier et Nicolas,

EUREKA - je crois bien! ![:)](/media/kunena/emoticons/3.png ":)")

Merci...

Cheers,

Emmanuel.

Last edit: 11 years 3 months ago by [exlemor](/forum/user/119-exlemor "View exlemor's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[vectoronline](/forum/user/43335-vectoronline "View vectoronline's Profile")**
- [![vectoronline's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/43335-vectoronline "View vectoronline's Profile")
- [ Offline](/forum/user/43335-vectoronline)

Less More

- Posts: 6
- Thank you received: 0
-
-

9 years 8 months ago [\#264718](#264718) by [vectoronline](/forum/user/43335-vectoronline "View vectoronline's Profile")  Replied by *[vectoronline](/forum/user/43335-vectoronline "View vectoronline's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#264718 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Hello,

I did this, it works but and now the **cart total value** is missing!
Is there a way to hide the price of the sold out products AND show the total?

Regards,
Eric

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

9 years 8 months ago [\#264797](#264797) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Hiding Price when an item is out of stock only?](/forum/26-product-category-display/878232-hiding-price-when-an-item-is-out-of-stock-only#264797 "-- url of the page with the problem -- :   www.lotuswithingallery.com  -- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.3 -- PHP version -- : 5.3.28 -- Browser(s) name and version -- : Safari 8.0.5  Salut, Nicolas, Xavier etc,  I have a client who is more like a gallery and wants to hide the price of an item when the item has sold but YET show that it is sold.  So I can change the 'No Stock' language string to 'SOLD', but that doesn't solve the part about removing/hiding the price.... HELP?  To be clear, this is only supposed to hide the price WHEN the item has a stock of 0.  I tried looking in the forums or in the configuration for such a feature/idea but no luck ;(  I'd really like to do this WITHOUT modifying a Hikashop View if possible.  Merci,  Emmanuel")*

Hello,

Please open a new thread for your question and provide basic details.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzgyMzItaGlkaW5nLXByaWNlLXdoZW4tYW4taXRlbS1pcy1vdXQtb2Ytc3RvY2stb25seT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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.115 seconds

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