Close

Create a different slider for every product in the catalog

powerappit
8 years ago
#10743 Quote
Avatar
  • 2
Hi
I want to create a slider with a different set of images for every product in my ecommerce.

So I created one slider for every product, set condition "fail" by default and override to "pass" for the single product and I made this for every product and slider.

In the detail page it's working, i see a different set of images for every product.

I want to do the same in the category catalog page: in the list of products, I want to see a different set of image for every product. I connect the slider to a specific widget zone that I put in the _ProductBox view, I set the same conditions, but it's not working.
It's like it can verify the condition because it can't recognize the product. If I set the condition tu always pass, I can see the same slider in every product

can someone help me?
thanks
Boyko
8 years ago
#10744 Quote
Avatar
  • 1570
powerappit wrote:
Hi
I want to create a slider with a different set of images for every product in my ecommerce.

So I created one slider for every product, set condition "fail" by default and override to "pass" for the single product and I made this for every product and slider.

In the detail page it's working, i see a different set of images for every product.

I want to do the same in the category catalog page: in the list of products, I want to see a different set of image for every product. I connect the slider to a specific widget zone that I put in the _ProductBox view, I set the same conditions, but it's not working.
It's like it can verify the condition because it can't recognize the product. If I set the condition tu always pass, I can see the same slider in every product

can someone help me?
thanks


Hi powerappit,

Please note that the Conditions are evaluated in the context of the current page.
So on the category page none of the Product Conditions will be evaluated to True since you are not in the context of a product page.
Fortunately you can work around this by providing the different product ids and widget zone directly to the controller of the Anywhere Sliders.
In your product box view call this action:

@Html.Action("WidgetSlider", "AnywhereSliders", new {  productId = Model.Id, widgetZone = "the name of your specific widget zone here" })


Please let me know if this works for you!
Regards,
Nop-Templates.com Team
powerappit
8 years ago
#10745 Quote
Avatar
  • 2
It's working!!!
thanks a lot, you made my day!
Boyko
8 years ago
#10746 Quote
Avatar
  • 1570
powerappit wrote:
It's working!!!
thanks a lot, you made my day!


Hi powerappit,

I am glad it works!

It looks like you are doing some interesting customization. I am curious to see your website if you are willing to share it with us.

Have a great weekend!
Regards,
Nop-Templates.com Team