You are here:  » Having great difficulty with showing the "tapestry_stars" in the search results

Support Forum



Having great difficulty with showing the "tapestry_stars" in the search results

Submitted by harican on Wed, 2008-05-21 19:37 in

Yes, "config_useInteraction" in file, cofig.php is set to true.

The "tapestry_stars" or rating stars work on a subdomain site, but not on the main site, below is the php code for the file searchresults.php on both the subdomain site and the main site.

<?php
  if (file_exists("html/user_searchresults_before.php")) require("html/user_searchresults_before.php");
?>
<div class='searchresults'>
  <table width='100%'>
    <?php foreach($searchresults["products"] as $product): ?>
      <tr>
        <td width='15%'>
          <?php if ($product["image_url"]): ?>
          <a href='<?php print $product["productHREF"]; ?>'><img border='1' width='150' height='150' src='<?php print $product["image_url"]; ?>' alt='<?php print $product["name"]; ?>' /></a>
         <?php endif; ?>
        </td>
        <td width='5%'>&nbsp;</td>
        <td width='50%' valign='middle'>
          <h4><a href='<?php print $product["productHREF"]; ?>'><?php print $product["name"]; ?></a></h4>
          <p><?php print substr($product["description"],0,250); ?></p>
          <?php if ($config_useInteraction): ?>
          <?php if ($product["rating"]) print tapestry_stars($product["rating"],""); ?> &nbsp; <a href='/reviews.php?q=<?php print $product["name"]; ?>'><small><?php print translate("Write A Review Or Read Other User Reviews For This Product"); ?></small></a>
         <?php else: ?>
         <?php print translate("&nbsp;"); ?>
         <?php endif; ?>
         </p>
        </td>
        <td width='5%'>&nbsp;</td>
        <td width='25%' valign='middle' align='center'>
          <?php if ($product["numMerchants"] > 1): ?>
            <em><?php print translate("from"); ?></em>&nbsp;<strong><?php print $config_currencyHTML.$product["minPrice"]; ?></strong><br />
            <span class='nobr'><form name='' onclick="document.location='<?php print $product["productHREF"]; ?>'"><input type='button' value='<?php print translate("Compare Prices"); ?>' /></form></span>
          <?php else: ?>
            <strong><?php print $config_currencyHTML.$product["price"]; ?></strong><br />
            <span class='nobr'><form name='' onclick="document.location='<?php print $product["productHREF"]; ?>'"><input type='button' value='<?php print translate("More Information"); ?>' /></form></span>
          <?php endif; ?>
        </td>
      </tr>
     <tr>
        <td width='100%' colspan='5'>
        <hr>
        <p>&nbsp;
        </td>
      </tr>
    <?php endforeach; ?>
  </table>
</div>
<?php
  if (file_exists("html/user_searchresults_after.php")) require("html/user_searchresults_after.php");
?>

Submitted by support on Thu, 2008-05-22 06:36

Hi,

The tapestry_stars() function returns img HTML that uses $config_baseHREF, so it shouldn't be affected by location.

Could you perhaps view the source on the site that does't work, and then locate the img tag for the stars. Copy the src (e.h /images/3s.gif) and then paste that directly into the address to bar to confirm that the image files are being served?

If you're not sure, could you email me a link to a page that should be but isn't showing the stars and i'll take a look for you...

Cheers,
David.

Submitted by harican on Thu, 2008-05-22 08:16

David,

I fixed it. It was the default.css file that I created. All is working okay now.

I must say, your dedication to responding to all these posts is highly appreciated.

Thanks so much.