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!

This entry was posted in Code, Shopp and tagged , , , , , , , , . Bookmark the permalink.
  • http://www.molusk.net Anthony

    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

  • http://www.daedana.co.uk daedana

    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.

  • http://www.fialkoffconsulting.com Josh Fialkoff

    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

  • http://www.net-aspect.com Bill Winder

    Great tip thanks

  • Grreep