Skip to main content

Slide Cart Drawer by AMP

Add the Zapiet widget to the AMP drawer cart

Clemency Farmer avatar
Written by Clemency Farmer
Updated over 3 months ago

The Slide Cart Drawer by AMP app enables merchants to create a customizable, sliding cart that appears on the side of the page, allowing customers to easily review, update, and complete their purchases.

To add the Zapiet - Pickup + Delivery widget to the drawer cart, you will need to add a code snippet to your theme files.

  1. In Online Store > Themes, select the theme and click Edit code.

  2. Open the theme.liquid file.

  3. Search for </body> and prepend it with the code below.

    < script > window.SLIDECART_UPDATED = function() {
    setTimeout(() => {
    if (!document.querySelector("#slidecart-checkout-form #storePickupApp")) {
    document.querySelector("#slidecart-checkout-form button")?.insertAdjacentHTML("beforebegin", '<div id="storePickupApp"></div>');
    document.dispatchEvent(new CustomEvent("zapiet:start"));
    }
    }, 1000);
    }; < /script>

  4. Click Save.

The Zapiet - Pickup + Delivery widget will now appear in the AMP drawer cart.

Did this answer your question?