0

サイトにはフランス語とオランダ語の 2 つの言語があり、2 つのストア ビューで表されます。フランス語がデフォルトです。SEO の取り組みでは、次の URL が必要です。

  1. フランス語 - http://www.domain.com/category/product
  2. オランダ語 - http://www.domain.com/nl/category/product

System -> Configuration -> Web -> Add Store Codes to URL は、オール オア ナッシングの設定です。デフォルトストアのみをオフにする必要があります。

助言がありますか?

4

2 に答える 2

0

After short investigation I found that it is possible, but it is not programmatically enabled by default.

Take a look in this file from app/code/core/Mage/Core/etc/system.xml:

// around line 1092 - magento v1.6.2.0
<use_store translate="label">
    <label>Add Store Code to Urls</label>
    <frontend_type>select</frontend_type>
    <source_model>adminhtml/system_config_source_yesno</source_model>
    <backend_model>adminhtml/system_config_backend_store</backend_model>
    <sort_order>10</sort_order>
    <show_in_default>1</show_in_default>
    <show_in_website>0</show_in_website>
    <show_in_store>0</show_in_store>
</use_store>

This three lines indicates configuration visibility in current scope

<show_in_default>1</show_in_default>
<show_in_website>0</show_in_website>
<show_in_store>0</show_in_store>

Unfortunately you cannot simply change those values to 1, because magento after upgrade overwrites all core files from app/core and you will lose all setup that was done there.

You can override config by overriding module system. Check: How to override a Magento administration panel?

I am a new with Magento world. Perhaps there's an easier way to do it

Greetings Marcin

于 2012-08-14T10:44:30.407 に答える