Posted on

Magento 1.4.2 and Google Checkout – Debugging weight-based table rate issues

I’ve had one of my worst days programming ever – which is a big call I know – but seriously after today I think no Magento bug will ever faze me again.

So for anyone Googling about Magento 1.4.2 and Google Checkout, here’s a couple of tips based on this bug report.

Flat Rate Google Checkout shipping

There’s a warning generated by Magento if you do not have all 3 flat rate options filled in:

Warning: number_format() expects parameter 1 to be double, string given

The solution is to check if they are populated in the app/code/core/Mage/GoogleCheckout/Model/Api/Xml/Checkout.php before sending them.
Continue reading Magento 1.4.2 and Google Checkout – Debugging weight-based table rate issues

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

2010 ☑ Bring on 2011

2010 is now well and truly behind me and I am sitting inside on a sunny day (sunburnt) reflecting on the year that was. It’s been a busy year. I thought, more so for my own sake than yours, that I would jot down a few notes to wrap things up.

My Blog

Firstly my blog, Aschroder.com. 2010 has been good to me in several respects. From a traffic point of view my final tally (according to Google Analytics at least) clocked in at a touch over 100 thousand visitors and over 200 RSS subscribers, I feel like this is a recognition of the quality of my continued articles on Magento development.
Continue reading 2010 ☑ Bring on 2011