- Posts: 70
- Thank you received: 4
How to hide price for 1 product in the category
13 years 9 months ago #82881
by gidgie
How to hide price for 1 product in the category was created by gidgie
Hi,
My client has been managing their site themselves for a while and they came up with a question.
They have a product with about 7 variants. They would like to display no price when the product is listed with other products that have price listed. How could that be achieved??
Thanks in advance!
My client has been managing their site themselves for a while and they came up with a question.
They have a product with about 7 variants. They would like to display no price when the product is listed with other products that have price listed. How could that be achieved??
Thanks in advance!
Please Log in or Create an account to join the conversation.
13 years 9 months ago #82906
by Xavier
Replied by Xavier on topic How to hide price for 1 product in the category
Hi,
You have to edit the view "product / listing_img_title" (or another one depending on which display you are using) and add a if condition on the product ID, and if the product_id == youId, so hide the price part.
You have to edit the view "product / listing_img_title" (or another one depending on which display you are using) and add a if condition on the product ID, and if the product_id == youId, so hide the price part.
Please Log in or Create an account to join the conversation.
13 years 8 months ago #85724
by gidgie
Replied by gidgie on topic How to hide price for 1 product in the category
HI Xavier,
This sounds like a coding job. And i am not very good at that. Do you have any examples of how that would look? I am sure i can figure out different product ID myself
But not sure how entire line should look.
This sounds like a coding job. And i am not very good at that. Do you have any examples of how that would look? I am sure i can figure out different product ID myself
Please Log in or Create an account to join the conversation.
13 years 8 months ago #85759
by nicolas
Replied by nicolas on topic How to hide price for 1 product in the category
Hi,
It's quite simple actually.
Change the line:
if($this->params->get('show_price')){
to:
if($this->params->get('show_price') && $this->row->product_id != XX){
where XX is the id of the product for which you want to hide the price on the listing.
It's quite simple actually.
Change the line:
if($this->params->get('show_price')){
to:
if($this->params->get('show_price') && $this->row->product_id != XX){
where XX is the id of the product for which you want to hide the price on the listing.
The following user(s) said Thank You: gidgie
Please Log in or Create an account to join the conversation.
Time to create page: 0.207 seconds