Huhm, it might be a mysql compatibility issue. What is your mysql version?
About IE6 error, I'm looking into it right now.
Printable View
Huhm, it might be a mysql compatibility issue. What is your mysql version?
About IE6 error, I'm looking into it right now.
Hello,
here is what I use:
PHP: 4.4.7 (Zend: 1.3.0)
MySQL 4.1.22-standard
Linux 2.6.9-55.0.2.EL
HTTP Server: Apache/1.3.37 (Unix) prxp_module/1.11.3 mod_auth_passthrough/1.8 mod_log_bytes/1.2 mod_bwlimited/1.4 PHP/4.4.7 FrontPage/5.0.2.2635.SR1.2 mod_ssl/2.8.28 OpenSSL/0.9.7a
hope it helps, because your contribution will help us.
Thanks
Michael
Try to see if it works:
1. Open admin/xsell_advanced.php
Replace:
By:PHP Code:
if (XSELL_FORM_INPUT_TYPE == "model")
$cross_product = $db->Execute("SELECT products_id FROM " . TABLE_PRODUCTS . " WHERE products_model = '$products_id' UNION (SELECT products_id FROM ". TABLE_PRODUCTS . " WHERE products_model = '$pid')");
else
$cross_product = $db->Execute("SELECT products_id FROM " . TABLE_PRODUCTS . " WHERE products_id = $products_id LIMIT 1 UNION (SELECT products_id FROM ". TABLE_PRODUCTS . " WHERE products_id = $pid LIMIT 1)");
PHP Code:
if (XSELL_FORM_INPUT_TYPE == "model")
$cross_product = $db->Execute("SELECT products_id FROM " . TABLE_PRODUCTS . " WHERE products_model IN ('$products_id', '$pid') ORDER BY FIELD (products_model, '$products_id', '$pid')");
else
$cross_product = $db->Execute("SELECT products_id FROM " . TABLE_PRODUCTS . " WHERE products_id IN ($products_id, $pid) ORDER BY FIELD (products_id, '$products_id', '$pid')");
As for the javascript error, I'm no js expert so it'll take me some time to see why it doesnt work with IE at all.
Thank you for your help, but now the rsult is as follows:
1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(products_model, '5060057722374', '5060057721971')' at line 1
in:
[SELECT products_id FROM products WHERE products_model IN ('5060057722374', '5060057721971') ORDER BY FIELD (products_model, '5060057722374', '5060057721971')]
If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.
I will need to somehow get mysql 4.1 installed so I can check why this happens.
We of course can get around this easily by query 1 product at a time only, but that is my last choice. Please be patient with me.
BTW, you should consider moving to a newer version of mysql soon, for the sake of performance and compatibility.
ZC will move to PHP5 in the next version, and PHP5 often goes with mysql5.
http://www.zen-cart.com/forum/showth...168#post417168
Concerning the js bug, I think I found out the error. Now I need to somehow get it works ^^.
Try:
(Removed space after IN and FIELD)Code:if (XSELL_FORM_INPUT_TYPE == "model")
$cross_product = $db->Execute("SELECT products_id FROM " . TABLE_PRODUCTS . " WHERE products_model IN('$products_id', '$pid') ORDER BY FIELD(products_model, '$products_id', '$pid')");
else
$cross_product = $db->Execute("SELECT products_id FROM " . TABLE_PRODUCTS . " WHERE products_id IN($products_id, $pid) ORDER BY FIELD(products_id, '$products_id', '$pid')");
I have the javascipt bug fixed. Let me know if the new sql works for you so I can update the mod to fix these 2 issues.
(If you cant wait, the version with js bug fix is available on svn)
Alpha 1 rev 34 uploaded.
Changes:
This update addresses the javascript bug in the IE browser.
Moved some functions around to tidy up the codes.
Note:
There was a report that this mod does not work well in MySql 4.1. Let me know if you have the same problem with this version
Hello there,
I was wondering, while I was using the cross sell mods, is it at all possible to cross sell by category id? All the cross sells I have setup cross sell items from the same category. Like once you have a category full of items, they inter cross sell each other. Just a crazy idea! lol :smile:
Regards,
Heathenmagic