X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   News and Announcements (https://forum.x-cart.com/forumdisplay.php?f=28)
-   -   X-Cart 4.6.1 released (https://forum.x-cart.com/showthread.php?t=67738)

aim 02-17-2014 09:18 PM

Re: X-Cart 4.6.1 released
 
1 Attachment(s)
Quote:

Originally Posted by elmirage001
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
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


The fix_fatal_error_on_product_delete.diff patch has been attached

elmirage001 02-17-2014 09:44 PM

Re: X-Cart 4.6.1 released
 
Wow was that quick! I was just about to post your fix but you beat me to it Thank you so much! Paul

designguru 02-17-2014 11:59 PM

Re: X-Cart 4.6.1 released
 
If we setup a fresh install of 4.6.1. How can we bring all the mods and customization to this version?

Of course the mods can be re-installed and hopefully will use the data from the database but what happens to all the customizations?


All times are GMT -8. The time now is 04:25 AM.

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