Posted on

Easily Set a Custom Order Number in Magento With My Free SetStartOrderNumber Extension

Every time I launch a new Magento store I have to go and hack the database to change the order, shipment, invoice and credit memo numbers. This just doesn’t seem right, and seeing as I was about to launch two stores (in one week!) I thought it’d be better to make the order increment ID’s custom from within the Magento admin panel. Now what I didn’t realize before I set about doing this was that someone had already made a very good extension to customize order numberswoops.

So not knowing I could just buy an extension for $60, I went ahead and coded one up on my train ride home Friday afternoon.

This is a blog post about what the extension does (and does not) do and how it’s made. I’m going to release it for free, if you need full order customizing functionality, you should still buy Adjustware’s one, it has some great features.

If you’re just here for the free software, you can get it on Magento Connect, if you’d like to learn more about it and how it’s made, please read on.
Continue reading Easily Set a Custom Order Number in Magento With My Free SetStartOrderNumber Extension

Posted on

Structuring your Magento project for Engineering, not Hacking

This is a blog post about how I structure my Magento store development, and how that has been made easier thanks to the efforts of Colin Mollenhour and his script modman. Hopefully after reading this, you’re all inspired to go set up a similar project structure, because it gives a repeatable, hopefully less upgrade ruined Magento experience. Certainly if you’re not inspired, I’d like to hear about how you are structuring your projects – the more talk of this, the better the overall quality of Magento stores in the wild, I hope.
Continue reading Structuring your Magento project for Engineering, not Hacking

Posted on

New SMTP Pro Magento Email extension released

I’ve had a chance to make a couple of improvements to my SMTP Pro email extension for Magento. Both changes are not exactly life altering, one adds extra error detection to the self-test, and the other fixes a header problem with the self-test (reported by Phil). More details follow about the changes, if you want to get the extension, download SMTP Pro on Magento Connect. (Updated: finally on Magento Connect!)

I now send a real live contact form message as part of the testing – and ensure that when the email sends, my extension code is actually being called. I’ve had a lot of people reporting problems with emails not sending lately, only to find it’s because some other extension is interfering with my email sending. This tweak to the self test will help identify those issues.

This is implemented as a static variable on the self test controller, that is set before sending the test email and then altered by the email observer (if it is called as expected):

// Now we test that the actual core overrides are occuring as expected.
// We trigger the password forgot email, as though a user had done so.
 
self::$CONTACTFORM_SENT = false;
$this->_sendTestContactFormEmail();
 
// If everything worked as expected, the observer will have set this value to true.
if (self::$CONTACTFORM_SENT) {
	$msg = $msg . "<br/> Contact Form test email used SMTPPro to send correctly.";
} else {
	$success = false;
	$msg = $msg . "<br/> Contact Form test email did not use SMTPPro to send.";
}

and the code in the observer that alters this variable:

// For the self test, if we're sending the contact form notify the self test class
if($event->getTemplate() == "contacts_email_email_template") {
        include_once "app/code/community/Aschroder/SMTPPro/controllers/IndexController.php";
        Aschroder_SMTPPro_IndexController::$CONTACTFORM_SENT = true;
}

The other change was trivial, adding a ->setFrom() call when sending the test email. Thanks to Phil for pointing that out.

Lastly, Eric requested a useful feature which I will add, but I haven’t had time to put that in to this release, next time!

Let me know any feedback you have on the changes, or if you’re having trouble sending emails in Magento – feedback welcome.

Posted on

Latest Magento Development projects, MageBase.com and Magento spotting

Just a quick note about several things, not really a full post. I’ve got a few cool Magento development projects on the go at the moment, blog posts are on the way. I’ve started contributing over at MageBase and I think the comment system here is sometimes broken, but I need some of your help fixing it.

MageBase.com

I wrote up a little article over at MageBase.com to help you spot Magento stores in the wild. I thought it’d be a good opportunity to promote MageBase – it’s a growing community of Magento developers started by a few members of the Auckland Magento User Group.

Check it out. Feedback, article ideas and harsh criticism welcome.

Magento Development

In other news, I’m not dead, but close I got quite sick last week and have been now trying to catch up on a lot of things. I promise I’ll write some fascinating blog articles shortly – some of the exciting things I have been working on:

  • Auto responders that will follow up with a customer based on what they purchased a product-specific number of days later – for example an email that says “Time for the 3-6 month widget?” 3 months after someone buys a 0-3 month size widget.
  • The ability to automatically import a Google Docs spreadsheet and as store inventory, products and categories, allowing inventory management entirely outside of Magento.
  • An offsite cloud backup and restore extension that will give your store’s highly redundant data storage in a secure offsite facility.

Comments

One last thing, if you have been getting the blank page of death after posting comments on my blog I am so sorry. Thanks to Greg from Nexcess for pointing that out. I’m having trouble replicating it, please contact me if it happens to you so I can figure out why. This is also an excellent opportunity to tell you about one of my favorite Firefox extensions: Lazarus. It recovers lost form data when shitty websites lose your information (like my blog is apparently doing to some people posting comments). I can’t tell you how many times it has saved the day for me.

Posted on

Hosting Magento in New Zealand

I received an email from a fellow Magento developer asking about hosting Magento in New Zealand – this post is about that email and my response because I think it will be useful to others asking the same questions. All of the Magento stores I’ve built to date have been overseas (read: not in New Zealand) – my experience so far has only been with building low latency sites for American customers and UK/Europe customers. The reason for this is that at World Wide Access we recognize the importance of an in-country webstore presence to customer experience (bandwidth and latency).

It was a little ironic then, that an American developer, Justin from Unify Digital contacted me for advice about building a Magento store for New Zealand customers – for the same reasons that we build our stores offshore. Here’s what Justin had to say:
Continue reading Hosting Magento in New Zealand