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

New Version of SMTP Pro now supports Magento 1.4.2 and has fewer bugs

I’ve been neglecting my Magento extensions a bit lately and it somewhat ironically caught up with me yesterday. We’re developing a new store on Magento 1.4.2 and when it came to setting up the Google Apps email I naturally enough installed my own extension (that is why I built it, after all). This post describes the fixes and changes in the latest version of my SMTP Pro Magento email extension.

I found a number of issues with it, one related to the sub-directory install, one related to multi-store and others to do with the Magento version, that needed to be fixed (in a hurry). So to those of you reporting issues over the last month or so, sorry for the delay getting to them. Better late than never eh Fontis.

In addition to testing with Magento 1.4.2 which I can confirm works, here’s what I have fixed/changed:

  • Fixed the self-test when running it from a webstore installed in a subdirectory.
  • Fixed the Cannot set standard header from addHeader() exception. It was caused by an upgrade to Zend in Magento 1.4.2. Reported here.
  • Added German translations which I got from Thomas at NetResearch, Many thanks! (and apologies for taking months to finally roll them out).
  • Added better logging around the ‘not valid for send’ state.
  • Fixed the 404 error you get when running self-test on a store with the ‘use store code in url’ setting turned on. I suspect this may have been causing a few issues.

The SMTP extension is available on Magento Connect or you may prefer to download your Magento connect extensions manually. The release file for SMTP Pro version 1.4.0 is available here if you like to install Magento extensions manually.

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 😛

Posted on

Making a sitemap.xml for Magento

A few people have asked with regards to my Magento Speed Test, how to create a sitemap.xml for their Magento store so that they can test their speed/performance.

So here we go:

1) Go to Catalog->Google Sitemap in the admin

2) Click ‘Add Sitemap’

3) Enter these details:
filename=sitemap.xml
path=/

4) Save&Generate.

That should do the trick. You can now see how fast your Magento store is performing. Note that once you have a sitemap, you should submit it.

Have fun.