PDA

View Full Version : QTpro for osc 2.3



michael_s
05-25-2016, 03:56 PM
There is an error/missing quotes in admin/includes/functions/qtpro_functions.php file that causes an error type when you try to delete a category (and maybe a product) from categories menu (categories.php?action=delete_category_confirm&cPath=) :

1064 - Erreur de syntaxe près de '' à la ligne 1

DELETE FROM products_stock WHERE products_id =

[TEP STOP]

To fix it, edit the "qtpro_functions.php" file, go to line 286 and found :

//This function will delete all option stock entries from the product.
function qtpro_doctor_amputate_all_from_product($products_i d){
tep_db_query("DELETE FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id =". $products_id);

and replace by :

//This function will delete all option stock entries from the product.
function qtpro_doctor_amputate_all_from_product($products_i d){
tep_db_query("DELETE FROM " . TABLE_PRODUCTS_STOCK . " WHERE products_id = '" . $products_id . "'");
}

That's all !

Note: The qtpro_functions.php file "quote fixed" is available in download (1 file).

More... (http://addons.oscommerce.com/info/7786)