≡ Menu

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 }
  • Rick March 24, 2011, 2:57 am

    Where do I place the code? In the functions.php file? if so, where?

    Thanks in advance!

  • Jeremy March 24, 2011, 4:50 pm

    Thanks for asking! I didn’t realize I’d left that bit of info out. Just paste the code in to your custom_functions.php file.

  • Rick March 27, 2011, 8:12 pm

    Hey Jeremy – thank you for your reply.

    I guess my problem is i do not know enough. I am using the Builder theme from ithemes – which utilizes “child themes” so when I go into my theme structure – i do not have a custom_functions.php file – i have the standard functions.php file – but when I paste the code there, nothing seems to happen.

    Thanks for all your help.

    Rick

Leave a Comment

Current day month ye@r *