A place to log my programming solutions.

Tagged :: search

6
Mar 10

Refresh Magento Cache Programmatically

When writing processes to automate some of Magento’s normally laborious tasks, perhaps for a product-import script, a mass attribute update script, category import, or inventory adjustment, keep in mind that you may have to refresh some kind of cache — especially when working with attributes. If you are encountering quirks or inconsistencies with your data, try these:

  • Rebuild Catalog Index
    Mage::getSingleton('catalog/index')->rebuild();
  • Rebuild Flat Catalog Product
    Mage::getResourceModel('catalog/product_flat_indexer')->rebuild();
  • Inventory Stock
    Mage::getSingleton('cataloginventory/stock_status')->rebuild();

For more cache refreshes, such as:

  • Catalog Rewrites
  • Layered Navigation Indices
  • Product Image
  • Search Index

… please refer to the source of this knowledge http://www.magentocommerce.com/boards/viewthread/43238/#t156277

20
Aug 09

Clear Magento Customers, Orders, Searches, and Tags

From the Magento dashboard, there is no intuitive way of deleting/clearing/resetting customer, order, search, or tag data. As developers, we have to test the various functions of our specific Magento setup before presenting it to the client. Before the site can go live, all of the test data has to be removed so it doesn’t interfere with the client’s other business functions such as accounting and inventory.

Read more »

About NVNCBL and Myself

Contact Me