Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,151,981 members, 7,814,337 topics. Date: Wednesday, 01 May 2024 at 11:17 AM

Creating Custom Shipping For Nigeria With Magento - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Creating Custom Shipping For Nigeria With Magento (988 Views)

What Programming Language Is Used In Creating Viruses? / Create A Fast Shopping Experience With Magento 2 Shop By Brand / Drive More Success For Your Business With Magento 2 Development (2) (3) (4)

(1) (Reply)

Creating Custom Shipping For Nigeria With Magento by ilyasmuy: 10:54am On Jun 18, 2017
If you’re running an online business that sells physical products to customers, having a flexible and scalable shipping policy is essential. So it’s important to make sure your eCommerce software provides an easy way to adjust and implement shipping policies over the different regions you intend to sell to.

Magento, the industry-leading platform for eCommerce, is one of the more expandable and developer-friendly systems for a whole range of business needs–including setting shipment rates.

Recently, a client requested for a simple shipping method that displays different shipping prices for all states in Nigeria in magento. Using magento shipping table rates, I feel like sharing how i did it.

Firstly, We have to create list of Nigerian states in our magento database with country code. Magento uses code "NG" in iso-2 for Nigeria. Just copy this code to your sql database. Remember to back up your database.

INSERT INTO `directory_country_region` VALUES
(NULL , 'NG', 'AB','Abia'),
(NULL , 'NG', 'AD','Adamawa'),
(NULL , 'NG', 'AI','Akwa Ibom'),
(NULL , 'NG', 'AN','Anambra'),
(NULL , 'NG', 'BA','Bauchi'),
(NULL , 'NG', 'BY','Bayelsa'),
(NULL , 'NG', 'BE','Benue'),
(NULL , 'NG', 'BN','Borno'),
(NULL , 'NG', 'CR','Cross River'),
(NULL , 'NG', 'DT','Delta'),
(NULL , 'NG', 'EB','Ebonyi'),
(NULL , 'NG', 'EN','Enugu'),
(NULL , 'NG', 'ED','Edo'),
(NULL , 'NG', 'EK','Ekiti'),
(NULL , 'NG', 'GB','Gombe'),
(NULL , 'NG', 'IM','Imo'),
(NULL , 'NG', 'JG','Jigawa'),
(NULL , 'NG', 'KD','Kaduna'),
(NULL , 'NG', 'KN','Kano'),
(NULL , 'NG', 'KT','Katsina'),
(NULL , 'NG', 'KB','Kebbi'),
(NULL , 'NG', 'KG','Kogi'),
(NULL , 'NG', 'KW','Kwara'),
(NULL , 'NG', 'LG','Lagos'),
(NULL , 'NG', 'NW','Nasarawa'),
(NULL , 'NG', 'NG','Niger'),
(NULL , 'NG', 'OG','Ogun'),
(NULL , 'NG', 'OD','Ondo'),
(NULL , 'NG', 'OS','Osun'),
(NULL , 'NG', 'OY','Oyo'),
(NULL , 'NG', 'PL','Plateau'),
(NULL , 'NG', 'RV','Rivers'),
(NULL , 'NG', 'SK','Sokoto'),
(NULL , 'NG', 'TR','Taraba'),
(NULL , 'NG', 'YB','Yobe'),
(NULL , 'NG', 'AJ','Abuja'),
(NULL , 'NG', 'ZF','Zamfara');

Three ways to price shipping
One thing to note, is that there are three main ways of setting up table rates–price vs. destination, weight vs. destination and number of items vs. destination.

Essentially what this means is that you can set cheaper shipping to certain destinations if the cost of the item is high, or if the weight and number of items is low.


After that you navigate to system > configuration > sales shipping method and open table rate shipping.


The first thing to do is to enable table rates by selecting Yes in the drop-down menu for the Enabled option. This will turn off flat rate shipping and allow you to specify different rates based on your chosen criteria.

The next two options, Title and Method Name, allow you to create different table rate shipping policies that you can then select from.
The next option determines how you want to calculate the shipping. In my own instance,I used weight vs. destination

Setting your table rates
Save the current configuration and then, in the top left Current Configuration Scope menu, select Main Website.

In particular, you’ll notice a new Export CSV and Import option. Magento requires a CSV file, so you’ll need to manually create the shipping rates you want in a spreadsheet, then import them into your website.

You’ll create the CSV from a template file. To download the template, click Export CSV. After editing this CSV templates and putting your shipping rates, just import to the website and save config. Attached below is the pics of my CSV.

Let me know if you run to any issues.

I am a magento certified developer. You can contact me for your magento development at ilyas.muy@gmail.com.

(1) (Reply)

How To Become An Ethical Hacker With All Your Needs / Op 5 Trends In Cybersecurity For 2017 And 2018 / Online Advertising Expert Needed

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 11
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.