diff --git a/src/app/core/facades/product-context.facade.ts b/src/app/core/facades/product-context.facade.ts index 0fbd904fce..3099b79e38 100644 --- a/src/app/core/facades/product-context.facade.ts +++ b/src/app/core/facades/product-context.facade.ts @@ -6,6 +6,7 @@ import { BehaviorSubject, Observable, combineLatest, race } from 'rxjs'; import { debounceTime, distinctUntilChanged, + distinctUntilKeyChanged, filter, first, map, @@ -259,6 +260,16 @@ export class ProductContextFacade extends RxState implements OnD (state, minOrderQuantity) => (state.quantity ??= minOrderQuantity) ); + this.connect( + 'quantity', + this.select('product').pipe( + whenTruthy(), + distinctUntilKeyChanged('sku'), + map(p => p.minOrderQuantity), + skip(1) + ) + ); + this.connect( 'quantity', this.select('children').pipe(