Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2008
    Posts
    11
    Plugin Contributions
    0

    Default [Done v1.3.9] 1366 Incorrect decimal value: 'f' for column 'value' at row 1

    1366 Incorrect decimal value: 'f' for column 'value' at row 1
    in:
    [INSERT INTO zen_orders_total (orders_id, title, text, value, class, sort_order) VALUES ('10', 'Free Shipping:', '£0.00', 'f', 'ot_shipping', '200')]

    I receive this error message when testing a downloadable product at step 2 of the checkout (check/money order) as far as I can see I have set all attributes correctly and the product is showing Product is virtual = no always free shipping=no

    Can any body help
    Please

    Thanks

    Nigel Carr

  2. #2
    Join Date
    Nov 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: 1366 Incorrect decimal value: 'f' for column 'value' at row 1

    Quote Originally Posted by Interskill View Post
    1366 Incorrect decimal value: 'f' for column 'value' at row 1
    in:
    [INSERT INTO zen_orders_total (orders_id, title, text, value, class, sort_order) VALUES ('10', 'Free Shipping:', '£0.00', 'f', 'ot_shipping', '200')]

    I receive this error message when testing a downloadable product at step 2 of the checkout (check/money order) as far as I can see I have set all attributes correctly and the product is showing Product is virtual = no always free shipping=no

    Can any body help
    Please

    Thanks

    Nigel Carr
    Looking through similar threads it appears that the problem may be MYsql running in Strict mode, unfortunaltely I am not able to change or alter the My.INI file as this is protected by our web hosts, can anybody help with a code re-write?
    Thanks

  3. #3
    Join Date
    Jun 2003
    Location
    Newcastle UK
    Posts
    2,896
    Blog Entries
    2
    Plugin Contributions
    2

    Default Re: 1366 Incorrect decimal value: 'f' for column 'value' at row 1

    Hi,

    It is indeed a mysql 5 strict mode bug, although why it uses a 'f' as the value I have no idea.


    I don't have a complete fix for this yet, but this workaround should help.

    You will need to edit

    includes/classes/order.php.

    the block of code you are looking for is circa line 623 and looks like this

    Code:
          $sql_data_array = array('orders_id' => $insert_id,
                                  'title' => $zf_ot_modules[$i]['title'],
                                  'text' => $zf_ot_modules[$i]['text'],
                                  'value' => $zf_ot_modules[$i]['value'],
                                  'class' => $zf_ot_modules[$i]['code'],
                                  'sort_order' => $zf_ot_modules[$i]['sort_order']);
    you should replace that with

    Code:
          $sql_data_array = array('orders_id' => $insert_id,
                                  'title' => $zf_ot_modules[$i]['title'],
                                  'text' => $zf_ot_modules[$i]['text'],
                                  'value' => (is_numeric($zf_ot_modules[$i]['value'])) ? $zf_ot_modules[$i]['value'] : '0',
                                  'class' => $zf_ot_modules[$i]['code'],
                                  'sort_order' => $zf_ot_modules[$i]['sort_order']);
    Make sure you back up the file first before editing, and test on a live server asap after editing.

  4. #4
    Join Date
    Nov 2008
    Posts
    11
    Plugin Contributions
    0

    Default Re: 1366 Incorrect decimal value: 'f' for column 'value' at row 1

    Brilliant!!!!

    It works - thank you very much..


    If I come across any bugs because of the change I will let you know, but for now all is testing out OK..

    Thanks Again

  5. #5
    Join Date
    Jan 2009
    Location
    Macclesfield, South Australia
    Posts
    102
    Plugin Contributions
    0

    Default Re: 1366 Incorrect decimal value: 'f' for column 'value' at row 1

    Yes .. this has fixed my problem...Thanks

 

 

Similar Threads

  1. Replies: 2
    Last Post: 22 Jun 2013, 03:48 AM
  2. Replies: 10
    Last Post: 29 Nov 2010, 06:31 AM
  3. 1366 Incorrect integer value Problems with MySQL 5 strict-mode
    By Max70 in forum Discounts/Coupons, Gift Certificates, Newsletters, Ads
    Replies: 13
    Last Post: 10 Dec 2009, 07:11 PM
  4. 1366 Incorrect string value: 'zone_name'
    By technologist in forum Installing on a Windows Server
    Replies: 2
    Last Post: 9 Jul 2008, 04:17 PM
  5. VAT error message (1366 Incorrect decimal value)
    By Typhoon in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 5
    Last Post: 18 Jul 2006, 11:32 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR