Displaying Specific Category at Checkout

28 Views Asked by At

I am trying to display a custom category on my onepage checkout (info.phtml) in Magento 1.

From the Admin-> Categories-> Manage Categories, I have created the category with the id '349'.

I want this category to display ONLY if it is "active". If Disabled, then the code will not load in the checkout.

Below is the code so far:

<?php
$specificCatID = '349';
$category = mage :: getModel('catalog/category') -> load ($specificCatID);
   if ($category -> getIsActive()){
       ***echo $this->getChildHtml('checkout-promo');***
   }else{
       echo "no";
   }
 ?>

The bold part of the code is where i think i am going wrong, but I cant seem to find anything on the internet that will help me with this.

Can anyone explain to me how to call a category with php in a phtml file?

Any help will be appreciated. Thanks.

0

There are 0 best solutions below