A place to log my programming solutions.

Category :: Resources

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

6
Sep 09

Claiming this Blog on Technorati

Here goes: wshkb4gy8m

So in order for me to “claim” this blog for submission on Technorati, I have to create a post with a certain jumbled string in it. Technorati will then read the jumbled string and verify that I am indeed the owner of this site.

Technorati is a search engine for blogs. I believe I’m jumping onto the bandwagon a little later than most people, but it’s better late than never.

Hopefully that works, otherwise I’m stuck with a useless post.

[edit] – it worked.

1
Sep 09

mod_rewrite Reference

Having a reference for basic mod_rewrite examples on hand is always a good idea.  About once every two weeks, I have to set up a server’s URL rewrites, and because I don’t use it that often, I’m susceptible to forgetting its exact syntax.

Read more »

14
Aug 09

Solution to Excel’s CSV Output Formats

Recently I’ve had to import a client’s catalog data from Excel 2007 to the Magento eCommerce Platform. The data in Excel was unsurprisingly in a format that was unsupported by Magento’s import methods. Using code, I needed to parse Excel data into the format Magento required. In PHP, I wasn’t aware of any way to interface with .xls or .xlsx files, so I tried exporting the data to flat-file CSV, where it could be easily manipulated using PHP’s native CSV functions.

Read more »

17
Dec 08

Beginnings

No “greetings readers” here, although anyone reading this is more than welcome.  The purpose of this blog is to serve as a utility for me to log my thoughts related to programming.  Often times when I’m working on a project, I’ll encounter an issue that I’ve encountered before.  The problem is that I don’t necessarily remember the solution, and I have to go through the whole process of “figuring it out” all over again. With this blog though, I’m hoping that I can (going forward) document my issues and solutions in case I return.

What kind of programming do I do now?  I’m heavily engaged in web development, predominantly the Web 2.0/AJAX practices.  I work for RedStage Networks, based in Hoboken, NJ.  I’m glad to be part of a highly engaged and enthusiastic team, always working with cutting edge technology.

So if anyone ever reads this, then happy reading.  If not, then “memo-to-self”: tag, tag, tag, tag your posts.  How will you ever find solutions if you don’t tag your posts?

About NVNCBL and Myself

Contact Me