I just spent the day trying to tweak my Ubercart to play nice with google shopping and I stumbled across this module. I found a couple problems though. The first one was that the rss.xml generated overwrote my original rss.xml so I changed the file output name everywhere it appeared to product_rss.xml for clarity and uniqueness. I also renamed sitemap.xml to product_sitemap.xml so it wouldn't overwrite the file generated by the XML Sitemap module. That fixed the first problem, but then after reading the page source of product_rss.xml I saw that it was missing the tag which is required by google shopping. The only requirement for that value was that you have a unique value for each product, so I just used the title which has to be unique anyway. Here's the code chunk I edited:
411 if (variable_get("rss_item_title",'1') == 1) {
412 $pad = strip_tags($product->title); $pad = check_plain($pad); if (strlen($pad) >69){$pad = substr($pad,0,70); }
413 $output .= "" . $pad . "\n";
414 $output .= "" . $pad . "\n";
Now the rss feed meets all of google's criteria. I submitted my link and google was happy and that makes me happy. This might be a bit of an ugly hack, but it works. I've repackaged and published the module on my site in case anybody else wants to use it or incorporate it into the original module or just use it for creative inspiration. Here's the link: http://zapcomputing.net/sites/default/files/uc_website_xml_id.tar.gz
Maybe someone else can put this to good use.
| Attachment | Size |
|---|---|
| uc_website_xml_id.tar.gz | 6.66 KB |
