के लिए system.xmlफ़ाइलों को ऐसा लगता है कि यह वर्ग फ़ाइलों के लिए करता है काम नहीं करता। system.xmlफ़ाइलों Magento के सक्रिय मॉड्यूल से एकत्र कर रहे हैं। बस एक localफ़ोल्डर में नकल करने का मतलब यह नहीं है कि यह एक मॉड्यूल में है, क्योंकि मॉड्यूल घोषणा फ़ाइल अभी भी कहती है कि मॉड्यूल coreकोडपूल का है।
यदि आप किसी अनुभाग में नए फ़ील्ड जोड़ना चाहते हैं या कुछ फ़ील्ड को ओवरराइड करना चाहते हैं, तो आपको अपना मॉड्यूल बनाने की आवश्यकता है।
यहां एक उदाहरण दिया गया है कि आप अनुभाग में एक नया क्षेत्र कैसे जोड़ सकते हैं Catalog->Frontendऔर एक ही अनुभाग में एक को कैसे ओवरराइड कर सकते हैं।
मान लीजिए कि आपका मॉड्यूल कहा जाता है Easylife_Catalog।
आपको निम्न फ़ाइलों की आवश्यकता होगी:
app/etc/modules/Easylife_Catalog.xml- घोषणा फ़ाइल
<?xml version="1.0"?>
<config>
<modules>
<Easylife_Catalog>
<active>true</active>
<codePool>local</codePool>
<depends>
<Mage_Catalog />
</depends>
</Easylife_Catalog>
</modules>
</config>
app/code/local/Easylife/Catalog/etc/config.xml - कॉन्फ़िगरेशन फ़ाइल
<?xml version="1.0"?>
<config>
<modules>
<Easylife_Catalog>
<version>0.0.1</version>
</Easylife_Catalog>
</modules>
</config>
app/etc/local/Easylife/Catalog/etc/system.xml- सिस्टम-> कॉन्फ़िगरेशन फ़ाइल
मान लें कि आप List Modeकेवल वैश्विक स्तर (कोई वेबसाइट और स्टोर व्यू स्तर) पर उपलब्ध होने के लिए फ़ील्ड को बदलना चाहते हैं । सेटिंग मार्ग है catalog/frontend/list_mode। तब system.xmlइस तरह दिखेगा:
<?xml version="1.0"?>
<config>
<sections>
<catalog><!-- first part of the path -->
<groups>
<frontend><!-- second part of the path -->
<fields>
<list_mode><!-- third part of the path -->
<show_in_website>0</show_in_website><!-- this will override the core value -->
<show_in_store>0</show_in_store><!-- this will override the core value -->
</list_mode>
</fields>
</frontend>
</groups>
</catalog>
</sections>
</config>
अब मान लेते हैं कि आप customउसी कॉन्फिगर सेक्शन में एक नया फील्ड जोड़ना चाहते हैं । अब ऊपर का xml बन गया
<?xml version="1.0"?>
<config>
<sections>
<catalog><!-- first part of the path -->
<groups>
<frontend><!-- second part of the path -->
<fields>
<list_mode><!-- third part of the path -->
<show_in_website>0</show_in_website><!-- this will override the core value -->
<show_in_store>0</show_in_store><!-- this will override the core value -->
</list_mode>
<custom translate="label"><!-- your new field -->
<label>Custom</label>
<frontend_type>text</frontend_type>
<sort_order>1000</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</custom>
</fields>
</frontend>
</groups>
</catalog>
</sections>
</config>
मुझे नहीं पता कि इस विधि का उपयोग करके कॉन्फ़िगरेशन से कुछ फ़ील्ड निकालने की कोई विधि है या नहीं। मैंने इसकी तलाश की लेकिन कुछ नहीं मिला।