Search This Blog

Friday, August 30, 2013

Magento admin Manage Product Grid show message when filter is reset or set

In magento admin ->Manage Product->Grid
I want to show message when filter is reset, any one has any ideas?

Flop ideas,
1. getting it in session cos bock loads first then controller so msg wont be displayed....
2. Over Riding Grid Widet (just for a clear filter msg i wont over ride the module from core...)



Probable solution

public function gridAction()
{
$value=base64_decode(Mage::app()->getRequest()->getParam(’product_filter’));
if (strstr($value, ‘sku’))
{
$this->_getSession()->addSuccess($this->__(’SKU Filter SET’));
}
$this->loadLayout();
$this->renderLayout();
}

in the extended function of Mage_Adminhtml_Catalog_ProductController

http://shivakumariyer.blogspot.in/

https://www.facebook.com/groups/278585072228917/

http://www.magentocommerce.com/boards/viewthread/532353/

http://www.magentocommerce.com/boards/viewthread/532352/

Saturday, July 13, 2013

Magento code for url rewrite and flat table indexing product id wise and store wise

  • Magento code for url rewrite and flat table indexing product id wise and store wise
  • How to index individual /particular product in magento, store wise, for single product or single id,
  • Code in magento indexing with sku, product id, flat table indexing with single product
  • Magento indexing with sku, product id, flat table indexing with single product

For particular store

$productId=array(166,162);
$storeId=1;
Mage::getModel('catalog/product_flat_indexer')->updateProduct(array($productId),$storeId);

For all stores 
$productId=array(166,162);
$storeId=null;
Mage::getModel('catalog/product_flat_indexer')->updateProduct(array($productId),$storeId);



For URL indexing check or core url rewrite

taken from app/code/core/Mage/Catalog/Model/Url.php
Mage::getModel('catalog/url')->refreshProductRewrite($productId,$storeId);
Run url rewrite first and then for flat