Shopify/Timber

AJAX Cart appending product to wrong element

Closed this issue · 0 comments

I noticed a weird bug when I was working on a new Timber-based theme today, it appears that with the AJAX Cart drawer, products are not being added to the DOM in the correct place. The handlebars.js template dictates that each product should be represented by a .ajaxcart__product div, within the container div .ajaxcart__inner. However, after the first product in the cart, every subsequent item is placed outside of the .ajaxcart__inner div. This issue can be seen in the demo store if you add more than one item to the cart.

You can see in the screenshot below that the first product is in the correct div, but the rest of them are not.

screen shot 2016-11-01 at 3 07 53 am