Skip to content

Commit

Permalink
mapped additional products to local products
Browse files Browse the repository at this point in the history
  • Loading branch information
abutuza committed Dec 3, 2024
1 parent 6222df7 commit 45ab80e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion _src/scripts/libs/store/resolver/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ export class StoreResolver {
const globalClickAttributes = context.dataset.storeId ? [] : this.getAllAttributes(context, this.clickAttributes);

const pageContexts = [];
const contextProducts = products.map(product =>storeProducts[product.dataset.storeId])
const contextProducts = [...products, ...this.getAdditionalProducts(context)].map(product =>storeProducts[product.dataset.storeId])
for (const product of products) {
const storeProduct = storeProducts[product.dataset.storeId];
const productDataMapping = JSON.parse(product.dataset?.storeDevicePropertiesMapping || '{}');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ const replaceVariable = (text, context, variableParameters, textVariable) => {
case "SMALLEST_PRICE_PER_MONTH":
let smallestPrice = Number.MAX_SAFE_INTEGER;
let currency = "";

if (context.contextProducts.length === 0) {
break;
}
Expand Down

0 comments on commit 45ab80e

Please sign in to comment.