Home » Archive

Articles tagged with: customer

Magento »

[25 Apr 2017 | Comments Off on Magento: Add new column to Customer Grid in Admin]

This article shows how you can add new column to customer grid in Magento 1.x admin. In this example, we will be adding a fetching the fax field value from customer’s billing address and showing in the customer grid in Magento admin.
For this, you need to rewrite/override the Adminhtml’s customer_grid block class.

Magento »

[14 Apr 2017 | Comments Off on Magento: Create Order Programmatically]

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 »

[4 Apr 2017 | Comments Off on Magento: Create Customer Programmatically]

This article shows how you can programmatically (through code) create customers in Magento 1.x.
In this example code, you can find saving customer general information along with saving customer’s billing address and shipping address.
Here are the steps followed in the code below:

Magento, Magento 2 »

[4 Jan 2017 | 2 Comments]

This article shows how to get all customer groups name and id in Magento 2.
I will be showing an example in a Block class. You can write the code in other class (Helper/Model) as well.
Both ways (Dependency Injection & Object Manager way) are shown below.

Magento »

[12 Dec 2016 | Comments Off on Magento: Get Customer Groups]

This article shows how to get all customer groups name and id in Magento 1.
To get all customer groups, we will be using Mage_Customer_Model_Resource_Group_Collection class.
Here’s the code:

Magento, Magento 2 »

[19 Feb 2016 | One Comment]

This article shows how to create and destroy different types (Checkout, Customer, Catalog) of sessions in Magento 2.
As you can see below, there are different types of session classes present in Magento 2.

Magento »

[20 Jan 2016 | One Comment]

Here is a quick code to delete customers programmatically in Magento. You can manually delete customers from customer admin grid. But, sometime you might need to do it automatically through code.
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 »

[9 Sep 2014 | One Comment]

Here is the code to delete all shopping cart items of currently logged in single customer:

Magento »

[19 Aug 2014 | 4 Comments]

By default, customers are redirected to ‘Customer Account Dashboard’ page after login. This feature can be easily changed from Magento configuration settings.
Configuration Settings

Guest Post, Magento »

[22 Jul 2014 | Comments Off on Magento: 5 easy ways to increase customer satisfaction in no time]

When people come to your shop and start purchasing, the feelings they will have after they’ve finished are most important for you as for a Magento store owner. Will they be happy about your service? Would they like to use it again? To make sure that customers’ satisfaction is high and they are glad about the purchase they have made, consider 5 points which will make your online store preferable among others.
What are easy ways to satisfy a customer?

Magento »

[20 May 2013 | 6 Comments]

Magento has the feature to verify the authenticity of newly registered customers before activating their account.
When a user registers to your Magento shop, then he/she will get a confirmation email with a confirmation link. The customer’s account will be activated only after he/she clicks that confirmation link.

Magento »

[25 Mar 2013 | 3 Comments]

Suppose, you have a custom Magento module and you wanted to add a custom tab to “Customer My Account” section, i.e. the frontend part displayed after customer login.
Here is the solution:-

Magento »

[11 Mar 2013 | Comments Off on Magento: Get Customer Attribute]

This article contains code snippet to get customer attributes in Magento.
Get Customer Collection

Magento »

[5 Nov 2012 | 2 Comments]

Here are some ways (2 ways below) to show customer address information in registration page.
When you fill up the address fields and signup then both your billing and shipping addresses are filled up.
Here is how to enable address fields in signup page:-

Magento »

[10 Oct 2011 | 2 Comments]

If you are developing a module which needs to give access to its content only to logged in user then the preDispatch function will be very useful. This dispatches event before action.
Just write the following function in your module’s controller and customer log in is checked before each of your controller action.