0

I have a checkout module which have a little bit of new.css file are there. I want include if checkout module is enabled other wise no need. Unfortunately, its not include the page in head. if I remove ifconfig condition it's working other wise it's not included. my code is

local.xml-> this is not working

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
<reference name="head">
            <action method="addItem" ifconfig="checkout/settings/enabled"><type>skin_css</type><name>css/new.css</name></action>
        </reference>
  </default>

local.xml-> this is working

<?xml version="1.0"?>
<layout version="0.1.0">
    <default>
<reference name="head">
            <action method="addItem" ><type>skin_css</type><name>css/new.css</name></action>
        </reference>
  </default>

Can any one tell me where I went wrong?

if checkcout module is enable this file should be include other wise no need.

  • have you added settings in the config file of checkout – Helphin Mar 13 '14 at 10:28
  • @Helphin, no. Can you post little bit of code. – Magento Nav Mar 13 '14 at 10:48
1

Add below code(sample) in the checkout/etc/system.xml inside the groups,

            <settings translate="label">
                <fields>
                    <enabled translate="label">
                        <label>Enabled</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>
                    </enabled>
                <fields>    
            <settings>      
  • You're welcome. Glad I could help. – Helphin Mar 13 '14 at 11:25

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.