mv-order-process.ts 451 B

12345678910111213
  1. import { CustomOrderProcess } from '@vendure/core';
  2. export const multivendorOrderProcess: CustomOrderProcess<any> = {
  3. onTransitionStart(fromState, toState, data) {
  4. if (fromState === 'AddingItems' && toState === 'ArrangingPayment') {
  5. for (const line of data.order.lines) {
  6. if (!line.shippingLineId) {
  7. return 'not all lines have shipping';
  8. }
  9. }
  10. }
  11. },
  12. };