Closed QueenLinux closed 6 years ago
Commenting for more detail:
Request after making cart and shipping: { "paymentMethod": { "method": "checkmo" }, "billing_address": { "email": "jdoe@example.com", "region": "New York", "region_id": 43, "region_code": "NY", "country_id": "US", "street": ["123 Oak Ave"], "postcode": "10577", "city": "Purchase", "telephone": "512-555-1111", "firstname": "Jane", "lastname": "Doe" } }
Response:
{ "message": "An error occurred on the server. Please try to place the order again.", "trace": "#0 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Checkout\Model\PaymentInformationManagement->savePaymentInformationAndPlaceOrder(15, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))\n#1 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->callParent('savePaymentInfo...', Array)\n#2 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->Magento\Framework\Interception\{closure}(15, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))\n#3 /var/www/magento2/generated/code/Magento/Checkout/Model/PaymentInformationManagement/Interceptor.php(26): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->callPlugins('savePaymentInfo...', Array, Array)\n#4 [internal function]: Magento\Checkout\Model\PaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder(15, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))\n#5 /var/www/magento2/app/code/Magento/Webapi/Controller/Rest.php(330): call_user_func_array(Array, Array)\n#6 /var/www/magento2/app/code/Magento/Webapi/Controller/Rest.php(239): Magento\Webapi\Controller\Rest->processApiRequest()\n#7 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))\n#8 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Webapi\Controller\Rest\Interceptor->callParent('dispatch', Array)\n#9 /var/www/magento2/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Webapi\Controller\Rest\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))\n#10 /var/www/magento2/generated/code/Magento/Webapi/Controller/Rest/Interceptor.php(39): Magento\Webapi\Controller\Rest\Interceptor->callPlugins('dispatch', Array, Array)\n#11 /var/www/magento2/lib/internal/Magento/Framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))\n#12 /var/www/magento2/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()\n#13 /var/www/magento2/lib/internal/Magento/Framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch()\n#14 /var/www/magento2/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))\n#15 {main}" }
I can confirm i have the same issue placing admin orders in magento 2.2.4 CE
This is the same as #15597
@mrpenelope @labelsdirect How did you create your products? I'm facing the same issue but have pinned the cause down to bad product data in the cataloginventory_stock_item table.
In the cataloginventory_stock_item table. The "website_id" column is set to "1" for products that cannot be ordered and face the issue. Changing it to 0 fixes the issue.
Also if you create a product manually through admin, then inspect the cataloginventory_stock_item table, you'll see that the new product has the website_id of 0 and can be ordered without issue.
In my case I'm talking to a 3rd party to get them to fix their module to import the data correctly.
@semajeg Legend! I can confirm this was the issue.
I used the following SQL to fix the issue:
UPDATE
cataloginventory_stock_itemSET
website_id= '0' WHERE
cataloginventory_stock_item.
website_id= '1'
I then retested an order through the admin and it worked.
My products were migrated from Magento 1.9 to Magento 2.2.4 using ubdata migration extension so the data must have been imported that way.
This works! I guess what weirded me out is in the default sample file for inventory imports, it used "1" as the website_id for the sample items. Either way, thank you both.
Summary: Cannot create orders through admin panel, or frontend with guest or logged-in users.
Steps to reproduce:
Expected: Be able to make a new order.
Actual: Error shows and order is never made.