Magento Themes and Magento Extensions

Magento – how do I get associated products of product Group?

Share
Posted on September 29th, 2012 | Posted by admin

how do I get associated products of product Group in Magento ?

I am looping through products results, and if the product is a grouped product, I want to get all products in that group. I’m doing this:

$products = Mage::getModel('catalog/product')
                    ->getCollection()
                    ->addAttributeToSelect('*');
foreach ($products as $product) {
    if ($product->getTypeId() == 'grouped'){
        // how do I now get associated products of $product?
    }
}

Get productID from specific order in Magento

Share
Posted on September 29th, 2012 | Posted by admin

Get productID from specific order in Magento
$order = Mage::getModel(‘sales/order’)->load($order_id);
$items = $order->getAllItems();
$itemcount=count($items);
$name=array();
$unitPrice=array();
$sku=array();
$ids=array();
$qty=array();
foreach ($items as $itemId => $item)

Magento Caching Custom Images

Share
Posted on September 27th, 2012 | Posted by admin

Magento Caching Custom Images

I am using the avalanche theme and make use of the homepage slider.

The images are added to the site via a section in the admin panel and they are stored in

media/banners/default/slidex.jpg

I notice that these images are not being cached and loaded directly from their location. Is there any way to include images such as these in the magento image cache in order to reduce load time?

As these are large banner images you would expect them to take longer to load, however in the pingdom tools analysis for my home page it indicates that the server side wait is much longer than the time it actually takes to receive the files.

Edit/Remove Contact Us page in Magento

Share
Posted on September 26th, 2012 | Posted by admin

Link to Contact Us page

By default, link to Contact Us page is added into footer menu:

 Edit/Remove Contact Us page in Magento

More Flexible Approach for Listing Sale Products in Magento

Share
Posted on September 25th, 2012 | Posted by admin

One of my recent articles was on the subject of sorting “On Sale” product in Magento. The following is a cleaner and more advanced look at how—with few tricks and smart moves—you can reuse existing Magento code and modify it to suit your needs.

Product can be “on sale” in two ways:

1. when an item has a special price assigned to it on the individual level, or

2. when a special promotion “covers” the item

It is important to remember that you don’t have to set up the special price on each product to get it to be on sale; you can simply create a promotion rule and say something like “Set all the products in Category X to be on sale.”

I provided few screenshots at the bottom of this article to provide a closer look at what I’m talking about. I will not go into too much details here since this is a bit more advanced HOW TO, but here is the process in a nutshell:

First, create a copy of /catalog/product/list.phtml file and name it onsale_list.phtml. Here is my version of onsale_list.phtml file.

Second,  “activate” this new file. There are few ways you can do this. Let’s say you wish to assign this onsale_list.phtml on one of our categories, named “On Sale,” for instance.

Page 1 of 612345»...Last »