diff --git a/blocks/commerce-checkout/commerce-checkout.css b/blocks/commerce-checkout/commerce-checkout.css index a7aac02ee7..93f108bc8b 100644 --- a/blocks/commerce-checkout/commerce-checkout.css +++ b/blocks/commerce-checkout/commerce-checkout.css @@ -116,6 +116,15 @@ padding: var(--spacing-medium); } +/* Order Summary Coupon */ +.dropin-accordion-section__heading { + margin: var(--spacing-medium) auto; +} + +.cart-coupons__accordion { + margin-top: var(--spacing-xsmall); +} + /* temporary fix to hide the default cart heading */ [data-testid='default-cart-heading'] { display: none; diff --git a/blocks/commerce-checkout/commerce-checkout.js b/blocks/commerce-checkout/commerce-checkout.js index 1517c774cb..f68469ae8e 100644 --- a/blocks/commerce-checkout/commerce-checkout.js +++ b/blocks/commerce-checkout/commerce-checkout.js @@ -34,6 +34,7 @@ import CartSummaryList from '@dropins/storefront-cart/containers/CartSummaryList import EmptyCart from '@dropins/storefront-cart/containers/EmptyCart.js'; import { OrderSummary } from '@dropins/storefront-cart/containers/OrderSummary.js'; import { render as CartProvider } from '@dropins/storefront-cart/render.js'; +import Coupons from '@dropins/storefront-cart/containers/Coupons.js'; // Checkout Dropin import * as checkoutApi from '@dropins/storefront-checkout/api.js'; @@ -278,6 +279,13 @@ export default async function decorate(block) { CheckoutProvider.render(EstimateShipping)(estimateShippingForm); esCtx.appendChild(estimateShippingForm); }, + Coupons: (ctx) => { + const coupons = document.createElement('div'); + + CartProvider.render(Coupons)(coupons); + + ctx.appendChild(coupons); + }, }, })($orderSummary),