Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
fix(api-client): add same product to cart duplicate entries (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
elkmod authored Aug 26, 2020
1 parent e50e1fb commit 2bf210e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ describe("CartService - addProductToCart", () => {
quantity: 1,
referencedId: "044a190a54ab4f06803909c3ee8063ef",
type: "product",
id: "044a190a54ab4f06803909c3ee8063ef",
},
],
});
Expand All @@ -77,6 +78,7 @@ describe("CartService - addProductToCart", () => {
quantity: 1,
referencedId: "someNonExistingProductId",
type: "product",
id: "someNonExistingProductId",
},
],
}
Expand All @@ -96,6 +98,7 @@ describe("CartService - addProductToCart", () => {
referencedId: "",
type: "product",
quantity: 2,
id: "",
},
],
});
Expand All @@ -117,6 +120,7 @@ describe("CartService - addProductToCart", () => {
quantity: 1,
referencedId: "qwe",
type: "product",
id: "qwe",
},
],
});
Expand Down
1 change: 1 addition & 0 deletions packages/shopware-6-client/src/services/cartService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ export async function addProductToCart(
type: CartItemType.PRODUCT,
referencedId: productId,
quantity: qty,
id: productId,
},
],
}
Expand Down

1 comment on commit 2bf210e

@vercel
Copy link

@vercel vercel bot commented on 2bf210e Aug 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.