When fake orders become a recurring problem Does someone keep placing fake orders in your Magento 2 store, perhaps using different email addresses or customer accounts each time? Apart from the unnecessary work involved, such orders can interfere with your…
Deleting orders directly from the database with SQL (Magento 2)
Deleting large numbers of orders from Magento 2 admin often causes timeouts. You can also delete orders directly through the database. Open phpMyAdmin and run the following two statements: Proceed at your own risk. Test on a staging system or…
Reading Fooman Surcharge data from an order (Magento 2)
In Magento 1, you could retrieve amounts from the Fooman Surcharge extension using
|
1 |
$order->getFoomanSurchargeAmount(); |
. This no longer works in Magento 2. Instead, Magento 2 provides extension attributes. The following code retrieves surcharges from different Fooman extensions for further processing:…
“Session size exceeded allowed session max size” problem solution (Magento 2)
You get the error main.WARNING: Session size of … exceeded allowed session max size of … when adding items to an order in the Magento 2 admin area? There is an easy solution to that problem, just run the following…
Unable to add products to an order in the admin (Magento 2)
If you cannot add products to an order from the Magento 2 admin area, run the following command in your Magento 2 root directory:
|
1 |
php bin/magento config:set system/security/max_session_size_admin 0 |
That should resolve the issue.
Fixing Session size exceeded allowed session max size (Magento 2)
Do you receive the message main.WARNING: Session size of … exceeded allowed session max size of …when adding products to an order from the Magento 2 admin area? There is a simple fix: run the following command from your Magento…
Setting the next order number using SQL (Magento 2)
In Magento 2, the tables sequence_order_* determine which order number will be assigned next for each store view. The number at the end of the table name identifies the store view. For example, sequence_order_1 stores the sequence for store view…
Getting the PayPal transaction ID (Magento 1)
Use the following code to get the Magento PayPal transaction ID from an order object: $transactionId = $order->getPayment()->getLastTransId();
Getting the PayPal transaction ID (Magento 1)
Use this code to retrieve the PayPal transaction ID for a Magento order:
|
1 |
$transactionId = $order->getPayment()->getLastTransId(); |
Sort order items by SKU (Magento 1)
If you want to change the default sorting of the ordered items on the order detail page, go ahead and override app/design/adminhtml/default/default/template/sales/order/view/items.phtml in your theme and replace