Magento Themes and Magento Extensions

Run Magento Code Outside of Magento

Posted on May 7th, 2011 | Posted by admin

Hi All -
Finally time for a new post! (Something I’m surprised I haven’t covered yet).
This post will inform you on how to run Magento code outside of Magento. All you need is to have access to Magento’s ‘app/Mage.php‘ file.

This will be handy code for a few things:

  • Integration with 3rd party items – shared sessions, or just shared themes
  • Ajax calls – although not the preferred solutions for Ajax calls, it is a quick and easy one

To expand on these ideas a bit more:
-You can use this code to output HTML that is outputted in Magento anywhere. You might want to integrate WordPress and steal the navigation from Magento, for instance. You might want to share sessions and users between your CMS and Magento (and even share the databases). This can help you get started on doing that.

Magento Vertical Category Menu

Posted on February 21st, 2011 | Posted by admin

Magento Vertical Menu using Peter Hamilton’s code

In one of our premium Magento themes we implemented a vertical category menu with the code adapted from this thread. It’s quite easy to implement and to make it even easier for others, we decided to write a step by step tutorial.

  • Add a new block type in “catalog.xml” file
  • Create a new phtml file and name it “leftnav.phtml”, place it inside catalog/navigation
  • Edit CSS

Add a new block type in “catalog.xml” file

Here we presume you want to have the vertical category menu shows up on every page, to do so, we will place the code in the <default> layout like so, and we want it to always stay on the top, so we added “before=”-”:

Page 2 of 2«12