Archive for September, 2009

Magento – changing the root folder after install

Tuesday, September 22nd, 2009

Current magento version – 1.3.2.4

I’m guessing that quite a few people will have done what I did when I initially set up Magento, which was to just move the magento folder into my required document root and then go in and run the installer.
Logically all the files then got installed into that magento folder resulting in all my urls having “/magento/” in them which wasn’t exactly ideal. Of course this fact only registered with me once I’d done quite a bit of work, so the idea of doing a fresh install to sort this out was extremely unappealing to me.

Luckily for me it is possible to change the magento root from “/magento/” to “/”, but as you might imagine this sort of thing is fraught with danger (if that’s not too dramatic).

So I will stress here that it’s best to setup your root folders correctly on install, or run a fresh install if you can. But if you really need to change the root after the event then here’s what you have to do: (more…)

Share

Magento – using jQuery

Wednesday, September 9th, 2009

Current magento version – 1.3.2.4

Jquery logo

jQuery is my favoured javascript library. It is the one I use most so it’s familiar and I can develop quickly with it. Magento however relies heavily on a mix of prototype, scriptalicious and their own varien scripts, none of which I’m familiar with or feel particularly confident about extending and adapting to my own needs.

So when I needed to add some custom javascript functionality to my magento site, I immediately thought “Wouldn’t it be great if I could use jQuery”. Now obviously this raises some issues. Firstly you’ll be adding in another javascript library to the mix, so the first thing to decide is “is this really necessary?”. You don’t want to add a whole load of extra code just for a really small bit of functionality as that doesn’t justify the performance hit or the extra bulk (if I can call it that). It is also well known that jQuery and prototype don’t really get on, so you’ll need to make sure that you can get them to play nicely together.

If you decide that it is worth it and you can justify adding the extra library, then here is what you need to do: (more…)

Share