View Single Post
  #5  
Old 09-03-2008, 07:31 AM
 
robertswww robertswww is offline
 

X-Adept
  
Join Date: Jul 2003
Posts: 586
 

Default Re: free <PREV | NEXT> mod help

Quote:
Originally Posted by konadnailart
I found this mod in http://www.xcartmod.com/cart/product/previous-next-products.html but can't get it to work. Can anyone please help. Thank you.
Ahhh... I think I discovered your problem with getting this to work. It was working fine for me on X-Cart version 4.1.10 but I was on mySQL 4 at the time. When I recently upgraded to mySQL 5, this was the only mod I had that broke.

If you do not have products assigned to different memberships, then you can remove that part from the SQL Query.

To get this mod to work with X-Cart 4.1.x on mySQL 5, I made the following change:

File: product.php (root-level)

Change the SQL Query to read:
Code:
$mem_list = func_query("SELECT pr.productid, pr.product FROM $sql_tbl[products] AS pr LEFT JOIN $sql_tbl[products_categories] AS cat ON cat.productid = pr.productid WHERE cat.categoryid = '$product_info[categoryid]' AND pr.productid = cat.productid AND pr.forsale='Y' ORDER BY pr.product");

That's it... working fine on my live site now.

Robert
__________________
X-cart 4.1.10
Reply With Quote