PDA

View Full Version : AWS questions onmymac



onmymac
01-25-2005, 01:19 PM
I am using the AWS code from this web site, thank you. I have it running and operational. Took me a while to figure some things out but now it seems to operate well, along with cache system.

Please, I have a couple of questions, hope there is assistance available.

I would like to replace the standard <title></title> with the name of the product that is returned in the product.php script. How can I do this or is it possible, it is just a variable right. I've tried a couple of things but result is blank.

Also there is much more information on amazon about particular products. Can i just create the variables based on that information to expand it?

There is info like Features, Related, Accessories or Product Description
From the Manufacturer.

Where do i dig in to find and display this information.


ie.

This describes a variable which returns product name

elseif($d_ar[$j]['tag'] == 'ProductName') {$ProductName = $d_ar[$j]['value'];}

So if there is a variable renamed like this

elseif($d_ar[$j]['tag'] == 'Department') {$Department = $d_ar[$j]['value'];}

Would this return the Amazon Department name? I tried it in product.php does not work. I included the display portion down in html section like this <h4><?=$Department?></h4>

If I do this kind of variable assignment do I do this in every file or just the product.php file.

I'm not too worried about those little stars but I found code for them up here on this site... so where do i place that code? Can the stars show in product.php and browse.php?

Any guidance appreciated.

regards
onmymac

Blue Cat Buxton
01-25-2005, 01:32 PM
OK, you are on the right tracks.

to get the product name in the title tag put the title tag after the information has been parsed out of the XML results.

So do all the amazon stuff and then have <title><?=$ProductName?></title> if ProductName holds that particular data

You are also on the right lines for getting other information I echoed out the xml string from aws-functions.php script. Then copy and paste it inot a new browser window and you can see all the data and the variable names and pick what you want

onmymac
01-25-2005, 01:50 PM
Thanks Blue Cat Buxton

Ok, I have the product name now returned as page title. I moved the
html page header code down below the xml request and page title is now product name.

<html>
<head>
<title><?=$ProductName?></title>
<link rel="Stylesheet" href="ama.css" type="text/css" />
</head>
<body>

As for the rest i will play around and see what I can dome up with. I'll probably be back later with other things i can't seem to figure out.

regards
onmymac

onmymac
01-25-2005, 03:15 PM
Hi,

I actually went and installed ASM by freekrai but it has a little bit to much information for me, and to modify that compared to the little script up on this site is two different animals.

I know what you mean by 'echo'. I can see where echo is used throughout... but hit me with a spade, I don't know code to much so figuring out what the eml search returns via echo is beyond my limited scope at the moment.

onmymac

Blue Cat Buxton
01-25-2005, 03:49 PM
if you look in aws-functions.php you will see this line:

// echo $xmlFeed. '<br /><br />';

(about half way down)

change it to

echo $xmlFeed. '<br /><br />';

(ie change it from a comment to an instruction)

this will put the xml query onto the screen (remember to comment it back out with // when you have no more need of it!!)

onmymac
01-25-2005, 06:03 PM
Hi Blue Cat Buxton

What script do you use for your toys site, the one found here on websitepublisher or some other variation?

Thanks

onmymac
01-25-2005, 10:46 PM
Ok I am lost with this similarity etc, etc. I see the xml feed but have absolutely no idea where to begin adding in additional code to pull the extra information. I can display it if I get further down the road I understand that page somewhat. If anyone wants to step in and provide guidance, that'd be great.

thanks
onmymac