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

#   remove prices from certain category listings

##

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

Less More

- Posts: 19
- Thank you received: 0
-
-

13 years 10 months ago -  13 years 10 months ago [\#83620](#83620) by [skullboy74](/forum/user/9936-skullboy74 "View skullboy74's Profile")  *[remove prices from certain category listings](/forum/4-how-to/77079-remove-prices-from-certain-category-listings#83620 "Hi all. Read through what I could find and don't think the responses fit my needs. First, I'm a hypernewb when it comes to hika &amp; php coding - so bare with me.  Ideally, I would like to have some some snippet that would do something like... ... when variants occur on a product, hide price shown in category listing.  But again, hypernewb - so I don't know if this even possible.  I'm currently setting up a store in which some categories will have items with variants, and others will not. &#91; Category A &#93;: Original Paintings (no variants) &#91; Category B &#93;: Prints and Posters (variants)  I would like to list products in Category A with prices. I would like to list products in Category B without prices until the product has been selected. Then I have different prices for different variations.  Currently I have different descripts/prices for a product in Category B and it works great when changing between the variants.  HikaShop Info: HikaShop Business ver 2.0.0  Thanks for any help. And sorry if I'm missing any important needed info.")* was created by *[skullboy74](/forum/user/9936-skullboy74 "View skullboy74's Profile")*

Hi all. Read through what I could find and don't think the responses fit my needs.
First, I'm a hypernewb when it comes to hika &amp; php coding - so bare with me.

Ideally, I would like to have some some snippet that would do something like...
... when variants occur on a product, hide price shown in category listing.

But again, hypernewb - so I don't know if this even possible.

I'm currently setting up a store in which some categories will have items with variants, and others will not.
[ Category A ]: Original Paintings (no variants)
[ Category B ]: Prints and Posters (variants)

I would like to list products in Category A with prices.
I would like to list products in Category B without prices until the product has been selected. Then I have different prices for different variations.

Currently I have different descripts/prices for a product in Category B and it works great when changing between the variants.

HikaShop Info: **HikaShop Business** ver 2.0.0

Thanks for any help. And sorry if I'm missing any important needed info.

Last edit: 13 years 10 months ago by [skullboy74](/forum/user/9936-skullboy74 "View skullboy74's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MDc5LXJlbW92ZS1wcmljZXMtZnJvbS1jZXJ0YWluLWNhdGVnb3J5LWxpc3RpbmdzP3RtcGw9bWFya2Rvd24=) 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: 14280
-
-

13 years 9 months ago [\#83926](#83926) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[remove prices from certain category listings](/forum/4-how-to/77079-remove-prices-from-certain-category-listings#83926 "Hi all. Read through what I could find and don't think the responses fit my needs. First, I'm a hypernewb when it comes to hika &amp; php coding - so bare with me.  Ideally, I would like to have some some snippet that would do something like... ... when variants occur on a product, hide price shown in category listing.  But again, hypernewb - so I don't know if this even possible.  I'm currently setting up a store in which some categories will have items with variants, and others will not. &#91; Category A &#93;: Original Paintings (no variants) &#91; Category B &#93;: Prints and Posters (variants)  I would like to list products in Category A with prices. I would like to list products in Category B without prices until the product has been selected. Then I have different prices for different variations.  Currently I have different descripts/prices for a product in Category B and it works great when changing between the variants.  HikaShop Info: HikaShop Business ver 2.0.0  Thanks for any help. And sorry if I'm missing any important needed info.")*

Hi,

If you browse your categories via two different menus, in the hikashop options of each menus, you can change the "show prices" option to show the prices or not on the listing.

If you want to have both categories browsable via only one menu, then I'm afraid that you can't do that without PHP modification. But you can do the opposite and with the display price method option of your menu's hikashop options screen, you can set it to display a range of the prices (the lowest and the highest).

If you want to to do it via code change, you can add the code:
&lt;?php if(!empty($this-&gt;row-&gt;has_options)) return true; ?&gt;
at the beginning of the 'listing_img_title' file of the view "product" via the menu Display-&gt;Views.

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

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

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

Less More

- Posts: 19
- Thank you received: 0
-
-

13 years 9 months ago [\#84302](#84302) by [skullboy74](/forum/user/9936-skullboy74 "View skullboy74's Profile")  Replied by *[skullboy74](/forum/user/9936-skullboy74 "View skullboy74's Profile")* on topic *[remove prices from certain category listings](/forum/4-how-to/77079-remove-prices-from-certain-category-listings#84302 "Hi all. Read through what I could find and don't think the responses fit my needs. First, I'm a hypernewb when it comes to hika &amp; php coding - so bare with me.  Ideally, I would like to have some some snippet that would do something like... ... when variants occur on a product, hide price shown in category listing.  But again, hypernewb - so I don't know if this even possible.  I'm currently setting up a store in which some categories will have items with variants, and others will not. &#91; Category A &#93;: Original Paintings (no variants) &#91; Category B &#93;: Prints and Posters (variants)  I would like to list products in Category A with prices. I would like to list products in Category B without prices until the product has been selected. Then I have different prices for different variations.  Currently I have different descripts/prices for a product in Category B and it works great when changing between the variants.  HikaShop Info: HikaShop Business ver 2.0.0  Thanks for any help. And sorry if I'm missing any important needed info.")*

The code snippet worked. Too well.
Took and hid EVERYTHING if I put it at the top.
I tried putting it in the Price section and that worked. But it still hid everything below.
So I then moved the entire Price section to the bottom
Code:

&lt;!-- PRODUCT PRICE --&gt; &lt;?php if(!empty($this-&gt;row-&gt;has_options)) return true; ?&gt; &lt;?php } if($this-&gt;params-&gt;get('show_price','-1')=='-1'){ $config =&amp; hikashop_config(); $this-&gt;params-&gt;set('show_price',$config-&gt;get('show_price')); } if($this-&gt;params-&gt;get('show_price')){ $this-&gt;setLayout('listing_price'); echo $this-&gt;loadTemplate(); } ?&gt; &lt;!-- EO PRODUCT PRICE --&gt;

to just before Code:

&lt;?php if(!empty($this-&gt;row-&gt;extraData-&gt;bottom)) { echo implode("\r\n",$this-&gt;row-&gt;extraData-&gt;bottom); } ?&gt;

And it works exactly how I invisioned it!!!
Now It shows prices for non-varianted products, and hides the prices on the variented products.
AWESOME!

Thanks so much Nicolas!!!!

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

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

Less More

- Posts: 19
- Thank you received: 0
-
-

13 years 9 months ago -  13 years 9 months ago [\#84304](#84304) by [skullboy74](/forum/user/9936-skullboy74 "View skullboy74's Profile")  Replied by *[skullboy74](/forum/user/9936-skullboy74 "View skullboy74's Profile")* on topic *[remove prices from certain category listings](/forum/4-how-to/77079-remove-prices-from-certain-category-listings#84304 "Hi all. Read through what I could find and don't think the responses fit my needs. First, I'm a hypernewb when it comes to hika &amp; php coding - so bare with me.  Ideally, I would like to have some some snippet that would do something like... ... when variants occur on a product, hide price shown in category listing.  But again, hypernewb - so I don't know if this even possible.  I'm currently setting up a store in which some categories will have items with variants, and others will not. &#91; Category A &#93;: Original Paintings (no variants) &#91; Category B &#93;: Prints and Posters (variants)  I would like to list products in Category A with prices. I would like to list products in Category B without prices until the product has been selected. Then I have different prices for different variations.  Currently I have different descripts/prices for a product in Category B and it works great when changing between the variants.  HikaShop Info: HikaShop Business ver 2.0.0  Thanks for any help. And sorry if I'm missing any important needed info.")*

Scratch the last post. ![:)](/media/kunena/emoticons/3.png ":)") (I know I could edit it but it did work)
It worked fine but I got to wondering.
I wondered why I was supposed to put this code in the

> beginning of the 'listing\_img\_title' file of the view "product" via the menu Display-&gt;Views.

I removed the code from the *listing\_img\_title*.
I instead put it at the beginning of *listing\_price.php*.

Works fine. ![:)](/media/kunena/emoticons/3.png ":)")
So for anyone who wants to hide product prices for products with variants:
Display / Views / {Template for the Store } {product} : [listing\_price.php](/?page=listing_price.php)
Add the code that Nicolas gave: Code:

&lt;?php if(!empty($this-&gt;row-&gt;has_options)) return true; ?&gt;

to the very beginning of the file and it will work (atleast it did for me).

THANKS AGAIN!!!!! ![B)](/media/kunena/emoticons/9.png "B)") ![:cheer:](/media/kunena/emoticons/2.png ":cheer:")

Last edit: 13 years 9 months ago by [skullboy74](/forum/user/9936-skullboy74 "View skullboy74's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MDc5LXJlbW92ZS1wcmljZXMtZnJvbS1jZXJ0YWluLWNhdGVnb3J5LWxpc3RpbmdzP3RtcGw9bWFya2Rvd24=) 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.063 seconds

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

[](#top)
