Add a Store Catalog XML Sitemap to the Shopp Plugin

The Shopp default RSS/XML/Google Base solution was not enough.

RSS Feed, BABY!

I needed to have a Google Base feed that featured all the store products. For some reason, the recommended process wasn’t working for me. It was either showing only recent products, or it wasn’t working at all.  Here’s how I fixed it:

This code will show you the way to full indexing. Trust it. Feel it.

Add the following code before case "newproducts-rss": (near line 1295) in Shopp.php:

// This adds sitemap functionality for all products
case "catalog-rss":
	$CatalogProducts = new CatalogProducts(array('show' => 50000));
	header("Content-type: application/rss+xml; charset=utf-8");
	echo shopp_rss($CatalogProducts->rss());
	exit();
	break;

Once you add that, you will be able to see a RSS feed of your entire catalog by visiting yoursite.com/your-shop-location/index.php?shopp_lookup=catalog-rss

If the RSS feed is empty, try commenting out (add // before it) the following code near line 484 in /core/model/Category.php: $item = apply_filters('shopp_rss_item',$entry,$product);

Hope this helps!

Author: Zack Katz

Zack Katz is the President of Katz Web Services and the developer of WordPress plugins with over 700,000 downloads. He lives in Southwest Colorado with his wife and two cats.

5 thoughts on “Add a Store Catalog XML Sitemap to the Shopp Plugin”

  1. Your code works, thanks !
    But what have I to choose in Google Base Data Feeds settings?

    ?? Delimiter:
    Tab (t)
    Pipe (|)
    Tilde (~)

    ?? Use Quoted Fields:
    Yes
    No

  2. Hi.
    Thanks for the piece of code it works great. I’m just trying to turn this RSS feed into xml or txt  or anyother type that google merchant center will accept. So if anyone could mention something on that.

Leave a Reply

Your email address will not be published. Required fields are marked *