Posted on

Magento Development and Deployment: Setting up a Modman based Magento project on Magento 1.5

As I had noted earlier this week, I have not had a lot of Magento development time lately, so today I thought I’d spend a bit of time setting up a Magento 1.5 development environment on my Mac. This post will take you through the steps to set up Magento development with Eclipse for editing/debugging and SVN for version control, with deployment being managed by Modman. This relates to the project structure I described in my presentation at Magento Imagine, with the exception that I won’t go into detail about setting up a separate extensions repository, as that is probably more relevant to developers who build and release extensions than developers working on a single Magento project.

What this guide assumes:

  • Mac development environment with MAMP
  • Linux production environment
  • SVN for version control, but Git can work too.
  • Modman for deployment. Written by Colin Mollenhour

What we will cover:

  • Installing SVN, Magento and Modman.
  • Getting a free SVN repository.
  • Setting up a Magento store development project with version controlled extensions, templates/themes, locale and emails.
  • Development and deployment of changes to Production.

We have a lot to get through, so let’s not delay.

Step 1: Install Magento Locally

We’ll zap through a commandline install. We’ll be installing into your web server doc root. If you would like help setting that up I wrote a guide to installing MAMP on a Mac (a long time ago) and also (extra for experts) a guide to setting up virtual hosts on MAMP too.

#In your ~/Downloads directory or some where suitable
wget http://www.magentocommerce.com/downloads/assets/1.5.0.1/magento-1.5.0.1.tar.gz
tar xzf magento-1.5.0.1.tar.gz
# I keep all of my Magento development versions in a web folder within ~/Documents
mv magento ~/Documents/web/magento/1.5.0.1

Continue reading Magento Development and Deployment: Setting up a Modman based Magento project on Magento 1.5

Posted on

Magento Imagine 2011 Presentation Notes and Links: Engineering your Magento Store

Just finished my presentation at Magento Imagine 2011 and wanted to drop a quick post with the links to various tools I mentioned and my slides on Engineering your Magento Store.

Thanks to everyone who asked interesting questions, glad to hear others are exploring this area of Magento store maintenance too.

You can get my slides here, I’ll have about 20 hours of flying to do this weekend so I’ll try to write up a more step-by-step guide as a blog post too. You may also find this blog post from last year interesting, if this project structure/deployment topic is relevant.

Update: I didn’t get the follow up written on the flight, but better late than never, check out my full step-by-step starter guide to Magento development and deployment with SVN and Modman here.

Links:
Modman deployment tool by Colin Mollenhour .
The cool-kid’s SCM, GIT.
The one I use, SVN.
Bug in Magento 1.4.2 that you should know about.

Posted on

A Recipe to avoid having your Twitter, Facebook, CompuGlobalHyperMegaNet account stolen at an Airport or Conference

This week I’m heading to LA for the Magento Imagine conference. It should be a really diverse conference, with developers, marketers and all manner of other ecommerce industry experts brought together by a common interest in Magento. I’ll be presenting a short tech talk during the Developer UnConference section, which is billed as a developer only techy session – sounds like fun! I’ll be running through some Magento Engineering tips, for project setup, development and deployment in a repeatable way.

I have a fairly grueling trip to get there and amidst all this insecure wifi in the air at Sydney airport I thought I’d jot down a quick how-to for fellow travelers/conference goers to avoid having their Twitter or Facebook account hacked by a 10 year old with a Mac book.

Follow the recipe below for secure web browsing at airports on the way and while you’re at the Magento Imagine conference.
Continue reading A Recipe to avoid having your Twitter, Facebook, CompuGlobalHyperMegaNet account stolen at an Airport or Conference

Posted on

Creating a Runkeeper RSS Feed – the hack way.

I’ve started using RunKeeper since getting a GPS tracker for my running. I wanted an RSS feed along with plenty of others, so here’s a really trashy little hack to get one, until the good folks at Runkeeper make one for you.

This requires a free service called Feed43 – it’s just the first such html to rss service I found, so it may not be the best, I’d be open to suggestions of better ones. I thought it made the sometimes annoying process of scraping HTML quite painless.

Continue reading Creating a Runkeeper RSS Feed – the hack way.

Posted on

Downloading a Magento Connect Extension manually before installing it

I always install my Magento extensions manually so for me downloading and looking over an extension before copying it into my SVN repo is important. I don’t actually recommend using Magento Connect to install things on production stores (no one does that, right?) – it’s a bit like playing Russian roulette really. You might be able to install 1 or 2 extensions with Magento Connect, but if you install 6, you’ll definitely blow your brains out hose your Magento store.

Here’s a quick few steps to take so you can do that yourself. I’ll assume you have a local development version of Magento running on your laptop or desktop.

1) Jump into the root of your development store:

cd ~/Documents/web/magento/1.4.2.0/

2) Download the extension with pear:

./pear download magento-community/Netzarbeiter_CustomerActivation

3) For simplicity, I move the file over to my downloads directory to extract and inspect it:

mv ~/Documents/web/magento/1.4.2.0/Netzarbeiter_CustomerActivation-0.2.9.tgz ~/Downloads/

Then you can unarchive the extension, take a look at the files, scrutinize to your hearts content before you decide it’s a good extension and install it into your SVN repo manually. Then when you update your staging site you can check everything works, before releasing to production. Of course in this particular case I’ll install the extension blindly, Vinai codes elegant extensions that are certain to work!

Some things I look for:

  • Schema scripts in the sql directory that make drastic schema changes
  • Ugly phone-home calls (you know who you are!)
  • Comments like “TODO: remove this before releasing”
  • Comments like “TODO: implement this”
  • Check what models the extension is overriding, it’s one way to avoid extension clashes

Any I missed let me know? And yes I am fully aware that most of my extensions would fail my own criteria 😛