How to Use Weight Based Shipping For Multiple Flat Rates

Written by in Tutorials on May 13, 2013  |  34 Comments


Do you want a second (or third, or fourth) flat rate for your site’s shipping? OpenCart doesn’t include a shipping method that allows for multiple flat rates by default, but you can easily set up multiple flat shipping options using the built-in Weight Based Shipping extension.

1. In System > Localisation > Geo Zones, set up a duplicate geo zone for each flat rate that you want. For example, if you wanted these three shipping options available to the U.S.:

  • Standard: $5.00
  • Express: $12.00
  • Next-Day: $18.00

then you would create three geo zones all with United States selected as the country, named “Standard”, “Express”, and “Next-Day”.


2. In Extensions > Shipping > Weight Based Shipping, create a rate for each geo zone with a rate (in the format Weight:Cost) like so:


  • Geo Zone: Standard
  • Rates: 999999:5.00


  • Geo Zone: Express
  • Rates: 999999:12.00


  • Geo Zone: Next-Day
  • Rates: 999999:18.00

Don’t forget to enable the extension as a whole in the “General” tab, and each geo zone in its own tab. If you have other geo zones for other purposes (such as the “USA” and “United Kingdom” geo zones in the example screenshot) then leave those disabled in their tabs. If you need a tax rate applied to the shipping costs, then select the Tax Class in the “General” tab.


3. During checkout, each option will be presented to the customer on the “Delivery Method” step. They are ordered alphabetically by name, so if you need them in a particular order then you should name them accordingly.


4. If you want to change the name of the shipping method heading, you can do so in /catalog/language/english/shipping/weight.php . If you want to remove the cart weight that is attached to each rate title, then you can make the following edit:


$result['name'] . ' (' . $this->language->get('text_weight') . ' ' . $this->weight->format($weight, $this->config->get('config_weight_class_id')) . ')',


And that’s it! Your OpenCart store now has multiple flat rate shipping options for your customer.

Tags: , , ,

About the Author

Johnathan Shaw has been working with OpenCart since 2009. He is the owner of Clear Thinking web development and runs OpenCartX, the curated OpenCart extension marketplace.

View all posts by

