Feat/update discount on draft order (#349)
* only looked for rules when existing * removed logging
This commit is contained in:
committed by
GitHub
parent
da329359a9
commit
234be4e307
@@ -222,7 +222,7 @@ class TotalsService extends BaseService {
|
||||
getAllocationItemDiscounts(discount, cart) {
|
||||
const discounts = []
|
||||
for (const item of cart.items) {
|
||||
if (discount.rule.valid_for.length > 0) {
|
||||
if (discount.rule.valid_for?.length > 0) {
|
||||
discount.rule.valid_for.map(({ id }) => {
|
||||
if (item.variant.product_id === id) {
|
||||
discounts.push(
|
||||
|
||||
Reference in New Issue
Block a user