@infrab4a/connect-angular 4.9.1-beta.2 → 4.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1322,14 +1322,12 @@ class CartService {
|
|
|
1322
1322
|
this.buy2WinRepository = buy2WinRepository;
|
|
1323
1323
|
this.cartSubject = new Subject();
|
|
1324
1324
|
this.updateLineItemInCart = (lineItem, quantity, checkout) => (isNil(checkout) ? this.checkoutService.getCheckout() : of(checkout)).pipe(concatMap((checkoutLoaded) => {
|
|
1325
|
-
console.log('updateLineItemInCart', lineItem);
|
|
1326
1325
|
const items = [];
|
|
1327
1326
|
const index = checkoutLoaded.lineItems?.map((checkoutItem) => checkoutItem.id).indexOf(lineItem.id);
|
|
1328
1327
|
if (index > -1) {
|
|
1329
1328
|
checkoutLoaded.lineItems[index].quantity += quantity;
|
|
1330
1329
|
checkoutLoaded.lineItems[index].pricePaid = lineItem.pricePaid;
|
|
1331
1330
|
checkoutLoaded.lineItems[index].price = lineItem.price;
|
|
1332
|
-
console.log('if index', checkoutLoaded.lineItems[index]);
|
|
1333
1331
|
}
|
|
1334
1332
|
else
|
|
1335
1333
|
checkoutLoaded.lineItems = items.concat(checkoutLoaded.lineItems ? checkoutLoaded.lineItems.concat([lineItem]) : [lineItem]);
|
|
@@ -1357,7 +1355,6 @@ class CartService {
|
|
|
1357
1355
|
shop: checkout.shop || this.defaultShop,
|
|
1358
1356
|
isSubscriber: checkout.user?.isSubscriber,
|
|
1359
1357
|
});
|
|
1360
|
-
console.log('pricePaid', pricePaid);
|
|
1361
1358
|
RoundProductPricesHelper.roundProductPrices(item);
|
|
1362
1359
|
RoundProductPricesHelper.roundProductPrices(product);
|
|
1363
1360
|
return {
|