First read this below articles:
If you want to add a field them you need to use extension_atttibutes
Extension attribute gives the facility to add a new field to existing API ...
public function __construct(
You can customize method Magento\Quote\Model\Quote\Item::representProduct() to return false if the product SKU matches your criteria.
Reference post: Magento 2: How to Prevent item's quantity from being added
Please try with below code: create custom file in root like ordercreate.php
* If the external file is in the root folder
require __DIR__ . '/app/bootstrap.php';
$params = $_SERVER;
$bootstrap = Bootstrap::create(BP, $params);
$obj = $bootstrap->getObjectManager();
$state = $obj->get('Magento\...
@Sanchit I've used Authorize.net Accept JS payments on our website and have faced the same issues.
After debugging, I've found that the SHA512 key is not matched with the generated transaction key. The issue is because of the Float value of the transaction amount.
It seems like the issue is with the Magento's core module of AcceptJs payments. I've disabled ...
Ok, so the problem was when i set STATE_COMPLETE Magento make the order closed. But if i set STATE_PROCESSING or STATE_PENDING with status Complete then order status show complete but when i view the order details there it show processing/pending. So i tried to figure out when magento make order status complete and it is when a invoice is generated.
So i ...
Please take note that invoking the the save method of the order would trigger a state check which might explain why you are experiencing the issue.
Magento 2 has a separate class for checking the order state.
In the Magento\Sales\Model\ResourceModel\Order class you will find the save method invoking state check
public function save(\Magento\Framework\...
Here is the solution to add a custom attribute in M2epro order.
Once the order has been placed in Magento using M2epro, it will trigger one event ess_order_place_success after order success in which you will get order object.
You can create an observer using that event.
Below is the code for the event.xml
For me, sales_order_save_commit_after was the only event that worked well:
If you need the event to be triggered in the admin area and also in the frontend, you can add the following code in etc/events.xml.
If you need it for the order created from admin only, you need to add the following code in etc/adminhtml/events.xml