I really don't have a clue what are you talking about?!straightlight wrote: ↑Wed Jan 29, 2020 3:28 amYes, this one works better. I would, then, suggest to remove the previous link you posted above for security purposes.
As for the out of stock, the thing is that the products are being pulled from the same location whether it's from the API in the admin sales orders or from the catalog product page in order to maintain the stock levels and the service levels between store owners and the customers. If you're looking for a push order strategy based on a stock level that cannot be guaranteed to the customer, then you'd be affecting the utility of the product value when using the API orders as compared to the catalog product page.
In order to rectify that issue, since each stores also have their own settings defined from the admin systems settings, the stock levels would need to be overwritten individually on the stock levels whenever the API is used but, even there, manufacturers and products being copied categorically could also exclude those remarks as well as store owners feeding their products with their stocks via a service provider where this method can also become quite complex.
Therefore, by creating a product group page (which I believe one or multiple extensions on the Marketplace already exists for this) could create part of the solution where the stock levels could be re-balanced since product groups could also involved using the APIs as an additional group. This way, the product page and the checkout process from the catalog-end side won't be interfered with any customers whether it's for guests or registered customers and affiliates.
The issue is simple. Admin user is editing existing order, why is OC pulling stock for an existing order twice? If admin increases quantity for that order OK, but when the actual change is not on quantity it's regarding address, name or something else beside quantity, I don't see any meaningful explanation why OC should reduce the stock of that products in the existing order again?!