Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

2.1d ORIGINAL updated


larryjam

Recommended Posts

Installed Ultimate SEO URLs 2.1d ORIGINAL updated Jack_mcs 23 Nov 2008. Most of the uls work fine except the "Review" links in the side "Info Box". The review links work great on the product info pages, just not in the side info box. I have no idea what I need to modify to get this to work, any help appreciated. Thanks.

Link to comment
Share on other sites

Installed Ultimate SEO URLs 2.1d ORIGINAL updated Jack_mcs 23 Nov 2008. Most of the uls work fine except the "Review" links in the side "Info Box". The review links work great on the product info pages, just not in the side info box. I have no idea what I need to modify to get this to work, any help appreciated. Thanks.

i dont care about the versions but as far as i remember, the only bit in the review box that may not seo is the review write, if you have not made changes to the review box file (includes/boxes/review.php). veen the review write can be made seo'ed by doing some changes in the .htaccess file and the seo class (fairly easy and straight forward).

maybe post your review.php as mentioned above if the review & the review info pages arent seo'ing?

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

i dont care about the versions but as far as i remember, the only bit in the review box that may not seo is the review write, if you have not made changes to the review box file (includes/boxes/review.php). veen the review write can be made seo'ed by doing some changes in the .htaccess file and the seo class (fairly easy and straight forward).

maybe post your review.php as mentioned above if the review & the review info pages arent seo'ing?

 

Ken

 

Thanks for your help Ken

I have attached (includes/boxes/reviews.php)

<?php
/*
 $Id: reviews.php 1739 2007-12-20 00:52:16Z hpdl $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
?>
<!-- reviews //-->
	  <tr>
		<td>
<?php
 $info_box_contents = array();
 $info_box_contents[] = array('text' => BOX_HEADING_REVIEWS);

 new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_REVIEWS));

 $random_select = "select r.reviews_id, r.reviews_rating, p.products_id, p.products_image, pd.products_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "'";
 if (isset($HTTP_GET_VARS['products_id'])) {
$random_select .= " and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'";
 }
 $random_select .= " order by r.reviews_id desc limit " . MAX_RANDOM_SELECT_REVIEWS;
 $random_product = tep_random_select($random_select);

 $info_box_contents = array();

 if ($random_product) {
// display random review box
$rand_review_query = tep_db_query("select substring(reviews_text, 1, 60) as reviews_text from " . TABLE_REVIEWS_DESCRIPTION . " where reviews_id = '" . (int)$random_product['reviews_id'] . "' and languages_id = '" . (int)$languages_id . "'");
$rand_review = tep_db_fetch_array($rand_review_query);

$rand_review_text = tep_break_string(tep_output_string_protected($rand_review['reviews_text']), 15, '-<br>');

$info_box_contents[] = array('text' => '<div align="center"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a></div><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_product['products_id'] . '&reviews_id=' . $random_product['reviews_id']) . '">' . $rand_review_text . ' ..</a><br><div align="center">' . tep_image(DIR_WS_IMAGES . 'stars_' . $random_product['reviews_rating'] . '.gif' , sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_product['reviews_rating'])) . '</div>');
 } elseif (isset($HTTP_GET_VARS['products_id'])) {
// display 'write a review' box
$info_box_contents[] = array('text' => '<table border="0" cellspacing="0" cellpadding="2"><tr><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . tep_image(DIR_WS_IMAGES . 'box_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a></td><td class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, 'products_id=' . $HTTP_GET_VARS['products_id']) . '">' . BOX_REVIEWS_WRITE_REVIEW .'</a></td></tr></table>');
 } else {
// display 'no reviews' box
$info_box_contents[] = array('text' => BOX_REVIEWS_NO_REVIEWS);
 }

 new infoBox($info_box_contents);
?>
		</td>
	  </tr>
<!-- reviews_eof //-->

Link to comment
Share on other sites

that looks like an unmodified, original file. i did not see any problem in the review box. when clicked, it gave a proper seo url with product name in the url ending with the review id, which is correct. eg:

 

..../95-04-toyota-tacoma-fender-flares-pri-29.html?reviews_id=3

 

so, dont know what you are referring to as the problem in your OP?

 

Ken

Edited by GemRock

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

that looks like an unmodified, original file. i did not see any problem in the review box. when clicked, it gave a proper seo url with product name in the url ending with the review id, which is correct. eg:

 

..../95-04-toyota-tacoma-fender-flares-pri-29.html?reviews_id=3

 

so, dont know what you are referring to as the problem in your OP?

 

Ken

 

Oh, sorry I did not think it was a sef url because of the ?reviews_id=3 on the end of it.

How about the "write rewiew" link,

http://www.mysite.com/catalog/product_reviews_write.php?products_id=33

can it be made mor sef

Link to comment
Share on other sites

Oh, sorry I did not think it was a sef url because of the ?reviews_id=3 on the end of it.

How about the "write rewiew" link,

http://www.mysite.com/catalog/product_reviews_write.php?products_id=33

can it be made mor sef

you certainly can:

1. add this to .htaccess

RewriteRule ^(.*)-prw-(.*).html$ product_reviews_write.php?products_id=$2&%{QUERY_STRING}

2. add this to the seo class, after

'products_id_review_info' => '-pri-',

'products_id_review_write' => '-prw-',

3. after

case ( $page == FILENAME_PRODUCT_REVIEWS_INFO ):	   
   $url = $this->make_url($page, $this->get_product_name($p2[1]), 'products_id_review_info', $p2[1], '.html', $separator);
   break;

add:

case ( $page == FILENAME_PRODUCT_REVIEWS_WRITE ):
   $url = $this->make_url($page, $this->get_product_name($p2[1]), 'products_id_review_write', $p2[1], '.html', $separator);
   break;

not tested but should work. easy & straight forward, yep? anyone can do it and follow this example to make further changes.

 

Ken

Edited by GemRock

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

would like to add a note: i answered your question as is. the original u seo url contribution is a good one and remains so if you prefer to use it. i personally no longer promote it instead i use my own solution which does NOT use any seo class whatsoever.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Ken thank you very much for your help. I see no change in the link after applying the changes you suggested. I have cleared my cache and refreshed the browser but no change, The are no error message either, just the same url. Perhaps it is because I am using STS.

 

I would like to try your seo url solution.

 

I know of, and have used your Header Tags For Novices, but I did not know you had a mod for seo urls.

 

Could you please point me in the right direction

 

Thank You

Larry

Link to comment
Share on other sites

hi larry

 

I just tested it on my local server and it certainly worked:

 

..../visionace-tablets-prw-67.html

 

why not? see no reason at all. dont think it is related to sts. maybe you need to double check the changes against what i posted above.

 

mine would be released free in due course.

 

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

...mine would be released free in due course...

its now available to site owners ONLY who are doing their own sites themselives.

Ken

commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile).

over 20 years of computer programming experience.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...