Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addProductsToShoppingList function issue #84

Open
1 task done
sunilit42 opened this issue Aug 1, 2024 · 0 comments
Open
1 task done

addProductsToShoppingList function issue #84

sunilit42 opened this issue Aug 1, 2024 · 0 comments

Comments

@sunilit42
Copy link
Contributor

sunilit42 commented Aug 1, 2024

Please fill out this template to help us diagnose and address your issue effectively.

Type: (Select one)

  • Bug Report

Summary:

  • Trying to implement save cart functionality using shopping list
  • addProductsToShoppingList - i m passing mutiple dimention array
const { productsSearch } = await getProducts({
    productIds: items.map(({ productId }) => productId),
    currencyCode,
    companyId,
    customerGroupId,
  });
  • above function getting info but indexing of array change based on product id asc order.
  • Eg. i have 4 items into cart , product id : 2,10, 8 but output of function give us 2,8,10 so wrong data getting into next step
const { productId, sku, variantId: vId, quantity, optionSelections } = items[index];

Expected Behavior:

  • All items should be adding into shopping list

Actual Behavior:

  • All items not adding into shopping list
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants