Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,153,210 members, 7,818,709 topics. Date: Sunday, 05 May 2024 at 10:29 PM

Creating Custom Shipping For Nigeria With Magento - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Creating Custom Shipping For Nigeria With Magento (2066 Views)

Fast Import & Generate Code With Magento 2 Coupon Extension / Speed Up Magento 2 Online Websites With Magento 2 Lazy Load By Magezon / Eddie Bongoz Goes Nude To Prove His Love For Nigeria (Photos) (2) (3) (4)

(1) (Reply) (Go Down)

Creating Custom Shipping For Nigeria With Magento by ilyasmuy: 10:37am 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.

Re: Creating Custom Shipping For Nigeria With Magento by deepplaymedia: 10:59pm On Jan 29, 2018
Thanks my bro. It was really helpful. Been working on this Table shipping rate for magento 1.9.3.6.
Please which onepage checkout extension do you recommend? Ive tried Lotusbreath but its not updating on setting the Locales.

PS.
Im a magento developer too and would really like to synergse on some upcoming projects.
My email is emmanuelndoh01@gmail.com
Re: Creating Custom Shipping For Nigeria With Magento by Holla007(m): 12:02am On Jan 30, 2018
Nice
Re: Creating Custom Shipping For Nigeria With Magento by Gabriel411: 9:09pm On May 10, 2018
Hello,
Where you able to resolve the issue with fixing shipping rates?
deepplaymedia:
Thanks my bro. It was really helpful. Been working on this Table shipping rate for magento 1.9.3.6.
Please which onepage checkout extension do you recommend? Ive tried Lotusbreath but its not updating on setting the Locales.

PS.
Im a magento developer too and would really like to synergse on some upcoming projects.
My email is emmanuelndoh01@gmail.com
Re: Creating Custom Shipping For Nigeria With Magento by trice1(m): 11:44am On Mar 09, 2020
Regarding this, how can someone do that on cities and zip code??

(1) (Reply)

I Need To Verify My Germany Adsense / The Richest People Have The Simplest Websites - True Or False / Can I Create Forms In Flash?

(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. 14
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.