Magento themes and extensions

Magento Custom Category Listing Block

Share
Posted on March 30th, 2013 | Posted by admin

Magento Custom Category Listing Block

<?php
$cats = Mage::getModel('catalog/category')->load(2)->getChildren();
$catIds = explode(',',$cats);
?>
<ul>
<?php foreach($catIds as $catId): ?>
<li>
<?php
$category = Mage::getModel('catalog/category')->load($catId);
echo $category->getName();
$subCats = Mage::getModel('catalog/category')->load($category->getId())->getChildren();
$subCatIds = explode(',',$subCats);
?>
<?php if(count($subCatIds) > 1):?>
<ul>
<?php foreach($subCatIds as $subCat) :? >

Magento bug: custom option values not showing in backend

Share
Posted on March 22nd, 2013 | Posted by admin

It’s a little bit annoying that such a core feature is just broken in many versions of magento – the headings for the custom options chosen, whilst fully working on the cart; checkout and emails to the customer, only show the heading and no content on the backend order.

There are a couple of fixes :
in
app/code/core/Mage/Adminhtml/Block/Sales/Items/Column/Name.php
there is no extending, so you can copy it to
app/code/local/Mage/Adminhtml/Block/Sales/Items/Column/Name.php
and add the following class method :

How to create a custom setup script in Magento

Share
Posted on January 6th, 2013 | Posted by admin

During the past days we have had some problems when updating our Magento custom modules. Oddly, even though we created the mysql4-upgrade file and edited the config.xml with the new version, the upgrade script wouldn’t run. Why? We don’t know.

But we needed a quick solution because there was an important issue in the production server. We finally decided to create a custom setup script to edit one of the attributes. So here is how you can simulate the Magento module $setup from your custom script (I’m assuming that you’re creating your php script in the Mageto root directory.

Custom design fallbacks in Magento

Share
Posted on December 10th, 2012 | Posted by admin

Basic introduction

Magento’s templating and skinning concepts offer great flexibility to adapt your shop to your visiual requirements. Fallback mechanisms are widely used inside the “Magento framework” and also apply to theming and skinning.

Files that are used for creating the output are located in:

app/design/<area>/<package>/<theme>

and

skin/<area>/<package>/<theme>

“Area” is one of “frontend”, “adminhtml” or “install”.

In the Magento backend you configure the package and the theme you want to use. Magento ships with a “base” package including a “default” theme. The enterprise edition adds a second package called “enterprise” that also comes with a “default” theme containing a modified design including the additional features of the enterprise edition.

Here is how this is configured in the backend:

Adding your custom module to Magento’s Admin Global Search

Share
Posted on November 4th, 2012 | Posted by admin

When creating a custom module in Magento, have you ever wanted to add custom search functionality to the Magento admin area, allowing users to search your module? Today I will attempt to show you in the most simple of terms how you can achieve this and add to Magento’s global search.

For this example I will be using a custom module called Matt_Car, a fictitious module that may contain information on a car and output on the store front. We will be adding functionality to search by car name or brand within Magento’s admin area global search box.

I will assume you’ve already created a custom module, as this will be the module you are searching, but your module declaration should look something like…

Page 1 of 712345»...Last »