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
  • can you provide your checkout page URL, though its local URL, and If you are using custom checkout extension then also let me know Commented Oct 12, 2017 at 12:33
  • My URL: magento/checkout/onepage Commented Oct 12, 2017 at 12:53
  • I tried your solution but not working yet Commented Oct 12, 2017 at 12:53
  • check updated answer Commented Oct 12, 2017 at 12:58

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? Commented Oct 12, 2017 at 12:21
  • Its not working Commented Oct 12, 2017 at 12:30
  • change : app/design/frontend/rwd/default/layout/local.xml
    – Rita Jose
    Commented 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 Commented 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
    Commented 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
  • You are always welcome :) Commented Oct 12, 2017 at 13:02

Your Answer

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

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