0
votes

How do know which product type to use in Magento? Especially, when should I use simple and configurable products?

3

3 Answers

8
votes

Get product collection by type :

$collectionSimple = Mage::getResourceModel('catalog/product_collection')
                ->addAttributeToFilter('type_id', array('eq' => 'simple'));
$collectionConfigurable = Mage::getResourceModel('catalog/product_collection')
                ->addAttributeToFilter('type_id', array('eq' => 'configurable'));
$collectionBundle = Mage::getResourceModel('catalog/product_collection')
                ->addAttributeToFilter('type_id', array('eq' => 'bundle'));
$collectionGrouped = Mage::getResourceModel('catalog/product_collection')
                ->addAttributeToFilter('type_id', array('eq' => 'grouped'));
$collectionVirtual = Mage::getResourceModel('catalog/product_collection')
                ->addAttributeToFilter('type_id', array('eq' => 'virtual'));
4
votes

This wiki page describes the different product types.

1
votes

If you have options to select before adding the product to cart, then use configurable product. For example, Shoes. In shoes, you have the option to select size.

If you don't have any option to set before adding product to cart, then use simple product.