Results 1 to 9 of 9

Thread: What's Wrong With My Product Page?

  1. #1
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801

    What's Wrong With My Product Page?

    What's wrong with this page?

    http://www.nichetimbers.co.uk/jewelr...uct/B0000AOX2N


    This is my code:

    Code:
    <?php
    
    $var_array = explode("/",$PATH_INFO);
    $asin = $var_array[3];
    
    // include class
    include("nusoap.php");
    
    // create a instance of the SOAP client object
    $soapclient = new
    soapclient("http://soap.amazon.com/schemas2/AmazonWebServices.wsdl",
    true);
    
    // uncomment the next line to see debug messages
    // $soapclient->debug_flag = 1;
    
    // create a proxy so that WSDL methods can be accessed directly
    $proxy = $soapclient->getProxy();
    
    // set up an array containing input parameters to be
    // passed to the remote procedure
    $params = array(
    		    'asin'        => sprintf("%010d", $_GET['asin']),
    		    'tag'         => 'games2go-20',
    		    'type'        => 'heavy',
    		    'devtag'      => 'D6Y8R22P5D1FJ'
    );
    
    // invoke the method 
    $result = $proxy->ASINSearchRequest($params);
    $items = $result['Details'];
    
    // display the result
    ?>
    
    <html>
    <head>
    <title>Jewelry Store - Buy-Jewelry.net - Fine Jewelry - <? echo $items[0]['ProductName']; ?></title>
    <basefont face="Verdana">
    </head>
    
    <body bgcolor="white" topmargin="0" rightmargin="0" leftmargin="0">
    <table>
    <tr>
    <td>
    <img src="images/topleft.jpg" border="0" />
    </td>
    <td>
    <img src="images/topright.gif" border="0" />
    </td>
    </tr>
    <tr>
    <td valign="top">
    <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="0">
    <TR BGCOLOR="#00639C">
            <TD HEIGHT="14" CLASS="infoBoxHeading" valign="top"><IMG SRC="images/topleftmenu.gif" BORDER="0" alt="" WIDTH="11" HEIGHT="14"></TD>
                <TD WIDTH="100%" HEIGHT="14" CLASS="infoBoxHeading" > <font color="#ffe82d"><b>Jewelry Menu</b></font></TD>
              <TD HEIGHT="14" CLASS="infoBoxHeading" nowrap><IMG SRC="images/toprightmenu.gif" BORDER="0" alt="" WIDTH="11" HEIGHT="14"></TD>
      </TR>
    </TABLE>
    <TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="1" CLASS="infoBox" BGCOLOR="b6b7cb">
      <TR>
        <TD><TABLE BORDER="0" WIDTH="100%" CELLSPACING="0" CELLPADDING="3" CLASS="infoBoxContents" BGCOLOR="f8f8f9">
                    <TR> 
                      <TD VALIGN="top" CLASS="boxText"> 
    <?php include("menu.inc"); ?>
        
                        </TD>
                    </TR>
                    <TR> 
                      <TD><IMG SRC="images/toprightmenu.gif" BORDER="0" alt="" WIDTH="100%" HEIGHT="1"></TD>
                    </TR>
                  </TABLE>
    </td>
    </tr>
    </table>
    </td>
    <td valign="top">
    
    
    <table width="100%" border="0" cellspacing="5" cellpadding="0"> <tr> <td
    align="center" valign="top" rowspan="7"><a href="<? echo
    $items[0]['Url']; ?>"><img border="0" src=<? echo
    $items[0]['ImageUrlLarge']; ?>></a></td></tr><tr> <td><font size="-1"><b><? echo
    $items[0]['ProductName']; ?></b> / <? echo implode(", ",
    $items[0]['Authors']); ?></font></td> </tr> <tr> <td align="left"
    valign="top"><font size="-1">List Price: <? echo $items[0]['ListPrice'];
    ?></font></td> </tr> <tr> <td align="left" valign="top"><font
    size="-1">Amazon.com Price: <? echo $items[0]['OurPrice'];
    ?></font></td> </tr> <tr> <td align="left" valign="top"><font
    size="-1">Publisher: <? echo $items[0]['Manufacturer']; ?></font></td>
    </tr> <tr> <td align="left" valign="top"><font size="-1">Availability:
    <? echo $items[0]['Availability']; ?></font></td> </tr> <tr> <td
    align="left" valign="top"><font size="-1">Amazon.com sales rank: <? echo
    $items[0]['SalesRank']; ?></font></td> </tr> <tr> <td align="left"
    valign="top"><font size="-1">Average customer rating: <? echo
    $items[0]['Reviews']['AvgCustomerRating']; ?></font></td> </tr> <tr> <td
    colspan="2"> <font size="-1"> <hr> <?
    	foreach($items[0]['Reviews']['CustomerReviews'] as $r)
    	{
    ?>
    	<b><? echo $r['Summary']; ?></b>
    	<br>
    	<? echo $r['Comment']; ?>
    	<hr>
    <?
    	}
    ?>
    </font>
    </td>
    </tr>
    </table>
    
    </td>
    </tr>
    </table>
    
    <font size="-1">
    Disclaimer: All product data on this page belongs to Amazon.com. No
    guarantees are made as to accuracy of prices and information. YMMV!
    </font>
    
    </body>
    </html>

  2. #2
    Registered
    Join Date
    Jan 2004
    Posts
    224
    Instead of:
    PHP Code:
    'asin' => sprintf("%010d"$_GET['asin']), 
    use:
    PHP Code:
    'asin' => $asin
    Last edited by MattM; 01-31-2004 at 04:27 PM.

  3. #3
    Registered Mike's Avatar
    Join Date
    May 2003
    Location
    UK
    Posts
    2,755
    I really don't know why they give you the sprint method in the devshed tutorial. It did give a reason, but I've never had any problems with using what Matt said.
    Don't you just love free internet games ?

  4. #4
    Senior Member chromate's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    2,348
    I think it was a work-around to combat some old bug with AWS that's been fixed now.

  5. #5
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    Still doesn't work.

  6. #6
    Senior Member chromate's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    2,348
    You shouldn't be using $_GET[asin] at all. Remember you're using search engine friendly URL's now, so using the standard $_GET will no longer work because the variable doesn't appear that way in your URL.

    All you need to so is use $asin, because you've already set it at the top of your code.

  7. #7
    Registered Member incka's Avatar
    Join Date
    Aug 2003
    Location
    Wakefield, UK, EU
    Posts
    3,801
    Still having problems with line 93.

    Line's 92 - 94 are:

    Code:
    colspan="2"> <font size="-1"> <hr> <?
    	foreach($items[0]['Reviews']['CustomerReviews'] as $r)
    	{

  8. #8
    Senior Member chromate's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    2,348
    What're the error you're getting?

    do print_r($items) to make sure the array actually has some Reviews to iterate over.

  9. #9
    Registered
    Join Date
    Jan 2004
    Posts
    224
    Yeah, is it a parse error or something else?

Similar Threads

  1. AWS product page not working in title
    By MattM in forum Advertising & Affiliate Programs
    Replies: 6
    Last Post: 02-03-2004, 07:35 PM
  2. need to exclude one page from a general .htaccess redirect
    By Apollo in forum General Management Issues
    Replies: 1
    Last Post: 01-10-2004, 01:56 PM
  3. Links to same page
    By Mike in forum Search Engine Optimization
    Replies: 5
    Last Post: 12-06-2003, 06:43 PM
  4. linking to front page
    By Kyle in forum Search Engine Optimization
    Replies: 5
    Last Post: 12-04-2003, 06:02 PM
  5. increasing page rank
    By Cloughie in forum Search Engine Optimization
    Replies: 2
    Last Post: 10-02-2003, 08:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •