One of my client’s is running a special promotion in their Magento store and they want to add banner on the shopping cart page with the details of the promotion and to remind the customers to take advantage of it. Specifically, they want to put the banner just above the shopping cart contents table as highlighted in this picture:
There’s a number of ways this can be achieved, including copying the cart.phtml file from the base theme into your own theme and customizing it, but by far the easiest way—and most convenient from the point of view of long-term maintenance—is to utilize your theme’s local.xml layout file.
First, create a CMS static block in Magento’s back end with the promotion image. Then, add this into the local.xml file in /app/design/frontend/your_package/your_theme/layout/:
<block type="cms/block" name="promotion_banner_cart" after="checkout.cart.top_methods" >
Here the ‘your_cms_block_id’ bit is the identifier of the promotion banner CMS block you created in the first step.
You’re all set—admire your shining new banner on the cart page.