Merged PR 1797: #4813 #4710 Bugfix Preselection Purchase Options

#4813 #4710 Bugfix Preselection Purchase Options
This commit is contained in:
Nino Righi
2024-09-25 18:21:33 +00:00
committed by Lorenz Hilpert
parent 4d42c4ea45
commit f0a0189523

View File

@@ -112,8 +112,10 @@ export function getPurchaseOptionsInAvailabilities(state: PurchaseOptionsState):
purchaseOptions.push('delivery');
}
// if remove 'dig-delivery' and 'b2b-delivery'
purchaseOptions = purchaseOptions.filter((purchaseOption) => purchaseOption !== 'dig-delivery' && purchaseOption !== 'b2b-delivery');
// if remove 'dig-delivery' and 'b2b-delivery' and 'catalog' as 'catalog' is not a purchase option but is needed for other data (Needed for #4813 and Bugfix for #4710)
purchaseOptions = purchaseOptions.filter(
(purchaseOption) => purchaseOption !== 'dig-delivery' && purchaseOption !== 'b2b-delivery' && purchaseOption !== 'catalog',
);
return purchaseOptions.sort((a, b) => PURCHASE_OPTIONS.indexOf(a) - PURCHASE_OPTIONS.indexOf(b));
}