Forums / Templates, Stylesheets, Page Layout / Adding a ranking system to my product_info page

Adding a ranking system to my product_info page

Locked

Views: 1,120

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
17 Nov 2006, 3:33 PM
#1
darkmuncan avatar

darkmuncan

New Zenner

Join Date:
Aug 2005
Posts:
33
Plugin Contributions:
0

Adding a ranking system to my product_info page

Hi, I recently purchased this 5 star rating system software.

http://www.adriantnt.com/products/rating_system/

It's a great release, works kinda like blockbuster.com and other sites where customer can do a quick rating on your product. The software is basically just a swf and a php file, no database required. The way you display it is by adding a snippet of html. Within that snippet of code the only elements that have to change for each item to have a different voting total is the id of the flash file. Here's a sample of the code that is added in standard html, i've also added a script at the bottom to override that dumb "click here to activate this control" thing in IE:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="120" height="50" id="rating" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.notmydomain.com/store/ratings/rating_id.swf?id=12345" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <embed src="http://www.notmydomain.com/store/ratings/rating_id.swf?id=12345" quality="high" bgcolor="#ffffff" width="120" height="50" name="rating" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object> <script type="text/javascript" src="http://www.notmydomain.com/store/ratings/ieupdate.js"></script>

So basically you just replace id=12345 with your model # or name or whatever just so it's different for each product. So here begins the real question, up to this point I've been using this in the description element of the page. When I add a product in the admin panel after typing "blah blah blah, this product is cool and does this and is really great" I add in the html snippet under it thereby producing the rating system right under my description text when viewing the product page. So far this works ok, but it is tedious because I have to add it in manually every time I add a product. I use Easy Populate a lot to import mass products and when I've added in this snippet through EP sheet it doesn't display correctly in Firefox so I have to manually log into admin panel and add it to product description.
What I really want to do is add this snippet somehow within the product_info page, most likely in my template override version, I think it's product_info_display.php perhaps. I would like to add it just underneath the product image if possible. I'm just not sure how to convert the html elements within the php of the page, I'm not a php hand coder at all although usually i can find my way around other peoples code. I think I've found the right area to put in the information within that template file, but I must not be putting it in correctly because it just will not display. Also I should say I would like to somehow tie in the $product_id field in the database to autopopulate within that code snippet if possible, that way the id field would be autopopulated as the page is loaded. Does this all make sense and does anyone know the proper way to format my html snippet into something that will be read correctly within the product_info_display.php template file? Thanks for any advice.

17 Nov 2006, 4:43 PM
#2
darkmuncan avatar

darkmuncan

New Zenner

Join Date:
Aug 2005
Posts:
33
Plugin Contributions:
0

Re: Adding a ranking system to my product_info page

As a followup, this is what I tried to add in to the product_info_display.php template page. Note I added the variable $products_model in the id field thinking that would accomplish the autopopulate of the model # into the code. I really could use some help from an experienced php coder. Take a look:

echo"<tr>";
echo"<td colspan="2" align="left">";
echo"<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="120" height="50" id="rating" align="middle">";
echo"<param name="allowScriptAccess" value="sameDomain" />";
echo"<param name="movie" value="http://www.notmydomain.com/store/ratings/rating_id.swf?id=$products_model" />";
echo"<param name="quality" value="high" />";
echo"<param name="bgcolor" value="#ffffff" />";
echo"<embed src="http://www.notmydomain.com/store/ratings/rating_id.swf?id=$products_model" quality="high" bgcolor="#ffffff" width="120" height="50" name="rating" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />";
echo"</object>";
echo"<script type="text/javascript" src="http://www.notmydomain.com/store/ratings/ieupdate.js"></script>";
echo"</td>";
echo"</tr>";

18 Nov 2006, 10:25 PM
#3
darkmuncan avatar

darkmuncan

New Zenner

Join Date:
Aug 2005
Posts:
33
Plugin Contributions:
0

Re: Adding a ranking system to my product_info page

No suggestions, nothing I've tried so far is working...