Articles tagged with: order
This article shows how to get custom option values of products/items added to cart or products of any order in Magento 2.
I will simply be using ObjectManager for this example.
Here is a quick code to delete orders programmatically in Magento. In Magento, there isn’t the facility to delete orders from admin grid. You need to write custom code to delete orders in Magento.
Here is the full code to do so. This code can be saved in a new file in your Magento root folder and then you can run it in browser.
Quick Order – Add to Cart by SKU is a FREE Magento Extension that allows customers to directly add products to shopping cart using product SKU.
This module is compatible with Magento version 1.5 and later (Magento 1.5, 1.6, 1.7, 1.8, 1.9).
I placed an order in Magento using Paypal payment method. Everything went fine. I was able to pay through Paypal. However, when I login to the shop as a customer, I see that ‘My Orders‘ section is empty. I could not find information of the order I recently placed.
Here is a code snippet to get sales quote and order data in both admin and frontend in Magento.
Get Sales Quote in Frontend
I am using Magento verion 220.127.116.11 and I had this issue. I had enabled Paypal Express Checkout payment method. When I choose this method on checkout, I was redirected to Paypal website but order data was not displayed there.
The main reason in my case was due to applied discount to the cart. I had created a shopping cart price rule and applied it to the cart. And, when I choose Paypal Express Checkout as payment method, the paypal website would show empty order data.
Here is a quick tip to sort/order latest product by both created date and new from date.
Created At date is automatically added when you add a new product. However, you have to set New from Date manually while adding or editing product.
You may have product with same new from date. And, then you need created at date to sort the latest product.
Gift Message facility is present in Magento by default. You can add gift message in order as a whole or in individule order items.
By default, the gift message is not enabled in Magento.
You have created a custom module.
You have entered certain data in your database.
You need to show the data randomly.
Here is a quick and easy way to create order invoice programmatically.
Suppose, $_order contains your order.
Here goes the code to create invoice:-
We are not allowed to order configurable and bundle products directly. We have to select product options from product detail page of configurable or bundle product. Only then we can add the product to cart.
The following code fetches the order option selected for configurable and bundle products: