Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What happened to ajax vote system?


Recommended Posts

  • 5 months later...

hi. great contrib.

 

installed and modified it for my shop, works all fine. except 1 little thing.

the top_rating.php module does not show any rated products at all. sometimes it shows up 1 product which has not yet been rated but it never shows my top 10?

 

could anyone please help out with this problem? i don't know what is wrong with the sql-query. tried several "solutions" but nothing worked for me :-(

Link to comment
Share on other sites

  • 9 months later...
hi. great contrib.

 

installed and modified it for my shop, works all fine. except 1 little thing.

the top_rating.php module does not show any rated products at all. sometimes it shows up 1 product which has not yet been rated but it never shows my top 10?

 

could anyone please help out with this problem? i don't know what is wrong with the sql-query. tried several "solutions" but nothing worked for me :-(

 

I am having the same problem. I am using php 4.4 and mysql 5.0.

 

It has to do with the following lines not being compatible with mysql 5.0

 

$rating_query = tep_db_query("select p.products_id, pd.products_name, p.products_image, p.products_model, p.products_tax_class_id, p.products_price, s.specials_new_products_price, r.* from " . TABLE_PRODUCTS . " p inner join " . TABLE_SPECIALS . " s on p.products_id = s.products_id right join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id inner join rating r on p.products_id = r.id where p.products_status = '1' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' ORDER BY average DESC LIMIT 0, 10");

 

$rating_query = tep_db_query("select p.products_id, p.products_image, p.products_model, p.products_tax_class_id, p.products_price, s.specials_new_products_price, r.* from " . TABLE_PRODUCTS . " p inner join " . TABLE_SPECIALS . " s on p.products_id = s.products_id right join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c on p.products_id = p2c.products_id join rating r on p.products_id = r.id, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and c.parent_id = '" . (int)$new_products_category_id . "' ORDER BY average DESC LIMIT 0, 10");

 

I believe the new mysql syntax requires parenthesis to handle the joins correctly, but where they go, I do not know.

 

If someone could post fixes for those 2 lines, it would be greatly appreciated.

 

Thanks

Link to comment
Share on other sites

  • 1 year later...

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...