1

I tried overwriting system.xml file by creating new module in local.But it is not overwriting it.Any Solution?

app/etc/modules/JR_CustomCatalog.xml

<?xml version="1.0"?>
<config>
 <modules>
  <JR_CustomCatalog>
   <codePool>local</codePool>
   <active>true</active>
  </JR_CustomCatalog>
 </modules>
</config>

app/code/local/JR/CustomCatalog/etc/system.xml

<?xml version="1.0"?>    
<config>
    <tabs>
        <catalog translate="label" module="catalog">
            <label>Catalog</label>
            <sort_order>200</sort_order>
        </catalog>
    </tabs>
    <sections>
        <catalog translate="label" module="catalog">
            <class>separator-top</class>
            <label>Catalog</label>
            <tab>catalog</tab>
            <frontend_type>text</frontend_type>
            <sort_order>40</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <groups>
                <frontend translate="label">
                    <label>Frontend</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>1</show_in_store>
                    <fields>
                        <list_mode translate="label">
                            <label>List Mode</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_catalog_listMode</source_model>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </list_mode>
                        <grid_per_page_values translate="label comment">
                            <label>Products per Page on Grid Allowed Values</label>
                            <comment>Comma-separated.</comment>
                            <frontend_type>text</frontend_type>
                            <validate>validate-per-page-value-list</validate>
                            <!--<source_model>adminhtml/system_config_source_catalog_gridPerPage</source_model>-->
                            <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>
                        </grid_per_page_values>
                        <grid_per_page translate="label comment">
                            <label>Products per Page on Grid Default Value</label>
                            <comment>Must be in the allowed values list.</comment>
                            <frontend_type>text</frontend_type>
                            <validate>validate-per-page-value</validate>
                            <!--<source_model>adminhtml/system_config_source_catalog_gridPerPage</source_model>-->
                            <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>
                        </grid_per_page>
                        <list_per_page_values translate="label comment">
                            <label>Products per Page on List Allowed Values</label>
                            <comment>Comma-separated.</comment>
                            <frontend_type>text</frontend_type>
                            <validate>validate-per-page-value-list</validate>
                            <!--<source_model>adminhtml/system_config_source_catalog_gridPerPage</source_model>-->
                            <sort_order>4</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </list_per_page_values>
                        <list_per_page translate="label comment">
                            <label>Products per Page on List Default Value</label>
                            <comment>Must be in the allowed values list.</comment>
                            <frontend_type>text</frontend_type>
                            <validate>validate-per-page-value</validate>
                            <!--<source_model>adminhtml/system_config_source_catalog_listPerPage</source_model>-->
                            <sort_order>5</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </list_per_page>
                        <flat_catalog_category translate="label">
                            <label>Use Flat Catalog Category</label>
                            <frontend_type>select</frontend_type>
                            <frontend_model>adminhtml/system_config_form_field_select_flatcatalog</frontend_model>
                            <backend_model>catalog/system_config_backend_catalog_category_flat</backend_model>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>100</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>0</show_in_website>
                            <show_in_store>0</show_in_store>
                        </flat_catalog_category>

                        <flat_catalog_product translate="label comment">
                            <label>Use Flat Catalog Product</label>
                            <comment><![CDATA[Enable for reindexing a big number of SKUs]]>.</comment>
                            <frontend_type>select</frontend_type>
                            <frontend_model>adminhtml/system_config_form_field_select_flatproduct</frontend_model>
                            <backend_model>catalog/system_config_backend_catalog_product_flat</backend_model>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>100</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>0</show_in_website>
                            <show_in_store>0</show_in_store>
                        </flat_catalog_product>
                        <default_sort_by translate="label comment">
                            <label>Product Listing Sort by</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_catalog_listSort</source_model>
                            <sort_order>6</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </default_sort_by>
                        <list_allow_all translate="label comment">
                            <label>Allow All Products per Page</label>
                            <comment>Whether to show "All" option in the "Show X Per Page" dropdown.</comment>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>6</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </list_allow_all>
                        <parse_url_directives translate="label comment">
                            <label>Allow Dynamic Media URLs in Products and Categories</label>
                            <comment>E.g. {{media url="path/to/image.jpg"}} {{skin url="path/to/picture.gif"}}. Dynamic directives parsing impacts catalog performance.</comment>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>200</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </parse_url_directives>
                    </fields>
                </frontend>
                <sitemap translate="label">
                    <label>Sitemap</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>1</show_in_store>
                    <fields>
                        <tree_mode translate="label">
                            <label>Use Tree Like Category Sitemap</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>1</show_in_store>
                        </tree_mode>
                        <lines_perpage translate="label">
                            <label>Minimum Lines per Page</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>5</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </lines_perpage>
                    </fields>
                </sitemap>
                <product_image translate="label">
                    <label>Product Image</label>
                    <sort_order>200</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <base_width translate="label comment">
                            <label>Base Image Width</label>
                            <comment>Maximum width base product image will be scaled down to in pixels</comment>
                            <frontend_type>text</frontend_type>
                            <sort_order>10</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </base_width>
                        <small_width translate="label comment">
                            <label>Small Image Width</label>
                            <comment>Maximum width small product image will be scaled down to in pixels</comment>
                            <frontend_type>text</frontend_type>
                            <sort_order>20</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </small_width>
                    </fields>
                </product_image>
                <placeholder translate="label">
                    <label>Product Image Placeholders</label>
                    <clone_fields>1</clone_fields>
                    <clone_model>adminhtml/system_config_clone_media_image</clone_model>
                    <sort_order>300</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <placeholder>
                            <label></label>
                            <frontend_type>image</frontend_type>
                            <backend_model>adminhtml/system_config_backend_image</backend_model>
                            <upload_dir config="system/filesystem/media" scope_info="1">catalog/product/placeholder</upload_dir>
                            <base_url type="media" scope_info="1">catalog/product/placeholder</base_url>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </placeholder>
                    </fields>
                </placeholder>

                <seo translate="label">
                    <label>Search Engine Optimizations</label>
                    <frontend_type>text</frontend_type>
                    <sort_order>500</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <category_url_suffix translate="label comment">
                            <label>Category URL Suffix</label>
                            <frontend_type>text</frontend_type>
                            <backend_model>catalog/system_config_backend_catalog_url_rewrite_suffix</backend_model>
                            <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>
                            <comment>Cache refresh needed.</comment>
                        </category_url_suffix>
                        <product_url_suffix translate="label comment">
                            <label>Product URL Suffix</label>
                            <frontend_type>text</frontend_type>
                            <backend_model>catalog/system_config_backend_catalog_url_rewrite_suffix</backend_model>
                            <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>
                            <comment>Cache refresh needed.</comment>
                        </product_url_suffix>
                        <product_use_categories translate="label">
                            <label>Use Categories Path for Product URLs</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <backend_model>adminhtml/system_config_backend_seo_product</backend_model>
                            <sort_order>4</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </product_use_categories>
                        <save_rewrites_history translate="label">
                            <label>Create Permanent Redirect for URLs if URL Key Changed</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>5</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </save_rewrites_history>
                        <title_separator translate="label">
                            <label>Page Title Separator</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>6</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </title_separator>
                        <category_canonical_tag translate="label">
                            <label>Use Canonical Link Meta Tag For Categories</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>7</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </category_canonical_tag>
                        <product_canonical_tag translate="label">
                            <label>Use Canonical Link Meta Tag For Products</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>8</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </product_canonical_tag>
                    </fields>
                </seo>

                <price translate="label">
                    <label>Price</label>
                    <frontend_type>text</frontend_type>
                    <sort_order>400</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>0</show_in_website>
                    <show_in_store>0</show_in_store>
                    <fields>
                        <scope translate="label comment">
                            <label>Catalog Price Scope</label>
                            <comment><![CDATA[Defines the base currency scope ("Currency Setup" > "Currency Options" > "Base Currency")]]>.</comment>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_price_scope</source_model>
                            <backend_model>adminhtml/system_config_backend_price_scope</backend_model>
                            <sort_order>1</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>0</show_in_website>
                            <show_in_store>0</show_in_store>
                        </scope>
                    </fields>
                </price>                    

            </groups>
        </catalog>
        <design>
            <groups>
                <watermark translate="label">
                    <label>Product Image Watermarks</label>
                    <clone_fields>1</clone_fields>
                    <clone_model>adminhtml/system_config_clone_media_image</clone_model>
                    <sort_order>400</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <size translate="label">
                            <label>Watermark Default Size</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>1</show_in_store>
                            <comment>Example format: 200x300.</comment>
                        </size>
                        <imageOpacity translate="label">
                            <label>Watermark Opacity, Percent</label>
                            <frontend_type>text</frontend_type>
                            <sort_order>150</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </imageOpacity>
                        <image translate="label">
                            <label>Watermark</label>
                            <frontend_type>image</frontend_type>
                            <backend_model>adminhtml/system_config_backend_image</backend_model>
                            <upload_dir config="system/filesystem/media" scope_info="1">catalog/product/watermark</upload_dir>
                            <base_url type="media" scope_info="1">catalog/product/watermark</base_url>
                            <sort_order>200</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                            <comment>Allowed file types: jpeg, gif, png.</comment>
                        </image>
                        <position translate="label">
                            <label>Watermark Position</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_watermark_position</source_model>
                            <sort_order>300</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </position>
                    </fields>
                </watermark>
            </groups>
        </design>
        <cms>
            <groups>
                <wysiwyg>
                    <fields>
                        <use_static_urls_in_catalog translate="label comment">
                            <label>Use Static URLs for Media Content in WYSIWYG for Catalog</label>
                            <comment>Applicable to catalog products and categories only. Any media content will be inserted into editor as a static URL. It is not updated if the system configuration base URL changes.</comment>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <frontend_type>select</frontend_type>
                            <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_static_urls_in_catalog>
                    </fields>
                </wysiwyg>
            </groups>
        </cms>
        <sales>
            <groups>
                <msrp translate="label">
                    <label>Minimum Advertised Price</label>
                    <frontend_type>text</frontend_type>
                    <sort_order>110</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>0</show_in_store>
                    <fields>
                        <enabled translate="label">
                            <label>Enable MAP</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>10</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </enabled>
                        <apply_for_all translate="label comment">
                            <label>Apply MAP (Default Value)</label>
                            <frontend_type>select</frontend_type>
                            <source_model>adminhtml/system_config_source_yesno</source_model>
                            <sort_order>20</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                            <comment><![CDATA[<strong style="color:red">Warning!</strong> Applying MAP by default will hide all product prices on the frontend.]]></comment>
                        </apply_for_all>
                        <display_price_type translate="label">
                            <label>Display Actual Price</label>
                            <frontend_type>select</frontend_type>
                            <source_model>catalog/product_attribute_source_msrp_type</source_model>
                            <sort_order>30</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>0</show_in_store>
                        </display_price_type>
                        <explanation_message translate="label">
                            <label>Default Popup Text Message</label>
                            <frontend_type>textarea</frontend_type>
                            <sort_order>40</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </explanation_message>
                        <explanation_message_whats_this translate="label">
                            <label>Default "What's This" Text Message</label>
                            <frontend_type>textarea</frontend_type>
                            <sort_order>50</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </explanation_message_whats_this>
                    </fields>
                </msrp> 
            </groups> 
        </sales> 
    </sections>
</config>
  • what did you tried so far? – Qaisar Satti Oct 5 '15 at 12:50
  • First i created module in etc folder then i created system file for that module in local folder by following folder structure – Donika Oct 5 '15 at 12:52
  • paste your code here too.. – Qaisar Satti Oct 5 '15 at 12:52
  • I want to remove last section "minimum advertised price". I commented that section but nothing happens – Donika Oct 5 '15 at 13:02
2

The system.xml files are not overwritten. They are merged.
But you can make that section not visible anywhere and it should work.
So, your xml can look like this:

<?xml version="1.0"?>    
<config>
    <sections>
        <sales>
            <groups>
                <msrp translate="label">
                    <show_in_default>0</show_in_default>
                    <show_in_website>0</show_in_website>
                    <show_in_store>0</show_in_store>
                </msrp>
            </groups>
        </sales>
    </sections>
</config>

Just make sure your module depends on the Mage_Catalog module.

  • So...is it working or not? – Marius Oct 7 '15 at 4:51
  • Actually what you have written is correct that system.xml cannot be overwritten. It is working. But do you have any solution for removing particular section from system.xml file but not from core folder. for e.g I want to remove "gift options" from sales page in admin panel ..how to remove that section.? – Donika Oct 7 '15 at 4:55

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.