- Posts: 45
- Thank you received: 0
Don't show product price in some categories.
14 years 9 months ago #32261
by slydog
Don't show product price in some categories. was created by slydog
How do I get in some categories on the product page does not display the price of goods?
But the rest leave as it is.
But the rest leave as it is.
Please Log in or Create an account to join the conversation.
14 years 9 months ago #32289
by nicolas
Replied by nicolas on topic Re: Don't show product price in some categories.
You could remove the price of these products no ?
Please Log in or Create an account to join the conversation.
14 years 9 months ago #32292
by slydog
Replied by slydog on topic Re: Don't show product price in some categories.
No, I can not remove them. I need them for further calculations.
Please Log in or Create an account to join the conversation.
14 years 9 months ago #32299
by nicolas
Replied by nicolas on topic Re: Don't show product price in some categories.
Then you would have to edit the file "listing_price" of the view "product" via the menu Display->Views and add a condition to return or not before the code of the page based on the current category.
Please Log in or Create an account to join the conversation.
14 years 9 months ago #32300
by slydog
Replied by slydog on topic Re: Don't show product price in some categories.
How should look this condition? To weed out some of the categories.
Can you give me an example code please.
Can you give me an example code please.
Please Log in or Create an account to join the conversation.
14 years 9 months ago #32309
by nicolas
Replied by nicolas on topic Re: Don't show product price in some categories.
Well, you first need to load the categories of the current product with a mysql query. The product id is available in $this->row->product_id. Then, based on the results from your mysql query, you can decide what to do...
Please Log in or Create an account to join the conversation.
14 years 9 months ago #32359
by slydog
Replied by slydog on topic Re: Don't show product price in some categories.
Thanks, I'll try.
By the way, I actually even easier to select products by id, that price will not be displayed.
(I have only few of them, but in different categories)
Later write the result.
By the way, I actually even easier to select products by id, that price will not be displayed.
(I have only few of them, but in different categories)
Later write the result.
Please Log in or Create an account to join the conversation.
14 years 9 months ago - 14 years 9 months ago #32494
by slydog
Replied by slydog on topic Re: Don't show product price in some categories.
I figured out how to not display the price of the product by ID.
But there was the following complexity...
The product have characteristics and it appears that each characteristic - a product with a different ID.
Besides, as I understand it, the characteristics do not have bindings to product category?
For now, I made sure that did not display the price of all products that have the characteristics, but this is not a complete solution for me because may be other products with the characteristics, in which will need to display the price
How to remove a price only for those products which do I need? How best to do this?
But there was the following complexity...
The product have characteristics and it appears that each characteristic - a product with a different ID.
Besides, as I understand it, the characteristics do not have bindings to product category?
For now, I made sure that did not display the price of all products that have the characteristics, but this is not a complete solution for me because may be other products with the characteristics, in which will need to display the price
How to remove a price only for those products which do I need? How best to do this?
Last edit: 14 years 9 months ago by slydog.
Please Log in or Create an account to join the conversation.
14 years 9 months ago #32521
by nicolas
Replied by nicolas on topic Re: Don't show product price in some categories.
For the products with characteristics, the product id should be in $this->element->main->product_id
Please Log in or Create an account to join the conversation.
14 years 9 months ago #32525
by slydog
Replied by slydog on topic Re: Don't show product price in some categories.
Thanks, it helps.
I've blocked "price-listing" for my 3 products by main product ID.
I've blocked "price-listing" for my 3 products by main product ID.
Please Log in or Create an account to join the conversation.
Time to create page: 0.212 seconds