Import group price from CSV files for Magento

by Denis Saltanakhmedov

May 27, 2014 Comments (7)

Group Pricing is a great and flexible instrument for adding product prices for different groups of customers. Magento allows to affect the cost of separate products using group price mechanism for chosen groups. In this case, the product group price allows to set a product price for separate products and, at the same time, we do not need to create many catalog price rules.

Example on how to add Group Price for product in the admin panel

First of all, go to the admin panel -> choose Catalog -> Manage Products and click on Edit button for some product from your store.
Then, on the product edit page you can choose Price tab, and there just press the Add Group Price button. After that, select Website where the rule will be true, and choose Customer Group for this rule, the last step is to insert a price for the product.

It is easy to follow this way if we have just one product, but we need to concentrate on other important things if there are many products. As you may already know, adding price rule for every product manually is a very long process. However, we can do it using CSV file import.

Create extension for import Group Price from CSV file.

We will not pay attention for explanation about how to create an extension for Magento, because you can surely find many good posts on this topic. Now, let’s investigate a piece of code for an import.

Create a form for CSV file import – for example, it can be a fragment of code from phtml admin template:

Subscribe to our blog

Interestedin Atwix?

Smart Brands Choose Us.

From Mark Cuban and Sir Richard Branson backed startups, to Inc 500 US Fastest Growing Companies and Global Brands choose us to deliver and support unparalleled eСommerce experience for their customers.