Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fixed Stock logic not working with manage_stock set to false - @andrzejewsky - (#3957)
- Support old price format in `ProductPrice` - @gibkigonzo (#3978)
- Fixed product bundle comparison condition - @gk-daniel (#4004)
- Fixed `Processing order...` modal closing too early - @grimasod (#4021)
- Keep registered payment methods after `syncTotals` - @grimasod (#4020)
- Added status code to the cache content and use it in cache response - @resubaka (#4014)

Expand Down
7 changes: 3 additions & 4 deletions core/modules/order/store/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,14 @@ const actions: ActionTree<OrderState, RootState> = {
async processOrder ({ commit, dispatch }, { newOrder, currentOrderHash }) {
const order = { ...newOrder, transmited: true }
const task = await OrderService.placeOrder(order)
EventBus.$emit('notification-progress-stop')

if (task.resultCode === 200) {
dispatch('enqueueOrder', { newOrder: order })

commit(types.ORDER_LAST_ORDER_WITH_CONFIRMATION, { order, confirmation: task.result })
orderHooksExecutors.afterPlaceOrder({ order, task })
EventBus.$emit('order-after-placed', { order, confirmation: task.result })

EventBus.$emit('notification-progress-stop')
return task
}

Expand All @@ -71,10 +70,10 @@ const actions: ActionTree<OrderState, RootState> = {
Logger.error('Internal validation error; Order entity is not compliant with the schema: ' + JSON.stringify(task.result), 'orders')()
dispatch('notification/spawnNotification', notifications.internalValidationError(), { root: true })
dispatch('enqueueOrder', { newOrder: order })

EventBus.$emit('notification-progress-stop')
return task
}

EventBus.$emit('notification-progress-stop')
throw new Error('Unhandled place order request error')
},
handlePlacingOrderFailed ({ commit, dispatch }, { newOrder, currentOrderHash }) {
Expand Down