Skip to Content

Banner component is not visible in PDP page after Providing Category Restriction on Component.

Hi Everyone,

Problem -- Trying to show Banner on PLP and PDP page according to the category selected.Used Category restriction to control the banner component as per category selected. But After providing restriction , On PLP page i am able to see the banner Component as Per the category selected . But on PDP page the banner component disappears even after the product selected is from the same Category to which restriction Applied on Component.

I have to use the same banner component for both PDP and PLP page.

I have given the lines of code being used by me to create component and restrictions:

INSERT_UPDATE BannerComponent;$contentCV[unique=true];uid[unique=true];name;ComponentRef;urlLink;content;headline;$picture 
;;Category1BannerComponent;Category1 Component;Category1BannerComponent;"/pcs";"Content1";"Find the right";pic1.jpg 
;;Category2BannerComponent;Category2 Component;Category2BannerComponent;"/pcs";"Content2";"Find the right";pic2.jpg 
;;Category3BannerComponent;Category3 Component;Category3BannerComponent;"/pcs";"Content3";"Find the right";pic3.jpg

INSERT_UPDATE ComponentSelectorBannerComponent;$contentCV[unique=true];uid[unique=true];name;banners(componentRef);componentRef 
;;CustomBannerComponent;Custom BannerComponent;Category1BannerComponent,Category2BannerComponent,Category3BannerComponent;CustomBannerComponent 


INSERT_UPDATE CMSCategoryRestriction; uid[unique = true] ; $contentCV[unique = true]; categories(code, $productCV) ; components(uid, $contentCV) ; ComponentRef 				    
; Category1CommponentRestriction ;; 101001000000 ; Category1BannerComponent ; Category1CommponentRestriction 
; Category2CommponentRestriction ;; 101002000000 ; Category2BannerComponent ; Category2CommponentRestriction  						   
; Category3ComponentRestriction  ;; 101007190900,40141600; Category3BannerComponent ; Category3ComponentRestriction

Any help would be appreciated.

Thanks

Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.