You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the motivation for adding / enhancing this feature?
Currently the vue-storefront-apiorder/create endpoint is pushing the order to Redis queue and then the orders are asynchronously pushed back to eCommerce backend (i.e. using o2m for pushing them to Magento2)
We achieved massive scalability by having order process async BUT in case of errors with transmitting the orders to the backend - the user is currently not avare of the problems
This second mode should be enabled via config variable
What are the acceptance criteria
export createSingleOrder from kind of shared module/helper and use it inside order_2_magento and api/order/create
add config variable config.orders.directBackendSync (default = false); when set to true then call createSingleOrder and return the result directly to the frontend
Of course: with this option set to on offline orders won't work - or rather: in offline mode we can not use this option (we need to use the fallback to current/default async behaviour anyway)
pkarw
added a commit
to vuestorefront/vue-storefront-api
that referenced
this issue
Nov 21, 2018
@NataliaTepluhina - please add this to the docs as well:
Starting with Vue Storefront v1.6 we changed the default order-placing behaviour. Currently the `config.orders.directBackendSync` is set to `true` be default. With this option enabled - if the user is online, Vue Storefront tries to pass the order immediately and synchronously (waiting for result) to the eCommerce backend. This option gives immediate and direct feedback to the user. If there is an app-level error (for example validation error on Magento side) user will be notified immediately. If there is transmission issue (no connection, servers are down etc) the order is being put into queue (as it was prior to 1.6). If `config.orders.directBackendSync` is set to false - then the legacy behaviour with queuing all the orders is being used. With `directBackendSync` set to true we do have access to the server confirmation (with backend orderId) in `store.state.order.last_order_confirmation`
What is the motivation for adding / enhancing this feature?
Currently the vue-storefront-api
order/create
endpoint is pushing the order to Redis queue and then the orders areasynchronously
pushed back to eCommerce backend (i.e. using o2m for pushing them to Magento2)We achieved massive scalability by having order process async BUT in case of errors with transmitting the orders to the backend - the user is currently not avare of the problems
We need to move the createSingleOrder directly to https://github.com/DivanteLtd/vue-storefront-api/blob/92c96a6c28e78ba68f2e009d71bf9287ea89a078/src/api/order.js#L18
This second mode should be enabled via config variable
What are the acceptance criteria
createSingleOrder
from kind of shared module/helper and use it insideorder_2_magento
andapi/order/create
config.orders.directBackendSync
(default =false
); when set totrue
then callcreateSingleOrder
and return the result directly to the frontendconfig.orders.directBackendSync
(default =false
) in thevue-storefront
. When set to true then Checkout should not make the order async like currently is doing but rather place it and wait for the result (we probably need to modify this method: https://github.com/DivanteLtd/vue-storefront/blob/102b3923804ccd6d76de5965b7d9e57a14d82726/core/pages/Checkout.js#L323 - and usenotification-progress-start
event for displaying the "Processing order ..."Can you complete this feature request by yourself?
YES but I'm short on time :)
The text was updated successfully, but these errors were encountered: