Skip to Content
0
Former Member
Sep 26, 2014 at 09:41 AM

Dynamic Banner Component for brand

604 Views

Hello!

I need to display a banner depending on the brand of the product. (b2b, Hybris 5.1.0) E.g. product "Notebook Apple MacBook Pro" have 2 position in supercategories: "Apple" and "Notebooks". "Apple", in turn, have "brands" in Supercategories. So "Apple" is a brand for the product.

As I understand Dynamic Banner Component should be used in such cases. I have to specify the appropriate template to me In it's mediaCodePattern with substring "{category}" (e.g. "media_for_{category}") and upload corresponding media objects (e.g. "media_for_apple", "media_for_asus" and so on for different brands). I try to find a method in source that implements the data sampling media for the banner according to the pattern. But I couldn't.

What should I do more? 1. Should I create my own Controller for component in storefront (e.g. like for ProductCarouselComponentController) ? Here "https://answers.sap.com/questions/12750292/cms-component-detailed-documentation.html" said about some de.hybris.platform.yacceleratorstorefront.controllers.cms.DynamicBannerComponentController. But I didn't find it in our system (I mean standart). 2. Should I override Dynamic Banner Component?

Thanks.