cancel
Showing results for 
Search instead for 
Did you mean: 

is their any way to add products to ProductCarouselComponent dynamically

Former Member
0 Kudos

I hav created one item type to store viewed products. I want to add that products to ProductCarouselComponent dynamically. Becz products will be added every time when user requests for PDP Page

Accepted Solutions (0)

Answers (2)

Answers (2)

manickarajm
Explorer
0 Kudos

Hi, You can think of writing a cron job which collects such products and assign them to the correct product reference relation

Thanks, k

Former Member
0 Kudos

I think it is definitely possible.

ProductCarouselComponentController renders the component. You can add the logic to fill products from the newly created item in this controller's fillModel method.

Former Member
0 Kudos

thnk you i will try now

Former Member
0 Kudos

Let us know if it works. And of course would be great if you accept the correct answer for the question. Possibly provide some more details for others.

Former Member
0 Kudos

hi,

I am trying with it but i was not understanding when this ProductCarouselComponentController will be called. can u plzz explain the flow how it will be called.

Thanks in advance

Former Member
0 Kudos

There are normally 2 ways a component is rendered

By implementing CMSComponentRenderer or By a controller (old way - not recommended)

ProductCarouselComponentController is an old implementation which gets called during the page rendering. A separate request goes to the server for that part of the page and is accepted by the controller. (You may use debug on the controller to check that)