December 29, 2013

Magento Module Development Tutorial

You’ve built your amazing Magento ecommerce store for the best client on earth. Her fashion clothing sales are going well, and everything is smooth sailing. Then, while you are at lunch, you get the dreaded call from the client:

“Bruno Mars is wearing our product on Ellen’s show tomorrow… I don’t care about budget, we MUST have a new Press Release section up TONIGHT! -CLICK-“

The new Press Release section needs to be rolled out with all the normal features:

The client should be able to go into the control panel and as many press releases as she wants. Each press release will have a wysiwyg field. Include a file upload for the official PDF of the press release. Each release may or may not highlight one or more of her products. All of the above will be included in a specific “PR RSS Feed” for her site. When you click on the press release from the list, you’ll see the detail press release page (with an SEO friendly title) and all of the info presented in the standard template. And, seriously, we need it before morning.

Magento is a massive, complex and highly flexible ecommerce platform able to run some of the best shopping sites on the internet. However, customizing Magento from scratch can make you want to abandon your high-tech career and take up painting for a living.

Here’s how we will quickly solve our Client’s crisis, done the Magento way:

Install the free “ultimate module creator” plugin (works with community and Enterprise Solutions.) Create, configure and install your new custom new module. Customize the front end to your client’s specific needs

Once you’ve got this down, you can build out a new module with all the above features in less than 20 minutes.

Install the “ultimate module creator” plugin. The easiest way to do this is straight from Magento. Connect –http://www.magentocommerce.com… installed click the new menu item “module creator” in the “system” menu.

Module Creator

Enter the basic config settings about your installation and theme.

Module Settings

Add a “News Release” entity.

Module Entities

To the News Release add the following fields: “Headline” (text), “Body Text” (text area / wysiwyg) and “Document” (which is a “File” – the pdf document she can upload)Confirm the fields you want to display in the RSS feed are set. Go ahead and save to publish your module. (May want to clear your cache at this point)

At this point, the basic module is built and installed in your system. You can add records and begin to see them on the front end. Tweak the installed template files as desired.

Paul Weinert
Author

Paul Weinert is our founder, managing principal and spirit animal. He’s one of those odd people you meet that was born in Portland, grew up here and still lives here for some reason. If you had two words to describe Paul after meeting him, we’d bet you’d use “charmingly quirky”.

Paul started GRAYBOX in February 2009, and for the first four years, GRAYBOX had a blend of a contract staffing firm and a traditional agency. GRAYBOX then hired our first employees in 2012 and has been growing ever since. Professionally, Paul has a background in internet business consulting, working especially with mid-market ecommerce, healthcare, and tech companies. He worked as a user experience designer, web developer and internet marketer. Nowadays, Paul serves as our company visionary, team mentor and head of executive leadership — Paul is extremely proud of the entire team and the company. He’s constantly humbled by the team’s awesomeness and the caring community that’s sprung up from his initial ideas.

Beyond GRAYBOX, Paul is married, has two young boys and lives in NE Portland. He’s also an active foster parent, mentors other local entrepreneurs, and volunteers on local non-profit boards. Businesswise, aside from GRAYBOX, Paul has started a few other businesses and is an active investor in the local startup scene.

For the sheer joy of it, let’s play 2 truths and a lie:

  1. Paul firmly believes that any activity would be better if on a boat.
  2. Other than this whole Internet thing, Paul has basically no other skills or expertise in anything.
  3. Paul is rare unicorn, actually born and raised in Portland.