34 Comments on "How to Use Weight Based Shipping For Multiple Flat Rates"

  1. CeliaChief March 30, 2018 at 4:10 pm · Reply

    I have checked your site and i’ve found some duplicate
    content, that’s why you don’t rank high in google’s search
    results, but there is a tool that can help you to create 100% unique articles, search for: boorfe’s tips unlimited content

  2. jacob raccuia July 24, 2017 at 5:18 pm · Reply

    Thank you. I hate open cart. Running on 2.3. you helped me find my errors so I could just simply use flat rate shipping like COME ON how is this not built in…..

  3. vasasnth January 5, 2017 at 7:44 am · Reply

    Great tutorial! Thank you so much for this tutorial.

  4. Johnathan December 2, 2016 at 8:37 pm · Reply

    You can’t do that with a standard OpenCart shipping method. You could possibly use my Ultimate Shipping ( extension for that, if your “district” and “ward” are set up as custom fields in OpenCart. Contact me at if you’re interested in seeing an example of how that’s done.

    However, if those fields are not OpenCart custom fields, and you’ve installed some other mod to add those fields instead, then you’re going to need to hire someone to write a custom shipping method for you.

    • Pham Xuan Vinh December 3, 2016 at 2:03 am ·

      I just set option the same above topic. but error with 500 internal.
      Vietnam have 64 province, I set fee shipping at Ho Chi Minh city is 25 000 VND, and other province is 30000 VND,
      so I create 2 GEO ZONE: the one for Ho Chi Minh city, and the one for other provice (set other 63 provice ???). => error with 63 provice.

    • Johnathan December 3, 2016 at 3:36 pm ·

      Post in the OpenCart forums if you’re having trouble with your setup.

  5. Pham Xuan Vinh December 2, 2016 at 11:32 am · Reply

    Can I fix shipping fee depend on district and ward? country -> zone (city) -> district -> ward.

  6. Johnathan August 18, 2016 at 4:06 pm · Reply

    Because shipping method choice comes *before* payment method choice in OpenCart, you’d need to restrict the payment method options based on the shipping method choice. If you want to restrict which payment methods appear based on the shipping method, you could use this extension:

    • Restrict Payment Methods (

    Feel free to take a look at the screenshots and demo site, and if you’re interested let me know if you have any further questions at

  7. Harsh August 18, 2016 at 5:49 am · Reply

    Jonathan , i used same but now on specific shipping i want to give cod then what to do

  8. Vivek Gurkha April 2, 2016 at 11:01 am · Reply

    I am using open Cart and want to know How to increase the length of Text of “Geo Zone Name” Its giving me the max characters length 32 and i want to increase that. Please suggest.

  9. apostolos January 21, 2016 at 7:35 pm · Reply

    Hi , Thank’s for the tutorial. I want to ask you if I can desapear the “Flat rate” from displaying.
    If I disable or unsinstall from admin the OC can’t calculate give me error….
    Any idea?

  10. anuj April 12, 2015 at 11:15 am · Reply

    I Want add Shipping Charge In Price and Show Them On Product Page In Price. How I Do This..?
    Example :- Product Price Is 100$
    Shipping Charge is 5$
    Now I Want To Show Product Price 105$ On Product Page As Price.

    Thanks In Advance.

  11. STC February 1, 2015 at 5:02 pm · Reply


    Sorry, I’m new to FTP and such, but how do I change the name of the shipping method in weight.php file? Which part should I edit? Thanks in advance!

  12. Raluca Terente December 31, 2014 at 11:47 am · Reply


    This is a wonderful and easy to follow tutorial. However, I have a constant problem. I followed all the steps but still this shipment method does not show up during checkout. I’ve enabled the extension as a whole in the “General” tab, and each geo zone in its own tab. Could you give me some advice?

    Thank you in advance!

  13. Amelia July 3, 2014 at 11:32 pm · Reply

    Thank you so much for this!! Worked perfectly.

    Except this bit to remove the displayed cart weight –


    $result['name'] . ‘ (‘ . $this->language->get(‘text_weight’) . ‘ ‘ . $this->weight->format($weight, $this->config->get(‘config_weight_class_id’)) . ‘)’,



  14. Kati June 27, 2014 at 10:51 am · Reply

    Thanks a lot!!! This helped a LOT!!!! Thanks for sharing!

  15. Johnathan Shaw January 31, 2014 at 12:14 am · Reply

    The tutorial should show you how to do that. You would create the appropriate geo zones (12 for standard, 12 for express) and then enter the rates appropriately. You’d essentially have 12 duplicates of geo zones, so that two options appear during checkout for each geo zone.

  16. Alex January 30, 2014 at 10:24 pm · Reply

    i meant to say weight based shipping. how do i create two diff weight based shipping, each having different zones

  17. John January 22, 2014 at 8:40 pm · Reply

    To work properly you need to assign a weight to every product. If it is not set you’ll get an error when checking out.

    I have just discovered this. Thanks for the tutorial.

  18. Johnathan Shaw December 17, 2013 at 7:03 pm · Reply

    If you only want Express showing, then setting its “Status” setting to “Disabled” in the Weight Based Shipping admin panel.

  19. Amit Vaid December 17, 2013 at 6:58 pm · Reply

    if i add deliervy address Geo Zone: Express then i want to show only Geo Zone: Express shippping cost bez i pay for this zone shiping then why show all how it possible

  20. RebeccaG November 13, 2013 at 10:25 pm · Reply

    This was amazingly helpful – especially when you’re dealing with multiple regions and rural delivery options. Thank you SO much.

  21. jan September 5, 2013 at 6:23 am · Reply

    Thanks ! Now it works – I was deleting that last comma right after square bracket – that was the problem .

    • Renwick March 8, 2014 at 7:55 am ·

      what this warning mean?Warning: rreqiue_once(home/test/public_html/system/startup.php) [function.require-once]: failed to open stream: No such file or directory in /home/test/public_html/admin/index.php on line 19Fatal error: rreqiue_once() [function.require]: Failed opening rreqiued home/test/public_html/system/startup.php’ (include_path=’.:/usr/lib/php’) in /home/test/public_html/admin/index.php on line 19

  22. Johnathan Shaw September 4, 2013 at 9:17 pm · Reply

    My last comment should read:

    …the browser is rendering > as &gt ; which…

  23. Johnathan Shaw September 4, 2013 at 9:14 pm · Reply

    Hi Jan — that error means you didn’t do the edit correctly. Make sure you follow it exactly — I recommend using the “Find” function of your text editor to make sure you’ve selected precisely the correct text. Right now, it looks like the browser is rendering the > as > which it should be doing, so you may need to do that to make sure you have the right line. Once finished, the line should read:

    ‘title’ => $result['name'],

  24. jan September 4, 2013 at 7:34 pm · Reply

    Everything works like a charm but when I want to remove cart weight I get this error

    Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘)’ in /home/content/31/11535131/html/catalog/model/shipping/weight.php on line 46

  25. Jill August 29, 2013 at 6:44 am · Reply

    Many thanks, saved me a lot of time.

  26. Andrew July 11, 2013 at 10:45 pm · Reply

    Great tutorial! Really a great hack that you’ve come up with here.

  27. Philippe June 26, 2013 at 6:35 pm · Reply

    Many, many thanks…too simple that I was looking for a module…

  28. Şahin June 23, 2013 at 8:36 pm · Reply

    Thank you.

  29. Dave June 11, 2013 at 1:21 pm · Reply

    Thank you very much for this! It was way simpler than trying to make a module work somehow.

  30. Ronald May 31, 2013 at 7:04 am · Reply

    Thank you so much for this tutorial.

  31. Heru May 17, 2013 at 7:40 am · Reply

    Nice tuts. Thanks Jonathan

Leave a Comment

comm comm comm