Add to cart pop up dialog on infinite scroll

Solved
larroll-cewis
Tourist
3 1 0

Hi there

I'm currently on the debut theme and I use Ajaxinate to paginate the products.

Additionally I added an Add-to-cart Button on the product cards.

 

Now I came across the following problem:

For the initally loaded products the add-to-cart pop up dialog gets displayed and the customer stays on the collection page.

But for all the additionally loaded products the customer gets redirected to the cart page when the add to cart Button is clicked.

 

So far I couldn't figure out what's the reason for that. Does anyone have an idea what might be the reason for that behaviour?

 

Thanks

Remo

0 Likes
larroll-cewis
Tourist
3 1 0

This is an accepted solution.

In case someone comes across this.

Got it working by adding the following lines to ajaxinate.js after initialize():

var sections = new theme.Sections();
sections.register('product', theme.Product);

 

This might not be a clean or perfect solution but it does the job, so I'm good with that for now.

Any suggestions for improvement are very welcome.

0 Likes