Posted on

Generating Barcode Numbers and EAN barcode artwork with GNU barcode

Just a quick little post to remind myself how I did this in a few years time! Given a range of barcode numbers, generate the EAN number and artwork for them on the command-line using GNU barcode.

So we have a range like: 934955400000 - 934955400999 and we need to add the check digit and then generate the artwork.

Firstly we need an actual input file representing all of the barcodes in the range. For that we can just use a bash loop (or several).
Continue reading Generating Barcode Numbers and EAN barcode artwork with GNU barcode

Posted on

Sending Emails by Queue in Magento 1.9.1

My last blog post was over 6 months ago, so I think I’m technically way past due for a new post. In this post I wanted to take a tour through the new functionality in Magento 1.9.1 with regards to sending emails from your store.

The astute among you will have noticed there were some changes to email in Magento 1.9.1 from the Magento 1.9.1 release notes. Two things jump out as requiring further investigation:

  1. “all Magento e-mails (including order confirmation and transactional) are now queued and sent according to your configured cron schedule”
  2. “boasts responsive default email templates so customers can read your order confirmation emails and newsletters on any device”

The first change sounds worrying to me, after years of emails from merchants struggling to get their Magento store to send emails – anything which makes it _harder_ seems like a bad idea to me. However, we’ll look through the changes and see what’s new.

The second change sounds really good – I was tinkering on a responsive email extension myself, so it’s pleasing to see it has already become core functionality. I’ll take a look through the template changes, and how they affect your store in the second part of this blog post series.

Using cron to send Magento Emails

Magento email sending all boils down to the Template class Mage_Core_Model_Email_Template, you can see below the change for queuing has been to introduce a check for an available queue in the template class, and if available to enqueue the message with all of it’s data and return immediately.
Continue reading Sending Emails by Queue in Magento 1.9.1