1

Magento has a default bar that has two buttons: Account and Cart. I would like to display this bar on my homepage which has a blank layout but I can't figure out how to do this. I came across this code snippet:

Mage::getUrl('checkout/cart')

I am unsure of whether this is the code I need, or if there is a better way to do it. I'm new to Magento and not yet comfortable with using it. Should I be trying to do this from Magento CMS or somewhere in the backend?

Any help would be greatly appreciated. Been stuck on this for a while.

5
  • your homepage is a cms page or any other? Commented Jul 19, 2015 at 10:20
  • Yes it is a CMS page that follows the blank layout. I added some content to the homepage but I want to include the default shopping cart BUTTON in the header of the homepage. Any ideas? Is it better to do it programatically?
    – Omar Rida
    Commented Jul 19, 2015 at 10:25
  • In that cms page design section, check which layout you have been selected Commented Jul 19, 2015 at 10:28
  • The layout selected is "Empty".
    – Omar Rida
    Commented Jul 19, 2015 at 10:32
  • check the answer Commented Jul 19, 2015 at 10:37

1 Answer 1

2

To show Account and Cart in empty layout,make the changes in below file,

app\design\frontend\package\theme\template\page\empty.phtml

Add the below line,

 <?php echo $this->getChildHtml('header') ?>

after,

 <?php echo $this->getChildHtml('after_body_start') ?>
1
  • Great answer! How can I show the account and cart without the rest of the header? I don't want to display the logo, search bar. I just want the Cart, and Account buttons to show on the homepage. Thanks in advance.
    – Omar Rida
    Commented Jul 19, 2015 at 11:08

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.