WordPress Plugin: WP e-Commerce Style Email

Plugin by Jacob Schwartz, one half of Schwambell.

.

 

WP e-Commerce is a (mostly) free, very popular e-commerce plugin for WordPress websites. It lets you set up shop very quickly and cheaply. However, it lacks some bells and whistles. This is a bell. Or maybe a whistle.

This is a simple plugin I created while working on Ultrapom. It allows a web developer to adjust the look and feel of WP e-Commerce customer emails without digging into the WP e-Commerce plugin’s internals. Why would you want to do that?

  1. You’re a stylish individual
  2. You don’t want to screw around inside the WP e-Commerce plugin, because you’ll have problems every time you update/upgrade your store.

Here’s what you’ll need to get started with this plugin:

  • A working website running on WordPress;
  • WP e-Commerce installed, powering an e-commerce store;
  • Some small knowledge of HTML, CSS and how a WordPress theme is built. In short, you need to be a basic web developer. Knowing PHP is not needed;
  • Get the plugin from the WordPress.org Plugin repository or download it here.

Perhaps in the future I’ll develop this to the point where you won’t need any web development skillz to use it, but I think it’s already useful just as it is.

 

 

Sophisticated Templating

As of version 0.6, templating emails is a lot more sophisticated (if you want it to be). To help you figure it out, I’ve created a set of sample template files that you can copy from the “theme” subdirectory of the plugin (not to be confused with the main theme directory of your website).

There’s now the distinction between “wrapper” templates and content templates. Right now, the plugin only supports content templating for purchase receipts.

Wrapper template
wpsc-email_style.php or refer to the template hierarchy.

Applies style to the email, like gift wrapping.

Doesn’t create the content of emails.

Content templates
wpsc-email_content-receipt.php

Sub-templates:
wpsc-email_content_part-product_row.php
wpsc-email_content_part-totals.php
wpsc-email_content_part-addresses.php

Used for:
Purchase receipt
Order pending
Order pending payment required

Use static class “ECSE_purchase” to access purchase properties.

Template tags used in the wrapper template can also be used.

 

 

 

 

 

 

 

 

 

 

 

 

A new template hierarchy has been created for the wrapper template, so you can target your styling as specifically as you want. Of course, you can still target different kinds of emails inside a single wrapper template just by using template tags. For most people, one wrapper template will do the job.