Archive for April, 2009

Magento Storefront Show Instock Products Only

Wednesday, April 22nd, 2009

Magento Storefront Show Instock Products Only
Define product mould:$_productC = Mage::getResourceModel(’reports/product_collection’);
John code: $_productC->joinField(’inventory_in_stock’, ‘cataloginventory/stock_item’,’is_in_stock’, ‘product_id=entity_id’, ‘{{table}}.is_in_stock=1?);
Example:
$storeId    = Mage::app()->getStore()->getId();
$category = Mage::registry(’current_category’);
$_productC = Mage::getResourceModel(’reports/product_collection’)
->addViewsCount()
->addAttributeToSelect(’*’)
->setStoreId($storeId)
->addStoreFilter($storeId)
->addCategoryFilter($category)
->setPageSize(12)
->setCurPage(1);
Mage::getSingleton(’catalog/product_status’)->addVisibleFilterToCollection($_productC);
Mage::getSingleton(’catalog/product_visibility’)->addVisibleInCatalogFilterToCollection($_productC);
$_productC->joinField(’inventory_in_stock’, ‘cataloginventory/stock_item’,’is_in_stock’, ‘product_id=entity_id’, ‘{{table}}.is_in_stock=1?);
$this->setProductCollection($_productC);

Magento Stores Ecommerce Search Engine Optimization

Sunday, April 19th, 2009

Magento Stores Ecommerce Search Engine Optimization
1.1. General Configuration
Magento is one of the most search engine friendly e-commerce platforms straight out of the box, but there are several known issues that can be taken care of to optimize your Magento SEO. The first step is to get the most recent release, 1.2.1. Then, to get started, [...]