Magento Supercharged Development Tools and Links

So I’ve been doing some reading up and researching on Magento lately, and found some links to articles and tools I think may be useful, so I’m sharing them with everyone. Enjoy!

Credits: A lot of these projects and articles are courtesy of these well known names in the Magento Community: Colin Mollenhour, Ashley Schroder, Alan Storm and Unirgy (Boris Gurvich).

Module Manager:
Creates symlinks between a mapped out file similar to a Makefile in Linux compiling that will create links where they need to be installed from the CLI via symlink making it easy to deploy and uninstall modules in Magento without touching the Core. It’s also Git friendly.
satellite http://code.google.com/p/module-manager/

Module Manager for when svn:externals just doesn’t cut it:
How Module Manager can be used instead of svn:externals.
satellite http://colin.mollenhour.com/2009/10/17/module-manager-for-when-svnexternals-just-doesnt-cut-it/

Magento Debug tool similar to Alan Storms ecommerce Bug:
Debug Tool with some nifty features – requires modman to install at the moment.
satellite Now Available on Magento Connect.
satellite https://github.com/madalinoprea/magneto-debug

MongoDB abstraction layer for Magento:
MongoDB is an open source Database that’s high performance, schema-free, document-oriented, with JSON encoded outputs. This is an abstraction layer for using MongoDB with Magento instead of MySQL.
satellite http://github.com/colinmollenhour/magento-mongo

uScaffold rapid prototyping modules:
Scaffolding is pretty common amongst Rails developers it’s a means of building a skeleton shell of a module based on some parameters.
satellite http://unirgy.com/wiki/uscaffold?#uscaffold

Magento Design Patterns:
A list of design patterns that Magento currently utilizes:
satellite http://stackoverflow.com/questions/5041473/magento-design-patterns

Alan storms Configuration Lint:
XML Configuration verification script, does a “light” job and isn’t extensive.
satellite http://alanstorm.com/magento_config_lint

Magentos API with SOAP:
Quick read article to get you using Magentos API via SOAP, with some details on WHERE clauses, setup, etc.
satellite http://www.yireo.com/tutorials/magento/magento-programming/629-connecting-to-magento-with-soap-part-1

CSS3 + HTML5 Boiler Plate for Magento:
HTML5 Boiler Plate on CSS3 For Magento, starting point for Magento Themes.
satellite http://zeljkoprsa.com/magento-boilerplate-with-css3pie/

Speed testing for Magento with Seige:
Uses Seige to test a sites Magento speed (requires sitemap.xml)
satellite http://www.magespeedtest.com/

Magento Development environments & deployment Ideas/tips:
The comments Kristof Fooman and Colin make are also good to read.
satellite http://www.aschroder.com/2010/07/structuring-your-magento-project-for-engineering-not-hacking/

Magento Video – Configurable Products (Custom Import)

For more details on the custom import see: arrow This Magento Wiki Entry

I can make the CSV file and the PHP file available, as some minor tweaks mentioned in the forum topic of wiki in order for this to function in 1.4.x of Magento CE, however all the information is outlined in the wiki entry and the forum thread referenced.

iPhone Magento theme compatible with Android

idea Update: HTML5 Theme in 1.7+

After installing the iPhone Theme for Magento via Magento Connect do the following:

Simply configure the exceptions under “System”->”Configuration”->”Design”

Expand “Themes” see the screenshot and use the values “Mobile Safari|iPhone|iPod” for Matched expression, and “iphone” for value. Since both iPhone and Android use WebKit they will both return the user agent as “Mobile Safari”. Be sure and realize it IS case sensitive for all values.

However after some further testing with some iPhones won’t return “Mobile Safari” so the condition for iPhone or iPod needs to be added as well.

Cheers! ;)

android-iphone

arrow More details about Which Browser is used in Android

Selecting 30 days or older entries using MySQL DateTime field

I’ve been doing quite a bit of Date and Time manipulations lately, and have grown to enjoy MySQL’s DateTime fields just as much as UNIX timestamps. Particularly its built-in functions for selecting any range of fields based on a time frame.

Needing to remove all entries from a table that are older than 30 days, at first I thought I would need to iterate over the very large table (90+k) rows of data and convert each MySQL DateTime field to a UNIX time stamp to do the calculations myself with PHP. However after a bit of research I’ve learned of a few things with MySQL DateTime that make this a lot easier.

SELECT fields FROM table WHERE DATE_SUB(CURDATE(),INTERVAL 30 DAY) >= timestamp;

The “timestamp” field is the MySQL DateTime field. Using the DATE_SUB, CURDATE and INTERVAL one can easily grab all records that are 30 days old without the headache of converting to UNIX timestamps in PHP and doing the grunt work yourself.

idea Also as a side note, if you wish to convert a MySQL DateTime field to a UNIX timestamp you can easily do this by:

$mysql_timestamp = gmdate("Y-m-d H:i:s",$mysql_timestamp_value);

If anyone has any better more efficient means to accomplish this please feel free to leave a comment. :D