Question

I need to add a custom css in checkout.xml file like this

<checkout_cart_index translate="label">
    <reference name="head">

    <action method="addCss">
                <stylesheet>css/new.css</stylesheet>
            </action>
    </reference>
</checkout_cart_index>

and its not working. I have changed my theme like this enter image description here

I have created local.xml file at \app\design\frontend\rwd\default\layout\local.xml

I am thinking that local.xml file is not loading.

Was it helpful?

Solution

You can add this xml code in your local.xml it will add css only for cart page

create a local.xml file in

app/design/frontend/theme/default/layout/local.xml

Paste below code in local.xml

<?xml version="1.0"?>
   <layout version="0.1.0">
      <checkout_cart_index> translate="label">
         <reference name="head">
            <action method="addCss">
                <stylesheet>css/new.css</stylesheet>
            </action>
         </reference>
     </checkout_cart_index>
  </layout>

OR

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

OTHER TIPS

You are using the wrong handler

 <checkout_cart_index>

Will add css to cart page not in check out page

replace with

<checkout_onepage_index>

this will add content to checkout page

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top