View Single Post
  #50  
Old 02-17-2014, 08:53 PM
 
elmirage001 elmirage001 is offline
 

X-Wizard
  
Join Date: Apr 2007
Posts: 1,966
 

Default Re: X-Cart 4.6.1 released

When module "Product Options" is turned off and I try to delete a product the product deletes and then I go to a blank screen and the following error
Quote:
PHP Fatal error: Class 'XCVariantsSQL' not found in /home/xxxxxxxx/public_html/include/func/func.product.php on line 869
Line 869 in Red
Code:
// Product options module if (func_is_defined_module_sql_tbl('Product_Options', 'class_options')) { $classes = func_query_column("SELECT classid FROM $sql_tbl[classes] WHERE productid='$productid'"); db_query("DELETE FROM $sql_tbl[classes] WHERE productid='$productid'"); if (!empty($classes)) { $options = func_query_column("SELECT optionid FROM $sql_tbl[class_options] WHERE classid IN ('".implode("','", $classes)."')"); db_query("DELETE FROM $sql_tbl[class_lng] WHERE classid IN ('".implode("','", $classes)."')"); if (!empty($options)) { db_query("DELETE FROM $sql_tbl[class_options] WHERE classid IN ('".implode("','", $classes)."')"); db_query("DELETE FROM $sql_tbl[product_options_lng] WHERE optionid IN ('".implode("','", $options)."')"); db_query("DELETE FROM $sql_tbl[product_options_ex] WHERE optionid IN ('".implode("','", $options)."')"); db_query("DELETE FROM $sql_tbl[variant_items] WHERE optionid IN ('".implode("','", $options)."')"); db_query("DELETE FROM $sql_tbl[variant_backups] WHERE optionid IN ('".implode("','", $options)."')"); } } db_query("DELETE FROM $sql_tbl[product_options_js] WHERE productid='$productid'"); $vids = db_query("SELECT variantid FROM $sql_tbl[variants] WHERE productid='$productid' AND " . XCVariantsSQL::isVariantRow($productid)); if ($vids) { while ($row = db_fetch_array($vids)) { func_delete_image($row['variantid'], "W"); } db_free_result($vids); } db_query("DELETE FROM $sql_tbl[variants] WHERE productid='$productid'"); }
If I turn "Product Options" back on and I delete a product everything works fine.

I don't know if this happens on a stock 4.6.1 or not as I upgraded my database from 4.4.5 to 4.6.1

I reported on bug tracker but maybe someone else would like to test also. Thanks!

Paul
__________________
WooCommerce as of 10/2022
Reply With Quote