@daffodil/cart 0.58.3 → 0.58.4
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.
- package/esm2020/state/reducers/cart-resolve/cart-resolve.reducer.mjs +3 -1
- package/esm2020/state/selectors/cart/cart.selector.mjs +3 -3
- package/fesm2015/daffodil-cart-state.mjs +4 -2
- package/fesm2015/daffodil-cart-state.mjs.map +1 -1
- package/fesm2020/daffodil-cart-state.mjs +4 -2
- package/fesm2020/daffodil-cart-state.mjs.map +1 -1
- package/package.json +5 -5
|
@@ -1623,6 +1623,8 @@ function cartResolveReducer(state = initialState, action) {
|
|
|
1623
1623
|
resolved: DaffCartResolveState.ServerSide,
|
|
1624
1624
|
};
|
|
1625
1625
|
case DaffCartActionTypes.ResolveCartSuccessAction:
|
|
1626
|
+
case DaffCartActionTypes.CartLoadSuccessAction:
|
|
1627
|
+
case DaffCartActionTypes.CartCreateSuccessAction:
|
|
1626
1628
|
return {
|
|
1627
1629
|
...state,
|
|
1628
1630
|
resolved: DaffCartResolveState.Succeeded,
|
|
@@ -2153,11 +2155,11 @@ const createCartSelectors$1 = () => {
|
|
|
2153
2155
|
const selectHasShippingAddress = createSelector(selectCartShippingAddress, shippingAddress => !!shippingAddress);
|
|
2154
2156
|
const selectHasShippingMethod = createSelector(selectCartShippingInformation, shippingMethod => !!shippingMethod);
|
|
2155
2157
|
const selectHasPaymentMethod = createSelector(selectCartPayment, paymentMethod => !!paymentMethod && paymentMethod.method !== '');
|
|
2156
|
-
const selectCanPlaceOrder = createSelector(selectIsCartEmpty, selectHasBillingAddress, selectHasShippingAddress, selectHasShippingMethod, selectHasPaymentMethod, (isCartEmpty, hasBillingAddress, hasShippingAddress, hasShippingMethod, hasPaymentMethod) => !isCartEmpty
|
|
2158
|
+
const selectCanPlaceOrder = createSelector(selectIsCartEmpty, selectHasBillingAddress, selectHasShippingAddress, selectHasShippingMethod, selectHasPaymentMethod, selectCartGrandTotal, (isCartEmpty, hasBillingAddress, hasShippingAddress, hasShippingMethod, hasPaymentMethod, grandTotal) => !isCartEmpty
|
|
2157
2159
|
&& hasBillingAddress
|
|
2158
2160
|
&& hasShippingAddress
|
|
2159
2161
|
&& hasShippingMethod
|
|
2160
|
-
&& hasPaymentMethod);
|
|
2162
|
+
&& (grandTotal === 0 || hasPaymentMethod));
|
|
2161
2163
|
return {
|
|
2162
2164
|
selectCartState,
|
|
2163
2165
|
selectCartValue,
|