7

I am not sure if I need table rates here, but what I need to establish is 3 shipping costs per order, to UK only...

Essentially,

  • £2.95 (3-5 days)
  • £4.95 (1-3 days)
  • Order over £50, free delivery

I have got in the free delivery and a flat rate at £2.95, but how can I add a second flat rate? Do I need to do it as a table rate or something?? I am sure this might help many people, with simple shop setups like mine.

7

In the case where you want to have the customer choose from multiple options, I recommend using one of WebShopApps matrix plugins. Here's a good one:

http://www.magentocommerce.com/magento-connect/webshopapps-matrixrate-1-multiple-table-rates-extension-certified-bug-free.html

Otherwise, to get an automatic calculation based on value, use table rates to achieve what you're looking for - to get an example of a table rates CSV:

enter image description here

For the £50 free delivery option, use free shipping shopping cart price rules.

Source: http://www.magentocommerce.com/knowledge-base/entry/how-do-i-set-up-table-rate-shipping

  • are you able to have multiple conflicting/simultanious options though? I.E buyer able to choose between 2 types of postage? – Henry Aspden Jun 24 '13 at 14:59
  • I get a conflict... File has not been imported. See the following list of errors: Duplicate Row #3 (Country "GBR", Region/State "*", Zip "*" and Value "0"). Duplicate Row #4 (Country "GBR", Region/State "*", Zip "*" and Value "0"). – Henry Aspden Jun 24 '13 at 15:22
  • I don't know that you can have a choice - that's a different type of shipping method. Table rates is an automatic calculation either based on weight or price, or both – philwinkle Jun 24 '13 at 16:54
  • In this case, I recommend using one of WebShopApps matrix plugins – philwinkle Jun 24 '13 at 16:55
  • I think Neklo.com solution is much better. See Thebod_Shippingrates – Alejandro del Río Nov 27 '17 at 9:19
8
+150

You could also create a second flat rate shipping method with a module.

First create app/etc/modules/Vendor_Module.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Vendor_Module>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Core/>
                <Mage_Catalog/>
            </depends>
        </Vendor_Module>
    </modules>
</config>

Then create app/code/local/Vendor/Module/etc/config.xml :

<?xml version="1.0"?>

<config>

    <modules>
        <Vendor_Module>
            <version>0.0.1</version>
        </Vendor_Module>
    </modules>

    <global>
        <models>
            <module>
                <class>Vendor_Module_Model</class>
            </module>
        </models>

        <helpers>
            <module>
                <class>Vendor_Module_Helper</class>
            </module>
        </helpers>

    </global>

    <default>
        <flatrate2>
            <active>1</active>
            <sallowspecific>0</sallowspecific>
            <model>module/carrier_flatrate2</model>
            <title>Flat Rate 2</title>
            <type>I</type>
            <specificerrmsg>This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.</specificerrmsg>
            <handling_type>F</handling_type>
        </flatrate2>
    </default>
</config>

Add the configuration fields after that in app/code/local/Vendor/Module/etc/system.xml:

<?xml version="1.0"?>
<config>
    <sections>
        <carriers>
            <groups>
                <flatrate2 translate="label" module="module">
                    <label>Flat Rate 2</label>
                    <frontend_type>text</frontend_type>
                    <sort_order>21</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <active translate="label">
                            <label>Enabled</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </active>
                        <name translate="label">
                            <label>Method Name</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>3</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </name>
                        <price translate="label">
                            <label>Price</label>
                            <frontend_type>text</frontend_type>
                            <validate>validate-number validate-zero-or-greater</validate>
                            <sort_order>5</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </price>
                        <handling_type translate="label">
                            <label>Calculate Handling Fee</label>
                            <frontend_type>select</frontend_type>
                            <source_model>shipping/source_handlingType</source_model>
                            <sort_order>7</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </handling_type>
                        <handling_fee translate="label">
                            <label>Handling Fee</label>
                            <frontend_type>text</frontend_type>
                            <validate>validate-number validate-zero-or-greater</validate>
                            <sort_order>8</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </handling_fee>
                        <sort_order translate="label">
                            <label>Sort Order</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>100</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </sort_order>
                        <title translate="label">
                            <label>Title</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>2</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </title>
                        <type translate="label">
                            <label>Type</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_shipping_flatrate</source_model>
                            <sort_order>4</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </type>
                        <sallowspecific translate="label">
                            <label>Ship to Applicable Countries</label>
                            <frontend_type>select</frontend_type>
                            <sort_order>90</sort_order>
                            <frontend_class>shipping-applicable-country</frontend_class>
                            <source_model>adminhtml/system_config_source_shipping_allspecificcountries</source_model>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </sallowspecific>
                        <specificcountry translate="label">
                            <label>Ship to Specific Countries</label>
                            <frontend_type>multiselect</frontend_type>
                            <sort_order>91</sort_order>
                            <source_model>adminhtml/system_config_source_country</source_model>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                            <can_be_empty>1</can_be_empty>
                        </specificcountry>
                        <showmethod translate="label">
                            <label>Show Method if Not Applicable</label>
                            <frontend_type>select</frontend_type>
                            <sort_order>92</sort_order>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </showmethod>
                        <specificerrmsg translate="label">
                            <label>Displayed Error Message</label>
                            <frontend_type>textarea</frontend_type>
                            <sort_order>80</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </specificerrmsg>
                    </fields>
                </flatrate2>
            </groups>
        </carriers>
    </sections>
</config>

Now you need to create the carrier models, to avoid duplicate code, this model extends the original flatrate carrier and only changes the fields that need to be changed

app/code/local/Vendor/Module/Model/Carrier/Flatrate2.php

<?php

class Vendor_Module_Model_Carrier_Flatrate2
    extends Mage_Shipping_Model_Carrier_Flatrate
    implements Mage_Shipping_Model_Carrier_Interface
{

    protected $_code = 'flatrate2';

    public function getAllowedMethods()
    {
        return array('flatrate2'=>$this->getConfigData('name'));
    }

}

Finally don't forget to create your helper:

app/code/local/Vendor/Module/Helper/Data.php

<?php

class Vendor_Module_Helper_Data extends Mage_Core_Helper_Abstract
{
}
  • I followed all the steps as outlined above - where can I find the second flat rate shipping method now? Thank you. – Allysin May 28 '18 at 16:21
  • can u provide github link – matinict Jul 28 '18 at 7:04
  • Anyone knows how to give free shipping using Webshopapps Matrix Rates in SHopping Cart Pricing rule? – Gem Sep 25 '18 at 8:05
5

There is open source extension which allows to setup multiple flat rates: https://github.com/thebod/Thebod_Shippingrates

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.