Skip to content

Commit

Permalink
add to cart
Browse files Browse the repository at this point in the history
  • Loading branch information
kathleentynan committed Feb 8, 2024
1 parent 63ee8fa commit 7a74465
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions blocks/product-list-page/product-list-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export default async function decorate(block) {
const widgetProd = '/scripts/widgets/search.js';
await loadScript(widgetProd);

const { cartApi } = await import('../../scripts/minicart/api.js');

const storeDetails = {
environmentId: await getConfigValue('commerce-environment-id'),
environmentType: 'testing',
Expand All @@ -26,9 +28,11 @@ export default async function decorate(block) {
currencyRate: '1',
displayOutOfStock: true,
allowAllProducts: false,
displayMode: '', // "" for plp || "PAGE" for category/catalog
imageCarousel: false,
optimizeImages: true,
imageBaseWidth: 185,
imageBaseWidth: 200,
displayMode: '', // "" for plp || "PAGE" for category/catalog
addToCart: cartApi.addToCart,
},
context: {
customerGroup: await getConfigValue('commerce-customer-group'),
Expand Down

0 comments on commit 7a74465

Please sign in to comment.