Change Shopp Receipt Titles

by Jeremy on June 17, 2011

Change Shopp Receipt Email Titles

By default, the Shopp Plugin for WordPress uses “New Order” as the subject line for emails.  This works well enough, I guess, but I have reasons to want a little more specificity.  I really wanted the Order ID in the subject, that way I’d be able to scan my order emails and easily find what I’m looking for.  It’d also be very helpful when forwarding orders to some of my vendors.  I generally add it myself, but that’s a pain from my phone — much easier if it’s already there.

After serveral months of running the Shopp Ecommerce Plugin for WordPress, I am really happy with it.  I honestly have few complains, but one of them is their awful private forum.  Support exists, but it’s not very good.  The documentation also exists, but it’s hard to find what you’re looking for.

After many test orders, I finally figured out how to get what I wanted.  I tried using PHP in the subject line, but that messed up the HTML for the entire email.  I ended up using a shortcode, which is how the subject was originally displayed.

Here’s what I did.

First, you’ll need to be using theme templates.  If you don’t know how to do that, comment on this post, and I can explain in a new post.

Second, you’re going to edit the order.php template.  When you open it, right at the top, you’ll see the “From”, “To”, and “Subject” lines for the email.  The original shortcode [subject] is what creates the “New Order” default.  I changed that line to be “OGS Order [orderid]”

I used OGS to signify the order was coming from my Outdoor Game Shop site.  The [orderid] shortcode gets me the desired order number.

Once you’ve made the edits, you just replace the theme template order.php file.  It’s actually pretty easy if you know where to look for everything.  If you have any questions or comments, please let me know!

If you’d like to see it in action, all you have to do is order a game from me!  I’m using Shopp on my Outdoor Game Shop site.

List of shortcodes you can use is here.

{ 0 comments }

Quick Delete Members from Memberlist in phpBB3

by Jeremy on February 18, 2011

Memberlist Mod for phpBB3

No matter what I do, I still get spam on my phpbb3 forums.  It seems like there should be better spam prevention by now, but apparently the spammers are presistant.  Generally, I go through and delete & ban the users one by one.  I’m fairly sure banning is a waste of my time, but I still do it about half of the time.

When the spam accounts actually post in the forum, it’s easy to identify and delete them.  However, there are a lot of spam accounts that create an account, add links to their signature, but then never post.  I don’t want these accounts, either, even if they’re not currently hurting anything.

I recently came across a quick way to delete multiple spam accounts quickly, and at the same time from the Memberlist page.  It’s a fairly easy mod that only requires modifying three files.  (mod found here)

Many spam accounts will add a URL to the website field, and you can easily see this from the memberlist.  It’s also often handy to remove members who registered but never logged on to the site.  When I have time, I’ll even go through and look at the profiles for any members with zero posts.  About half of these accounts have spam links in their signatures, and I remove them as well.

Spam is a pain, but at least with this mod you can delete multiple forum accounts fairly quickly!

Original Mod Post.

{ 0 comments }

Changing Shopp Page Titles

by Jeremy on February 14, 2011

Shopp e-Commerce for WordPress

I recently started using the Shopp e-commerce plugin for WordPress. I run all of my sites using WordPress as a CMS, and I wanted a cart that would integrate in to my WordPress admin panel.

The two big options seemed to be WP e-Commerce & Shopp. WPeC comes off as the cheaper of the two, but I feel like Shopp gives you more for $55 than WPeC does. By the time you buy what you’ll actually need for WPeC, it’s not really free anymore. I felt like the support for Shopp was a little better, too.

For the most part, I’m really happy with Shopp. I don’t like how it handles a large number of product options, and I don’t like not being able to remove Alaska and Hawaii as shipping options. Other than that, it’s pretty rad for the price. You can see it in use on my Outdoor Game Store.

Tweaking the Shopp Title Tag

After setting up my shop, I realized that the page titles were goofy. Products were showing up in Google as “Shop – Catalog Products – Product Name – Site Name”. While this had okay information, it looked terrible as a Google listing, and the least important words were included up front.

Shopp has a page on their website that explains how to change your page titles, but the information it gives is pretty vague, and more suited for people who know PHP better than I do. Dropping in the code provided by Shopp worked for removing the parts I didn’t want, but it added in some other things I didn’t want, as well as removing any form of a title from the static Shopp pages. I played around for a while, but I didn’t make much progress on my own.

I finally found a topic on the Shopp Forum that answered my question. Pasting the following code in to the custom_functions.php file worked like a charm!

add_filter(‘wp_title’, ‘shopp_catalog_titles’,11,2); // SEO friendly titles

function shopp_catalog_titles($title,$sep=’ ‘)
{

global $Shopp;
// Access the Shopp data structure
$titles = array();
// A list to keep track of our title elements

if (shopp(‘catalog’,'is-category’)) {
// Build category page titles
if (!empty($Shopp->Category->name)) {
$titles = array($Shopp->Category->name);
}
} else if (shopp(‘catalog’,'is-product’)) {
// Build product page titles
if (shopp(‘product’,'has-categories’)) { // Use category name, if available

$titles = array($Shopp->Product->name, $category);
} else { // Category not available, just the product name

if (!empty($Shopp->Product->name)) {
$titles = array($Shopp->Product->name);
}
}
}
if (empty($titles)) {
$titles = array($title, ”);
}

return join($sep,$titles);
}

This code removes the parts I wanted to get rid of, but keeps the base Shopp pages from showing nothing.

All this information can be found elsewhere, but I wanted to post this so I could refer to it later. Also, the Shopp Forum is private and isn’t always easy to find things on…

Resources:
Customizing Catalog Page Titles
title-page-seo-bad-seo
customizing-catalog-page-titles-please-help
Outdoor Game Shop

{ 3 comments }

FireFox Add-Ons For Design & Development

January 9, 2011

I recently came across a discussion of helpful Firefox Add-ons for web designers.  I’ve tried several out.  Some I’ve kept, others weren’t my thing. I wanted to share some of them for anybody who might be interested. Favorite Firefox Add-ons These are my current favorites.  I keep these active at all times, and use most [...]

Read the full article →

WP Robot for WordPress Content Creation

September 9, 2010

WP Robot Autoblogging Plugin for WordPress Over the last few years, I’ve accumulated a bunch of domain names.  Many of them are to protect some of my existing names.  Others are just names that I wanted to hold on to and use later.  Oddly enough, in the world of Cornhole there is a LOT of [...]

Read the full article →

Thesis 1.7: New Features

April 9, 2010

Thesis WordPress Theme I LOVE Thesis. I’ve been using it for all of my websites for about 8 months now. In the past, each new website meant I had to search the ‘net for decent WordPress themes. Most of the themes I found were ‘okay’, but never exactly what I wanted. That all changed when [...]

Read the full article →

Customizing Your 404 Page with Thesis & HostGator

April 8, 2010

I’ve been moving websites a lot lately, so I’ve been finding dead links like crazy.  I’ve been moving all of my websites from GoDaddy Hosting to HostGator hosting (which I’ll write about soon). Running the Thesis WordPress theme on HostGator resulted in having 2 different 404 pages.  One is the default Thesis 404 page, which [...]

Read the full article →