armed-smoking
 
Exclusive eBooks, Software Solutions, Quality Guaranteed
 
Web NukeBiz
Welcome to NukeBiz · Members
Amazon
show cart or checkout0 items
Cart Value: 0.00

Forums » DragonflyCMS Projects » Storez » [fixed] DB Error with MySQL in STRICT_TRANS_TABLES Mode
[fixed] DB Error with MySQL in STRICT_TRANS_TABLES Mode
A comprehensive shopping cart solution.
Topic initiation via Bugger.

Post new topic    Reply to topic    Printer Friendly Page     Forum Index »  eCommerce » Storez

View previous topic :: View next topic  
Author Message
layingback
Nice Poster
Nice Poster

Offline Offline
Joined: Feb 26, 2007
Posts: 65

PostPosted: Tue Nov 17, 2009 9:58 pm
Post subject: [fixed] DB Error with MySQL in STRICT_TRANS_TABLES Mode

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.

_________________
Pro_News fully templated multi-purpose article/news module for Dragonflycms

layingback's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.8/5.0.92/5.2.17/9.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Chairman
Chairman

Offline Offline
Joined: Mar 18, 2004
Posts: 1457
Location: Netizen
PostPosted: Fri Nov 20, 2009 1:38 pm
Post subject: Re: DB Error with MySQL in STRICT_TRANS_TABLES Mode

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.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website ICQ Number Yahoo Messenger Photo Gallery
Display posts from previous:   
Post new topic    Reply to topic    Printer Friendly Page    Forum Index »  eCommerce » Storez
Page 1 of 1
All times are GMT + 9.5 Hours



Jump to:  


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum