Full source code to make an ajax cart sidebar when custom click 'add to cart' Btn. You don't need to use an app and you can make it by yourself! It will take only 5 mins to install it on your theme
- copy drawer.css and drawer.js paste into theme.liquid before
</body>
- create drawer.liquid snippet or section and move it theme.liquid before
</body>
- upload custom-ajax-js.js file into assets folder on your theme
- In header seciton, add 'data-drawer-trigger aria-controls="drawer-name" aria-expanded="false"' attrs to cart icon's anchor
For example:
<a href="/cart" data-drawer-trigger aria-controls="drawer-name" aria-expanded="false" class="btn-link btn-lg">{% include "svg-cart" %}</a>
- In product page or collection product item, all of product forms class should be 'shopify-product-form'
For example:
<form class="shopify-product-form">
Author: Roman Gavrilov
Version: 1.0
If you have question, please reach out to me here!
gmail: roman.gavrilov.0309@gmail.com
skype: live:.cid.47c14b6b0b7e8b07