DragonflyCMS Projects > Storez > [fixed] DB Error with MySQL in STRICT_TRANS_TABLES Mode > Community Forums > Phoenix Netology
Forum Index > eCommerce > Storez

[fixed] DB Error with MySQL in STRICT_TRANS_TABLES Mode Reply to topic


Running test environment in STRICT_TRANS_TABLES 'cos otherwise I release Pro_News with 0/null errors and get bug reports! Wink

When I tried Checkout I got:

CMS Warning line 75: On /markb/Storez/checkout/op=preCheckout.html While executing query "INSERT INTO cms_cart_preorders (userID, userType, step, orderInstant, orderFree, shipFirstName, shipLastName, shipAddress1, shipAddress2, shipCity, shipState, shipZip, shipCountry, shipMethod, shipMethodName, shipMethodData, billEmail, billFirstName, billLastName, billAddress1, billAddress2, billCity, billState, billZip, billCountry, billDayPhone, billEvePhone, payMethod, payMethodName, payMethodData, productTotal, shipTotal, handlingTotal, taxTotal, expires, billOrganization, billJobTitle, billHowHear) VALUES ('2', 'user', '0', '', '', '', '', '', '', '', '', '', '', '1', 'Base Cost', '', '', '', '', '', '', '', '', '', '', '', '', '10', 'PayPal', '', '0', '0', '0', '0', '1258463993', '', '', '')" the following error occured: Incorrect integer value: '' for column 'orderInstant' at row 1 In: /public_html_bs/modules/Storez/includes/class.checkout.php on line: 129

Got more, so set line 129 to:
('$usercartinfo[user_id]', '".Fix_Quotes($usercartinfo['type'])."', '0', '0', '0', '', '', '', '', '', '0', '0', '0', '".intval($shipping_id)."', '".Fix_Quotes($shipping_label)."', '', '', '', '', '', '', '', '0', '', '0', '', '', '".intval($payment_id)."', '".Fix_Quotes($payment_label)."', '', '0', '0', '0', '0', '$expiry', '', '', '')");


and line 405 to: '0',

and line 443 to: '$date',

and as I couldn't find definition of $prodfree set $prodFree to 0 on line 490
and also forced $qtyremain to int on 490: ('$orderID', '$usercartinfo[user_id]', '$usercartinfo[type]', '$iid', '$pid', '".Fix_Quotes($prodCode)."', '".Fix_Quotes($prodName)."', '".Fix_Quotes($prodBrand)."', '".Fix_Quotes($prodModel)."', '$prodInstant', '0', '0', '$itemCost', '$itemWeight', '$qty', '".intval($qtyremain)."', '$prodGroup', '$prodDuration')");


Note: I only tried checkout Smile

Initiated by Bugger (Original Entry) - Comments Here Please.

Please enter your server specs in your user profile! 😢


Thanks - already nailed those when I fixed a missing field in that first query. Handled differently - I prefer using DEFAULT. prodFree was another missing field and $qtyremain was due to the variable not being defined, since fixed.

Also plenty of others in other areas (like adding new products).

There were so many changes in Storez that I had to resort to my local for testing, rather than my usual live site testing - since I run strict trans there, all sorts of stuff pops up.

Server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS):

All times are Australia/Adelaide


Jump to: