Rendering main-cart-footer in a Dawn mini cart

New Member
1 0 0

I've been building a mini cart on Dawn following this tutorial.

Everything is working well except for the main-cart-footer. The getSectionsToRender function in cart.js selects the main-cart-footer by data-id attribute which is available on the cart page. When the cart api is called bundled section rendering returns the html for the main-cart-footer just fine.


When we are not on the cart page there is no dynamic id attribute is available. I have tried using the 'main-cart-footer' which is the static id of the section but the bundled section rendering doesn't return the dynamic content inside of cart__blocks.


It's not possible to hard code dynamic id attribute because it changes. I have also tried using the sections_url parameter available set to the context of '/cart' and still get the empty area of the cart.

Anyone attempted this before or faced a similar issue?

Replies 0 (0)