Don't show product price in some categories.

  • Posts: 45
  • Thank you received: 0
13 years 1 month ago #32261

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.

Please Log in or Create an account to join the conversation.

  • Posts: 83156
  • Thank you received: 13430
  • MODERATOR
13 years 1 month ago #32289

You could remove the price of these products no ?

Please Log in or Create an account to join the conversation.

  • Posts: 45
  • Thank you received: 0
13 years 1 month ago #32292

No, I can not remove them. I need them for further calculations.

Please Log in or Create an account to join the conversation.

  • Posts: 83156
  • Thank you received: 13430
  • MODERATOR
13 years 1 month ago #32299

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.

  • Posts: 45
  • Thank you received: 0
13 years 1 month ago #32300

How should look this condition? To weed out some of the categories.
Can you give me an example code please.

Please Log in or Create an account to join the conversation.

  • Posts: 83156
  • Thank you received: 13430
  • MODERATOR
13 years 1 month ago #32309

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.

  • Posts: 45
  • Thank you received: 0
13 years 1 month ago #32359

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.

Please Log in or Create an account to join the conversation.

  • Posts: 45
  • Thank you received: 0
13 years 1 month ago #32494

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?

Last edit: 13 years 1 month ago by slydog.

Please Log in or Create an account to join the conversation.

  • Posts: 83156
  • Thank you received: 13430
  • MODERATOR
13 years 1 month ago #32521

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.

  • Posts: 45
  • Thank you received: 0
13 years 1 month ago #32525

Thanks, it helps.
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.072 seconds
Powered by Kunena Forum