- Posts: 107
- Thank you received: 1
How to add branch conditions in product listing
13 years 1 month ago #117209
by tinachou
How to add branch conditions in product listing was created by tinachou
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.
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.
Please Log in or Create an account to join the conversation.
Less
More
- Posts: 12953
- Thank you received: 1778
13 years 1 month ago - 13 years 1 month ago #117263
by Mohamed Thelji
Replied by Mohamed Thelji on topic How to add branch conditions in product listing
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.
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: 13 years 1 month ago by Mohamed Thelji.
Please Log in or Create an account to join the conversation.
Time to create page: 0.179 seconds