December 3, 2009

Updating ASPDotNetStorefront to work with latest Google Base specification

Filed under: Tips — Tags: , , — Webopius @ 10:00 am

ASPDotNetStorefront includes some really powerful but often under-utilised feed generators. These can take a feed of your products (or any other store data using the powerful ASPDotNetStorefront XML packages), generate a feed file (usually in XML but other formats are possible) and then FTP this file to a remote location.

The most popular uses are feeds for Amazon, Affiliate Programmes and Google Base. Google Base allows you to upload your products and pricing into Google to make them available within the Google product search system. It’s Google Base that we are covering today as Google have changed their product feed specification and users of ASPDotNetStorefront may find that when they send their feed, Google is reporting that none of their products are loading.

Note for ASPDotNetStorefront version 8 users

If you have ASPDNSF version 8.x, the recommended route to solving the Google Base issue is to contact the ASPDotNetStorefront support team. They have a patch available for v8 versions and the latest release of ASPDotNetStorefront should come shipped with the updated Google Base feed included.

v7 users should also contact the ASPDotNetStorefront support team but if they are unable to provide a Google Base patch, you can follow the simple instructions below to fix your Google Base feed

Updating the ASPDotNetStorefront Google Base feed

Making your existing ASPDotNetStorefront Google Base feed compliant with the latest Google feed specification is actually really simple as long as you are only selling only new or only used products throughout your store and a one line change is required as follows:

1. Edit the file ‘feed.googlebase.xml.config’ in your Admin/XmlPackages directory (Note: for security, you may have previously changed the directory ‘Admin’ to another name)
2. Before the line ‘</item>‘, add this:


If you only sell used products, replace ‘new’ with ‘used’.
3. Save the file

Set your file encoding

Sometimes after importing, Google Base may complain about character encoding within the feed. If this happens in your case, it might be worth forcing Google Base to use UTF-8 encoding rather than trying to detect automatically.

To do this, log into your Google Merchant account and click on ‘data feeds’ in the left menu. Find your feed and click on the word ‘edit’ next to the feed name. Change encoding from auto detect to UTF-8.

More Google Base and ASPDotNetStorefront tips

After writing this article, we discovered some more useful information and resources that you might find useful…

Validating your Google Base feed

If you want to do more detailed diagnostics on your Google Base feed without the trouble of submitting to Google directly. There is an excellent online validator here:

Simply generate your feed with auto-ftp set to ‘no’. This will create the feed file in the images directory of your site. Now submit the full feel URL ( to the above validation site and within about 5 minutes you’ll receive an email back with a very detailed set of diagnostics.

Error “Invalid attribute name: description”

After you’ve submitted your feed to Google Base, you may see Google reporting that some of your products are rejected because of Invalid attribute name: description. Unfortunately, Google doesn’t tell you a great deal more than this and unlike other error types doesn’t show you the products affected.

When we had this error, it was due to a couple of issues. The first was html being included within the product/variant descriptions. The second was related but was caused by a single <br> existing within variant descriptions – even though the ASPDNSF Admin pages showed a blank variant description. Because the Google Base feed looks for a variant description before a product description, this <br> was being used instead of the product description and Google was rejecting it.

A Fix

In our case, we fixed this issue by changing these lines within the feed.googlebase.xml.config:

<xsl:param name="ProductDescr" select="aspdnsf:GetMLValue(description)"></xsl:param>
<xsl:param name="VariantDescr" select="aspdnsf:GetMLValue(VariantDescr)"></xsl:param>

To this:

<xsl:param name="ProductDescr" select="aspdnsf:StripHtml(aspdnsf:GetMLValue(description,$WebConfigLocaleSetting,'FALSE'))"></xsl:param>
<xsl:param name="VariantDescr" select="aspdnsf:StripHtml(aspdnsf:GetMLValue(VariantDescr,$WebConfigLocaleSetting,'FALSE'))"></xsl:param>

This uses the full version of the ASPDotNetStorefront function ‘GetMLValue’ to return the descriptions without HTML Encoding, then the StripHtml() function removes all html tags.

ASPDotNetStorefront Development Services

Are you using ASPDotNetStorefront, or are you thinking of using it for your website? Webopius provide a comprehensive range of ASPDotNetStorefront development services. From small fixes, to site deployments and custom ASPDotNetStorefront theming – all at very competitive prices.

Please Contact us for more information. For a description of ASPDotNetStorefront services offered, please click here.

  • Tags