Wednesday, January 20, 2010

Installing Amazon's Product Preview tool

This article is about fixing a problem with installing Amazon's Product Preview feature into your blog or website.

Amazon's Product Preview code:

As you build your Amazon Associates product links through Amazon's website, you might notice that, in the sidebar, there there is a link to put the Product Previews feature into your website.

The instructions say to place the HTML "after your content and before your closing tag", which is fine provided you are willing to accept the disadvantages of editing your template, and are not using a dynamic template.


Is it that easy?

When I first discovered this, in Jan  2010, I tried to install it got this error:

"Your template could not be parsed as it is not well-formed. Please make sure that all XML elements are closed properly.
XML error message: The reference to entity "o" must end with the ';' delimiter."
After a little investigation, I found that this was an example of 3rd party HTML that needed to be "escaped" before it could be put into my template.

In particular, I had to change the & sign to &-amp-;
(but without the dashes, they're there to stop Blogger from display just an ampersand sign on this page!)

For example:
What Amazon gave me:

<script type="text/javascript" src="http://www.assoc-amazon.co.uk/s/link-enhancer?tag=YOUR-AMAZON-ASSOCIATES-ID&o=2">
</script>
<noscript>
    <img src="http://www.assoc-amazon.co.uk/s/noscript?tag=YOUR-AMAZON-ASSOCIATES-ID" alt="" />
</noscript>

What I needed to change it to:


<script type="text/javascript" src="http://www.assoc-amazon.co.uk/s/link-enhancer?tag=YOUR-AMAZON-ASSOCIATES-ID&amp;o=2">
</script>
<noscript>
    <img src="http://www.assoc-amazon.co.uk/s/noscript?tag=YOUR-AMAZON-ASSOCIATES-ID" alt="" />
</noscript>


What your readers see:


I don't have Amazon Product Preview installed in this blog, because that's not the effect I'm looing for - but I am going to try to install it into this post.

If I've been successful, then you will see it when you hover your mouse over the Amazon product ad to the right of this paragraph.   (Though last time I checked, it had not been successful.)




Related Articles:



Building Amazon Associates product links

Limitations of dynamic templates.

Adding 3rd party HTML to your blog

Advantages and disadvantages of editing your template

Some other advertsing programmes to consider

adsense

0 comments:

Post a Comment

 
 
Copyright © blog
Blogger Theme by Blogger Designed and Optimized by Tipseo