Add a Store Catalog XML Sitemap to the Shopp Plugin

October 1, 2009

in Code,Shopp

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!

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • Twitter

Related posts:

  1. Edit Product Link for Shopp Plugin
  2. Add Canonical Tags to Shopp Plugin for SEO
  3. Fixing the Interspire Google Base Feed
  4. How to Create a Custom RSS Feed in WordPress in 12 Lines of Code
  5. Interspire & BigCommerce WordPress Plugin

4 comments… read them below or add one

Anthony October 9, 2009 at 4:52 pm

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

Reply

daedana February 22, 2010 at 1:09 pm

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.

Reply

Josh Fialkoff March 10, 2010 at 6:52 pm

Hi Zack,
This is a great tip!
Do you know if there is a way to add this Shopp sitemap to a user-facing sitemap created with the Dagon Design sitemap plugin?
Thanks,
Josh

Reply

Bill Winder August 4, 2010 at 1:39 pm

Great tip thanks

Reply

Leave a Comment

Previous post:

Next post: