Topic: [SOLVED] How to configure for amazon uk?

0 Members and 1 Guest are viewing this topic.

February 23, 2007, 06:46 AM

Offline enkel

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Birdline Charity Site
Hi, this was just what I was looking for to add books etc. to a site I'm working on.

However by default it is linking to the US Amazon site (Amazon.com) but I need the UK site.

I changed the line
Code: [Select]
$address1 = "http://rcm.amazon.com /e/cm?t=";
To:

Code: [Select]
$address1 = "http://rcm-uk.amazon.co.uk /e/cm?t=";
But this doesn't show the images....what am I missing (apart from the knowledge to make it work  ;D).

« Last Edit: February 23, 2007, 07:46 AM by enkel »

February 23, 2007, 06:49 AM

Offline Steven Pignataro

  • Magic of the sig!
  • Administrator
  • Hero Member
  • *****
  • Posts: 605
    • View Profile
    • 'corePHP' - Web Development Services
Can you provide me a link?

Steven Pignataro - CEO
http://www.corephp.com - 'corePHP' - Accessibility Experts

-- Professional Support: http://support.corephp.com

February 23, 2007, 06:51 AM

Offline enkel

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Birdline Charity Site

February 23, 2007, 06:56 AM

Offline enkel

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Birdline Charity Site
Looking at the generated source (items are published now too  :-[) I see this:

Code: [Select]
</p><div class="amazon_product_links">
<script language="javascript" type="text/javascript">
function iFrameHeight() {
var h = 0;
if ( !document.all ) {
h = document.getElementById('blockrandom').contentDocument.height;
document.getElementById('blockrandom').style.height = h + 60 + 'px';
} else if( document.all ) {
h = document.frames('blockrandom').document.body.scrollHeight;
document.all.blockrandom.style.height = h + 20 + 'px';
}
}
</script>
<noscript>
<div class="amazon_product_links_noscript">
<iframe id="blockrandom_0764118862&amp;fc1" name="iframe" src="http://rcm-uk.amazon.co.uk /e/cm?t=birdlinmeetin-21&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0764118862&amp;fc1&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;lc1=0000ff&amp;bc1=000000&amp;bg1=ffffff&amp;f=ifr" style="width:120px;height:250px;" scrolling="no" frameborder="0" marginwidth="0" align="middle" class="wrapper"></iframe>
</div>
</noscript>

<script language="javascript" type="text/javascript">
<!--
function writeJS(){
var str='';
str+=' <iframe';
str+=' onload="iFrameHeight()"';
str+=' id="blockrandom_0764118862&fc1;"';
str+=' name="iframe"';
str+=' src="http://rcm-uk.amazon.co.uk /e/cm?t=birdlinmeetin-21&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0764118862&amp;fc1&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;lc1=0000ff&amp;bc1=000000&amp;bg1=ffffff&amp;f=ifr"';
str+=' style="width:120px;height:250px;"';
str+=' scrolling="no"';
str+=' frameborder="0"';
str+=' marginwidth="0"';
str+=' align="middle"';
str+=' class="wrapper">';
str+=' <\/iframe> ';
document.write(str);
}
writeJS();
//-->

</script> <iframe onload="iFrameHeight()" id="blockrandom_0764118862&amp;fc1;" name="iframe" src="http://rcm-uk.amazon.co.uk%20/e/cm?t=birdlinmeetin-21&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0764118862&amp;fc1&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;lc1=0000ff&amp;bc1=000000&amp;bg1=ffffff&amp;f=ifr" style="width: 120px; height: 250px;" marginwidth="0" class="wrapper" align="middle" frameborder="0" scrolling="no"> </iframe>
</div>

Which looks right.....I think :D

February 23, 2007, 07:20 AM

Offline Steven Pignataro

  • Magic of the sig!
  • Administrator
  • Hero Member
  • *****
  • Posts: 605
    • View Profile
    • 'corePHP' - Web Development Services
there is a space after .co.uk

take that out and it shall resolve your problems.

Kindest regards,

Steven Pignataro - CEO
http://www.corephp.com - 'corePHP' - Accessibility Experts

-- Professional Support: http://support.corephp.com

February 23, 2007, 07:29 AM

Offline enkel

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Birdline Charity Site
DOH!

Yes that improved it, still not quite right though as it now shows a generic Amazon image for 'Amazon.com

Really odd 'cos if I leave the code at default it works perfectly....

BTW you are very good on support, most impressed :)

February 23, 2007, 07:46 AM

Offline enkel

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Birdline Charity Site
Cooking on gas now!

For UK you need to change about line #77:
Code: [Select]
$address1 = "http://rcm.amazon.com/e/cm?t=";

to:

Code: [Select]
$address1 = "http://rcm-uk.amazon.co.uk/e/cm?t=";
And about line #79:

Code: [Select]
$address3 = "&amp;o=1&amp;p=8&amp;l=as1&amp;asins=";
 to

Code: [Select]
$address3 = "&amp;o=2&amp;p=8&amp;l=as1&amp;asins=";
This will vary from country to country I think, examining the HTML Link the associate interface gives you will reveal the correct codes!

February 23, 2007, 08:31 AM

Offline Steven Pignataro

  • Magic of the sig!
  • Administrator
  • Hero Member
  • *****
  • Posts: 605
    • View Profile
    • 'corePHP' - Web Development Services
Hum - that is a good thing to know - i will have to build one for UK users.

Thanks for the info on this - I didn't know it was different in the linking system then just the portion of the link.

Kindest regards,

Steven Pignataro - CEO
http://www.corephp.com - 'corePHP' - Accessibility Experts

-- Professional Support: http://support.corephp.com

February 23, 2007, 08:31 AM

Offline Steven Pignataro

  • Magic of the sig!
  • Administrator
  • Hero Member
  • *****
  • Posts: 605
    • View Profile
    • 'corePHP' - Web Development Services
DOH!

Yes that improved it, still not quite right though as it now shows a generic Amazon image for 'Amazon.com

Really odd 'cos if I leave the code at default it works perfectly....

BTW you are very good on support, most impressed :)

Thanks - We think support is the most important part of our business model.

Kindest regards,

Steven Pignataro - CEO
http://www.corephp.com - 'corePHP' - Accessibility Experts

-- Professional Support: http://support.corephp.com