$limit=Mage::getSingleton('catalog/session')->getLimitPage();
Tuesday, 26 August 2014
Monday, 25 August 2014
Get product attribute’s select option id/label/value in magento
$productModel = Mage::getModel('catalog/product');
$attr = $productModel->getResource()->getAttribute("color");
echo $color_id = $attr->getSource()->getOptionId("Red");
Tuesday, 5 August 2014
Magento toolbar use in custom product calection
$toolbar = Mage::getBlockSingleton('catalog/product_list')->getToolbarBlock();
$toolbar->setCollection($_productCollection);
$layout = Mage::getSingleton('core/layout');
$pager = $layout->createBlock('page/html_pager');
$toolbar->setChild('product_list_toolbar_pager', $pager);
echo $toolbar->toHtml();
$this->getToolbarHtml() eta comment kore ei code lagabe
$toolbar->setCollection($_productCollection);
$layout = Mage::getSingleton('core/layout');
$pager = $layout->createBlock('page/html_pager');
$toolbar->setChild('product_list_toolbar_pager', $pager);
echo $toolbar->toHtml();
$this->getToolbarHtml() eta comment kore ei code lagabe
Magento Get product attribute 'option label'
<?php echo $product->getResource()->getAttribute($attribute_code)->getFrontend()->getLabel($product); ?>
Friday, 1 August 2014
Subscribe to:
Posts (Atom)