3

Wondering if this is a bug or this was a design decision?

How should I go about it if I want to enable flat rate for only one of my store?

a) Try to make the default "Flat Rate" work on a single store & stay disable on all others?

b) Just create a new shipping method which I can configure on a store level and I just enabled it on the store I want?

Thoughts?

3 Answers 3

3

I think this is a concept thing. Usually a store view only depends on the language and should have basically the same assets. That's why most of the shipping and payment methods can be changed at website level only.
It works without any issues if you change it at store view level.
To allow that you will need an extension that overrides the setting of the active flag for the flat rate. For this create a module. Let's call it Easylife_Flatrate with the following files: app/etc/modules/Easylife_Flatrate.xml - the declaration file

<?xml version="1.0"?>
<config>
    <modules>
        <Easylife_Flatrate>
            <active>true</active>
            <codePool>local</codePool>
            <depends>
                <Mage_Shipping /><!-- should depend on the shipping module -->
            </depends>
        </Easylife_Flatrate>
    </modules>
</config>

app/code/local/Easylife/Flatrate/etc/system.xml - the system->configuration fields

<?xml version="1.0"?>
<config>
    <sections>
        <carriers>
            <groups>
                <flatrate>
                    <fields>
                        <active>
                            <show_in_store>1</show_in_store><!-- override the show_in_store value -->
                        </active>
                    </fields>
                </flatrate>
            </groups>
        </carriers>
    </sections>
</config>

If you need to change other fields as well on the store view level add other tags inside this system.xml files just like <active>.

5
  • I tried setting the value of <show_in_store> to 1 in core file directly to see if that alone would fix it. Unfortunately it throws an error when that shipping method is selected on checkout Invalid shipping method since that's not returned in the collection while trying to match its code.
    – Ashfame
    Commented Aug 9, 2013 at 15:02
  • Ok so if I enable it on a website level and disable on all the store views except on the one I want, this is working now. I will now override the XML like you have explained. Thanks!
    – Ashfame
    Commented Aug 9, 2013 at 15:39
  • Do you know if this would also work for tablerates?
    – Tobias
    Commented Jan 15, 2015 at 16:02
  • 1
    @TobiasZander. Not really. This solution will only enable some config field, but the table that holds the table rates has a website_id column to remember the website. This is also used on frontend to retrieve the shipping costs. For table rates you need to modify a lot more...the table, the import and the frontend retrieving mechanism.
    – Marius
    Commented Jan 15, 2015 at 16:31
  • @Marius: thanks a lot. that's what I thought but great to get a confirmation from your
    – Tobias
    Commented Jan 15, 2015 at 16:33
3

I followed Marious's trick to update free shipping too as below:

<?xml version="1.0"?>
<config>
    <sections>
        <carriers>
            <groups>
                <freeshipping>
                    <fields>
                        <active>
                            <show_in_store>1</show_in_store>
                        </active>
                        <free_shipping_subtotal>
                            <show_in_store>1</show_in_store>
                        </free_shipping_subtotal>
                        <sort_order>
                            <show_in_store>1</show_in_store>
                        </sort_order>
                        <sallowspecific>
                            <show_in_store>1</show_in_store>
                        </sallowspecific>
                        <specificcountry>
                            <show_in_store>1</show_in_store>
                        </specificcountry>
                        <showmethod>
                            <show_in_store>1</show_in_store>
                        </showmethod>
                    </fields>
                </freeshipping>
            </groups>
        </carriers>
    </sections>
</config>

I only need <free_shipping_subtotal/> though, so removed others. Just wanted to test that it works for all other fields too :)

0

You should be able to take the check out of Use Default/Use Website, and make the changes on that level. If not, what version are you using?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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