Skip to content

Commit

Permalink
Merge branch 'develop' into GA-Demo-Develop-2
Browse files Browse the repository at this point in the history
  • Loading branch information
ericeoeur authored Nov 14, 2024
2 parents 32deee4 + c143dde commit 47a5d67
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions blocks/commerce-checkout/commerce-checkout.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
8 changes: 8 additions & 0 deletions blocks/commerce-checkout/commerce-checkout.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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),

Expand Down

0 comments on commit 47a5d67

Please sign in to comment.