Since I’ve started customizing MagentoCommerce about a year ago, here’s a few tricks I’ve learned to help further development and general operations. I don’t claim to be a Magento Expert by any means but some of this information I had to dig long and hard before finally finding a resolution to the issues I was having.
- Can’t find where to edit email templates that are generated by Magento? There is a great article posted up on Magentos Wikipedia on how to Edit the E-mail templates.
- Wouldn’t it be nice if you could actually display what template files are making up the current Magento page you are viewing? Well you can! Under the Admin area -> System -> Configuration. Select the “Current Configuration Scope:” to the left. <- This is an important step to get to this feature. After you have selected the Store of your choice proceed to the “Developer” Subsection to the left you’ll notice a “Template Path Hints” field with a drop down to enable/disable it. Enabling this will cause Magento to display what .phtml or template files make up any particular page. This really helps speed up time when it comes to customizing Magento’s theme or adding functionality.
- When using MagentoConnect ALWAYS do a full site backup, including all files and database dumps, I know the docs mention this quite a bit but I have completely toasted Magento before by simply trying to update Magento to its latest release. The biggest issue I have seen with using MagentoConnect is sometimes files and/or directories are not writable by the web server. The best approach I have found for this is to download the latest version via Magento’s site and copying the files manually. Particularly /app/code/core/Mage/
- Innon-db-fix.sql can be your best friend. From some reason, I’m not sure why but Magento will have issues with tables in the database not being the proper type, Normally MyISAM instead of InnonDB. Using this simple SQL file can help fix “some” issues that may not seem related to it. I’m still hunting for a definitive list of what tables should be which, but it appears the majority are InnonDB.
- One error that plagued me for days after an upgrade was “SQLSTATE: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails”, The innon-db-fix.sql did NOT fix this issue for me. After reading over Magento’s community forums there was one posting in regards to residual products and or categories, ghosts basically. Any attempt to save new products or categories yielded this error, Thankfully this was on a development site and I was able to simple clear out the table: “catalog_category_product_index“, which resolved the issue and I re-imported the products I had entered in before this error appeared.
Hopefully this has helped someone if so, leave a comment.