Michael Bromley

Results 750 comments of Michael Bromley

As of v1.8.2, you can (and should) use the relation path rather than table names for your customPropertyMap 👍

Yes we can definitely improve the feedback when the format is invalid.

I've seen this occasionally. I think it has to do with the worker stopping slightly before the server, and the server sends a couple of messages which then get refused.

@skid thanks for all this very valuable input! I've thought a bit about this "onValid, onInvalid" API you suggest. The basic concept I think this captures is that of side...

> Technically, since the execute method is async, you can also use it to do side-effects. Yes, sure you can already do side-effects, but I really mean the _intention_ is...

OK I have a promising proof-of-concept design running locally. Here's what a free gift promotion looks like: ```TypeScript let orderService: OrderService; export const freeGiftAction = new PromotionItemAction({ code: 'free_gift', description:...

> when onDeactivate will be triggered? It gets triggered whenever a promotion which _was_ active, becomes no longer active. Example: - add couponCode, `onActivate` is invoked - remove couponCode, `onDeactivate`...

> What do you mean by "upon order completion" ? I'm referring to this: https://github.com/vendure-ecommerce/vendure/blob/master/packages/core/src/service/helpers/order-state-machine/order-state-machine.ts#L187 Namely, until the order is placed (transitions to PaymentAuthorized/PaymentSettled by default), the `order.promotions` array will...

> it seems that onActivate, onDeActivate it seems it hard to tell what phase of this two states , why not conbine these to one event like onChange? I'm not...

The flow is like this: 1 .order change (add item, change quantity, apply coupon etc) 2. Snapshot current active promotions on the order. 3. `OrderService.applyPriceAdjustments()`, invoke all `execute()` functions on...