Jump to content

 

yesjapan

Member Since 09 Nov 2008
Offline Last Active Jan 30 2012 06:25 AM
-----

Topics I've Started

Affiliate links without JavaScript

08 August 2011 - 07:35 PM

Currently the Affiliate Add-on generates Javascript code for our banners and links.

EX:

<script id="id_script_banner_1" type="text/javascript" src="http://www.WEBSITE.c...=123"></script>



Many of our customers use Wordpress (which prohibits JavaScript code) or they want to make custom banners ofr our products.

Is there a way to create a direct html link to a product/page with the affiliate ID?

(This is not covered in the KB article.)

How do you add Javascript to a product description?

24 November 2010 - 08:17 PM

We sell music CDs and I have a function that loads AJAX from our website.
But the Javascript is no longer working.

I have tried adding javacript in a custom HTML block and directly posting the javascript into the product description but this doesn't work.

What can I do to get javacript working on an individual product page?

For reference here is some sample code:

<script type="text/javascript">
var artist = 'BAND XYZ';
var album = '';
var tracklist = '3355,2445,2435,2120,3356,2100,3357,2437,2107,3350,2126,2440,;FNT;2:52';
var album_name = 'ALBUM ABC';

var pars = "artist="+artist+"&album="+album+"&tracklist="+tracklist+"&album_name="+album_name;
var url = "/store/getSongSamples.php";
new Ajax.Updater('album_samples', url,{evalScripts:true, method:'post',parameters:pars});
document.write('<div id=album_samples></div>');
</script>