5

I understand that you can set default store config values by using the syntax

<default>
    <path>
        <to>
            <config>value</config>
        </to>
    </path>
</default>

but i am also pretty certain that it is possible to set default values for individual store views in config.xml also . Without the need to set manually in admin or by using an upgrade script.

Is it possible?

I have tried

<storecode>
    <path>
        <to>
            <config>value</config>
        </to>
    </path>
</storecode>

but that didnt work

1

2 Answers 2

5

As the answer in this stackoverflow question says you need some another node surrounding your code. When you wrap your code with <stores> and then it will work.

<default>
    <some>
        <config>
            <value>default</value>
        </config>
    </some>
</default>
<stores>
    <your_store_code>
        <some>
            <config>
                <value>something</value>
            </config>
        </some>
    </your_store_code>
</stores>
5

The same is also possible for websites:

<websites>
    <your_website_code>
        <some>
            <config>
                <value>something</value>
            </config>
        </some>
    </your_website_code>
</websites>

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.