Amazon Widgets

12 posts by 2 authors in: Forums > CMS Builder
Last Post: April 21, 2010   (RSS)

By bashful - April 20, 2010

Hi,

I was trying to integrate amazon widgets but I am having a little problem.

I have setup a field with wysiwyg and click on html and paste in the code provided by amazon.

Unfortunately once saved - I can't see the widget - If I enter text in wysiwyg and save, I can see the text.

Not sure why this is happening - any help would be really appreciated.

Many Thanks

Re: [bashful] Amazon Widgets

By Jason - April 20, 2010

Hi,

Is it just HTML code? If so, it may be best to store this information in a text box instead of a wysiwyg editor.

Give that a try. If that doesn't work, please give me an example of the code you're trying to enter and what is actually being output.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [bashful] Amazon Widgets

By bashful - April 20, 2010

Oops - sorry forgot to mention - it outputs nothing - just blank

also the code was not copied correctly:

<SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822/GB/proiq-21/8001/9ec58c10-7192-4784-938e-40d8e659fa5d"> </SCRIPT> <NOSCRIPT><A HREF="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fproiq-21%2F8001%2F9ec58c10-7192-4784-938e-40d8e659fa5d&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT>


I did embed a video and that worked fine - but amazon code is not working. I'll also try changing it to text field.

Thanks

Re: [bashful] Amazon Widgets

By Jason - April 20, 2010

Hi,

I just tried it and it does work when outputted from a textbox. If you're still running into problems, please post the page you're working on and I'll take a look at it for you.

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

Re: [Jason] Amazon Widgets

By bashful - April 20, 2010

Thanks for quick reply - I tested it with text box and it worked so cheers for that.

The funny thing is it works on some wysiwyg so not sure why this is - do I need to upgrade tinymce - do you think ??? I would prefer to have it set to wysiwyg because it gives flexibility to embed code or add images.

also I wanted to be able to justify text and this editor doesn't have it

Re: [bashful] Amazon Widgets

By bashful - April 20, 2010

Hi,

One of the text boxes works but I tried on another and it does work: here's the code:

<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php

require_once "/hsphere/local/home/sbashir/startnursery.com/blog/lib/viewer_functions.php";

list($video_podcast_adsRecords, $video_podcast_adsMetaData) = getRecords(array(
'tableName' => 'video_podcast_ads',
));

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<style type="text/css">
body { font-family: arial; }
.instructions { border: 3px solid #000; background-color: #EEE; padding: 10px; text-align: left; margin: 25px}
</style>
</head>
<body>

<!-- INSTRUCTIONS -->
<div class="instructions">
<b>Sample List Viewer - Instructions:</b>
<ol>
<?php ?>
<li><b>Remove any fields you don't want displayed.</b> (Most list pages only have title and link fields.)</li>
<li>Rearrange remaining fields to suit your needs.</li>
<li>Copy and paste code into previously designed page (or add design to this page).</li>
</ol>
</div>
<!-- /INSTRUCTIONS -->

<!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
<h1>Video Podcast Ads - List Page Viewer</h1>
<?php foreach ($video_podcast_adsRecords as $record): ?>
Record Number: <?php echo $record['num'] ?><br/>
Title: <?php echo $record['title'] ?><br/>
Content: <?php echo $record['content'] ?><br/>
Sidebar Title1: <?php echo $record['sidebar_title1'] ?><br/>
Sidebar Content1: <?php echo $record['sidebar_content1'] ?><br/>
Sidebar Title2: <?php echo $record['sidebar_title2'] ?><br/>
Sidebar Content2: <?php echo $record['sidebar_content2'] ?><br/>
Sidebar Title3: <?php echo $record['sidebar_title3'] ?><br/>
Sidebar Content3: <?php echo $record['sidebar_content3'] ?><br/>
Sidebar Title4: <?php echo $record['sidebar_title4'] ?><br/>
Sidebar Content4: <?php echo $record['sidebar_content4'] ?><br/>
Sidebar Title5: <?php echo $record['sidebar_title5'] ?><br/>
Sidebar Content5: <?php echo $record['sidebar_content5'] ?><br/>
_link : <a href="<?php echo $record['_link'] ?>"><?php echo $record['_link'] ?></a><br/>

<hr/>
<?php endforeach ?>

<?php if (!$video_podcast_adsRecords): ?>
No records were found!<br/><br/>
<?php endif ?>
<!-- /STEP2: Display Records -->

</body>
</html>

***************

and link to show what comes up:

http://tinyurl.com/y4byu5b

Hope this helps

Re: [bashful] Amazon Widgets

By bashful - April 20, 2010

meant to say doesn't work - sidebar content1 -notshowing but sidebar content 2 is showing - both set as text boxes.

Re: [bashful] Amazon Widgets

By bashful - April 20, 2010

Hi,

I've tested this and it appears it works sometimes and sometimes it doesn't. if I use a text box or wysiwyg the same thing happens, works intermittantly. really strange.

Cheers.

Re: [bashful] Amazon Widgets

By Jason - April 21, 2010

Hi,

I've been testing it. It seems that the sidebar content2 always displays, and sidebar content 1 never does. Is that what you are finding as well?

I looked at what has actually being outputted:

Sidebar Title1: amazon1<br/>
Sidebar Content1: <script charset="utf-8" type="text/javascript"> </script><br/>
<p><noscript><A HREF="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fproiq-21%2F8001%2F9ec58c10-7192-4784-938e-40d8e659fa5d&Operation=NoScript" mce_HREF="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&amp;MarketPlace=GB&amp;ID=V20070822%2FGB%2Fproiq-21%2F8001%2F9ec58c10-7192-4784-938e-40d8e659fa5d&amp;Operation=NoScript">Amazon.co.uk Widgets</A></noscript></p><br/>
Sidebar Title2: amazon2<br/>
Sidebar Content2: <SCRIPT charset="utf-8" type="text/javascript" src="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822/GB/proiq-21/8001/9ec58c10-7192-4784-938e-40d8e659fa5d"> </SCRIPT> <NOSCRIPT><A HREF="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Fproiq-21%2F8001%2F9ec58c10-7192-4784-938e-40d8e659fa5d&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT><br/>


I noticed that in sidebar content 2, the script tag specifies an src="" attribute. This is missing in Sidebar content 1. Does this match what you find in the database?

You may want to try pasting the code back into the database again.

Let me know.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/