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

2 Answers 2

-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>
14
  • I dont see local.xml file in layout folder. Where can i find it? Oct 12, 2017 at 12:21
  • Its not working Oct 12, 2017 at 12:30
  • change : app/design/frontend/rwd/default/layout/local.xml
    – Rita Jose
    Oct 12, 2017 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 Oct 12, 2017 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, 2017 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

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.