X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Third Party Add-Ons for X-Cart 4 (https://forum.x-cart.com/forumdisplay.php?f=45)
-   -   free <PREV | NEXT> mod help (https://forum.x-cart.com/showthread.php?t=39654)

konadnailart 05-08-2008 09:46 PM

free <PREV | NEXT> mod help
 
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.

balinor 05-09-2008 04:12 AM

Re: free <PREV | NEXT> mod help
 
Moving to Third Party Add-Ons

Lingerieblowout 07-27-2008 08:00 AM

Re: free <PREV | NEXT> mod help
 
Take a look at this one

http://www.xcartmods.net/next-previous-product.html

robertswww 07-27-2008 12:03 PM

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.

Hi,

I just tested that Previous/Next freebie Mod on my site and it worked perfectly.

I'm running X-Cart 4.1.10, so it should work fine on your 4.1.9 site as well.

Here's some things to double-check:

1. There are 3 files this MOD deals with...
1a) product.php (at the root-level) is modified by adding a block of code near the end
1b) skin1/customer/main/product.tpl is modified by adding an include at the top of the file
1c) skin1/customer/next_prev.tpl (new file) is added

2. You can change the install file to install.txt to open it in a text editor. Notice that it has 3 steps. Follow them exactly and it should work fine.

The Previous and Next products will then be listed near the top of each Detailed Product Page.

If you get any error, please let us know what it is(?)

Robert

robertswww 09-03-2008 07:31 AM

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

tam10 09-17-2008 12:27 PM

Re: free <PREV | NEXT> mod help
 
Hi

What should i put in the
skin1/customer/next_prev.tpl (new file)

Thanks

jones 09-17-2008 12:38 PM

Re: free <PREV | NEXT> mod help
 
Hello,

Just upload next_prev.tpl to skin1/customer/ folder without changes.

Alex

tam10 09-17-2008 12:40 PM

Re: free <PREV | NEXT> mod help
 
Thanks.

I did.

I get this error.

INVALID SQL: 1054 : Unknown column 'pr.productid' in 'on clause'
SQL QUERY FAILURE:SELECT pr.productid, pr.product, mem.membershipid FROM xcart_products AS pr, xcart_products_categories AS cat LEFT JOIN xcart_product_memberships AS mem ON mem.productid = pr.productid WHERE cat.categoryid = '263' AND pr.productid = cat.productid AND pr.forsale='Y' ORDER BY pr.product

Any idea?

jones 09-17-2008 12:45 PM

Re: free <PREV | NEXT> mod help
 
I suppose you use MySQL 5. You need to change this text in product.php:

$mem_list = func_query("SELECT pr.productid, pr.product, mem.membershipid FROM $sql_tbl[products] AS pr, $sql_tbl[products_categories] AS cat LEFT JOIN $sql_tbl[product_memberships] AS mem ON mem.productid = pr.productid WHERE cat.categoryid = '$product_info[categoryid]' AND pr.productid = cat.productid AND pr.forsale='Y' ORDER BY pr.product");

to this text:

$mem_list = func_query("SELECT pr.productid, pr.product, mem.membershipid FROM $sql_tbl[products_categories] AS cat, $sql_tbl[products] AS pr LEFT JOIN $sql_tbl[product_memberships] AS mem ON mem.productid = pr.productid WHERE cat.categoryid = '$product_info[categoryid]' AND pr.productid = cat.productid AND pr.forsale='Y' ORDER BY pr.product");

tam10 09-17-2008 12:46 PM

Re: free <PREV | NEXT> mod help
 
OK

Did Change the SQL Query to read

No error now

but no next/prev either



All times are GMT -8. The time now is 12:28 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.