Skip to content

Commit

Permalink
Add Events SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
herzog31 committed Jun 11, 2024
1 parent 93fa9de commit 6bc1ecc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions blocks/product-recommendations/product-recommendations.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ export default async function decorate(block) {
loadRecommendation(block, context);
}

function handleCategoryChanges({ eventInfo }) {
context.category = eventInfo.categoryContext.name;
function handleCategoryChanges({ categoryContext }) {
context.category = categoryContext.name;
loadRecommendation(block, context);
}

Expand All @@ -201,8 +201,8 @@ export default async function decorate(block) {
loadRecommendation(block, context);
}

function handleCartChanges({ eventInfo }) {
context.cartSkus = eventInfo.shoppingCartContext.items.map(({ product }) => product.sku);
function handleCartChanges({ shoppingCartContext }) {
context.cartSkus = shoppingCartContext.items.map(({ product }) => product.sku);
loadRecommendation(block, context);
}

Expand Down

0 comments on commit 6bc1ecc

Please sign in to comment.