0

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.

-4

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>
  • I dont see local.xml file in layout folder. Where can i find it? – Abhilash Narayan Oct 12 '17 at 12:21
  • Its not working – Abhilash Narayan Oct 12 '17 at 12:30
  • change : app/design/frontend/rwd/default/layout/local.xml – Rita Jose Oct 12 '17 at 12:32
  • 2
    @RitaJose I need to complain about your behaviour you have updated your code after my answer accepted, this should not be done magento.stackexchange.com/posts/196995/revisions – Murtuza Zabuawala Oct 12 '17 at 13:30
  • 3
    @MurtuzaZabuawala and ritarose,Please no more word. Hope both of you understood the situation.Please carry good work at MSE – Amit Bera Oct 13 '17 at 6:52
8

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

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.