How to add branch conditions in product listing

  • Posts: 107
  • Thank you received: 1
11 years 4 months ago #117209

Hello there,

I have two questions relating to adding "branch conditions" (if, else) for the "product listing page" and "product page".

(1) If the product's category is "XXX", then the "product listing page" will be different, not showing product "price","name" , and "add to cart" and so on. (See the attached.) Can anyone tell me which file I should edit?



(2) If the product's category is "XXX", then the "product page" will be different, not showing product "price","name" , and "add to cart" and so on. (See the attached.) Can anyone tell me which file I should edit?



I really do not know which file and which part should I insert a line " If (product_category_name=="XXX")...." ( However, I am not sure HOW TO SPECIFY or CALL the product's category, is it "product_category_id" or "product_category_name" or??)

I appreciate your help sincerely. :)

Attachments:

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

  • Posts: 12953
  • Thank you received: 1778
11 years 4 months ago #117263

Hi,

If you want your product listing to exactly react like you said, you'll have to do apply some code customization in several file of the product's view like :
- The "listing_price" file if you want to control the display of your prices.
- The "add_to_cart_listing" file if you want to control the display of your prices.
- etc..

Hope this will help you a little.

Last edit: 11 years 4 months ago by Mohamed Thelji.

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

Time to create page: 0.062 seconds
Powered by Kunena Forum