Assistance desperately needed with creating affiliate links

Hi there, I do hope someone can take a little time to assist me with a problem I cannot seem to resolve alone, despite hours on the internet and different forums… ;D

I am attempting to create buylinks for books to three affiliate sites: Amazon, Barnes and Noble and Smashwords. Barnes and Noble have an automated link generator, which does simplify things. For Amazon and Smashwords I have to add in my affiliate code.

My difficulty comes in with actually displaying the links. I need the following:

Author submits her book link via an online submission form
The output php adds the Amazon affiliate code
It displays as an image with the affiliate url embedded

The code I used previously, and which worked very well (prior to Joomla 3), used the following:


$value = $this->value;

$options = $this->params->get(‘params.open_url’, 1) ? ’ target="_blank"’ : ‘’;

echo JHtml:: link(‘http://’ . $value[0][‘url’].’?tag=romautjudrai-20’, “”, $options ) ;


I have attached the full field output file for reference

I’m sure this may be a simple request, but I am a total beginner and have worked hard to try to resolve this on my own. One suggestion has been to use a text field rather than a url field with a regex code, which I have tried, but the fields then just display as “array” on the article.

Oh, pretty please, can someone assist. I shall grovel in abject appreciation.

Many thanks,

amazon.txt (3.89 KB)

See what the variable that echoes “Array” actually contain.

ex:[php]$array = array(1,2,3);
echo $array; // Array
var_dump($array); // array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }[/php]

Or pretty print it:[php]$array = array(1,2,3);
echo ‘



array(3) { [0]=> int(1) [1]=> int(2) [2]=> int(3) }

Ugh. It’s taken me a couple of days of fruitless pondering to acknowledge that I have no idea what you’re talking about. Such is ignorance. I have run the code through every php checker I can find, and they all return no error with code. If you could find the time and patience to “draw me little pictures” I would be most grateful. I have put off asking until I really had no choice.


Sponsor our Newsletter | Privacy Policy | Terms of Service