Home » Archive

Articles tagged with: order

Magento »

[18 Apr 2017 | No Comment]

This article shows how you can add new columns to sales order grid in Magento 1.x admin.
For this, you need to rewrite/override the Adminhtml’s sales_order_gird block class.
Here is the block override code to be written in your module’s config.xml file:

Magento »

[14 Apr 2017 | No Comment]

This article show how you can create sales order programmatically through code in Magento 1.x.
This code example also includes creating new customer if the customer email is not already registered. It also shows how you can save customer address to the newly created customer. This code has been tested for simple products.
Here are the steps followed in the code below:

Magento, Magento 2 »

[26 Sep 2016 | One Comment]

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.

Magento »

[22 Jan 2016 | One Comment]

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.

Magento »

[29 Jul 2015 | 5 Comments]

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).

Magento »

[6 Jan 2014 | Comments Off on Magento: Orders made using Paypal are not dispalyed in Customer’s ‘My Orders’ section]

Problem:
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.
Cause:

Magento »

[16 Dec 2013 | One Comment]

Here is a code snippet to get sales quote and order data in both admin and frontend in Magento.
Get Sales Quote in Frontend

Magento »

[27 Aug 2012 | One Comment]

I am using Magento verion 1.4.0.1 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.

Magento »

[7 Jun 2011 | 10 Comments]

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.

Magento »

[25 Feb 2011 | 7 Comments]

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.

Magento »

[2 Aug 2010 | 3 Comments]

Scenario:
You have created a custom module.
You have entered certain data in your database.
You need to show the data randomly.
Solution:

Magento »

[1 Jun 2010 | 10 Comments]

Here is a quick and easy way to create order invoice programmatically.
Suppose, $_order contains your order.
Here goes the code to create invoice:-

Magento »

[3 Dec 2009 | One Comment]

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: