Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Apr 2007
    Location
    Jesolo, Venezia
    Posts
    13
    Plugin Contributions
    0

    Default 1366 Incorrect integer value Problems with MySQL 5 strict-mode

    Hi
    I use
    mysql 5.0.37
    zen cart 1.3.7.

    acquiring a gift certificate and confirming the order I have the following error

    1366 Incorrect integer value: '' for column 'delivery_address_format_id' at row 1
    in:
    [INSERT INTO orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, payment_module_code, shipping_method, shipping_module_code, coupon_code, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, order_total, order_tax, currency, currency_value, ip_address) VALUES ('4',.........

    someone can help me
    Thanks

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1366 Incorrect integer value

    The address-format-id should never be blank like that.

    1. What payment method was used to complete the purchase?
    2. How did the customer get into the cart? Did you use the normal create-account screen? Or did you use some third-party customer-import tool?
    3. How did you come up with the ship-to address?
    4. When you created the gift-certificate product, what settings did you select related to shipping? Was it set to "always free shipping"? Was it set to "virtual"? Was it set to require a shipping address?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Apr 2007
    Location
    Jesolo, Venezia
    Posts
    13
    Plugin Contributions
    0

    Default Re: 1366 Incorrect integer value

    Hi thanks for your reply

    1) The payment method is Check/Money Order or Credit card
    2) I use the normal create-account screen
    3) The customer get into the cart with the link in the right column.
    4) In the payment Information (Step 2 of 3) there's only billing address
    5) I select "Yes, Skip Shipping Address"
    6) I select No, Normal Shipping Rules

    I use the The store Demo (gift certificate in store demo)

    Thanks

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1366 Incorrect integer value

    That appears to be a bug that only shows up on MySQL 5 when running in strict mode.

    The workaround is to edit the /includes/classes/order.php file and change these lines:
    Code:
                                'format_id' => $customer_address->fields['address_format_id'],
    to:
    Code:
                                'format_id' => (int)$customer_address->fields['address_format_id'],
    and:
    Code:
                                'format_id' => $shipping_address->fields['address_format_id']);
    to:
    Code:
                                'format_id' => (int)$shipping_address->fields['address_format_id']);

    and:
    Code:
                               'format_id' => $billing_address->fields['address_format_id']);
    to:
    Code:
                               'format_id' => (int)$billing_address->fields['address_format_id']);
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  5. #5
    Join Date
    Apr 2007
    Location
    Jesolo, Venezia
    Posts
    13
    Plugin Contributions
    0

    Default Re: 1366 Incorrect integer value

    thanks

    now follow me this error

    1366 Incorrect decimal value: 'f' for column 'value' at row 1
    in:
    [INSERT INTO orders_total (orders_id, title, text, value, class, sort_order) VALUES ('1', 'Spedizione gratuita:', '0.00EUR', 'f', 'ot_shipping', '200')]

    did you now why?
    Thanks

    Sorry if my english is not good

  6. #6
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: 1366 Incorrect integer value

    'f' should never be in the "value" field, as the "value" field is supposed to contain a numeric value.

    Starting from installation, how exactly have you configured your shop?
    What modules have you installed?
    What addons have you installed?
    What currencies have you edited? What did you change in currency settings?
    What taxes have you added?
    Which languages have you installed?
    Do the errors stop if you switch back to English?
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  7. #7
    Join Date
    Apr 2007
    Location
    Jesolo, Venezia
    Posts
    13
    Plugin Contributions
    0

    Default Re: 1366 Incorrect integer value

    I have just installed the zen cart in English
    The curriences is Euro and i have don't change the settings
    Modules and addons only the pre installed
    I don't added taxes
    the languages is only english

  8. #8
    Join Date
    Apr 2007
    Location
    Jesolo, Venezia
    Posts
    13
    Plugin Contributions
    0

    Default Re: 1366 Incorrect integer value

    I comment out the following in the my.ini file(Mysql)

    Code:
    #sql-mode="STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

    like this post http://www.zen-cart.com/forum/showth...+decimal+value

    now is all right

    You think is the right solutions?
    Thanks

  9. #9
    Join Date
    Apr 2007
    Location
    Jesolo, Venezia
    Posts
    13
    Plugin Contributions
    0

    Default Re: 1366 Incorrect integer value

    Thank you DrByte for help me

    now the Gift Certificate is ok.

    Max

  10. #10
    Join Date
    Jun 2007
    Posts
    5
    Plugin Contributions
    0

    Default Re: 1366 Incorrect integer value

    Quote Originally Posted by DrByte View Post
    'f' should never be in the "value" field, as the "value" field is supposed to contain a numeric value.
    I have had the same errors as Max70 did, but using the English language. The code changes (adding (int) to the statements) helped above. I now get this, same as he did:

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

    This was when test ordering a product that had:

    ------------------------
    Product is Virtual: Yes, Skip Shipping Address
    Warning: This product is marked - Free Shipping and Skips Shipping Address
    No shipping will be requested when all products in the order are Virtual Products
    ------------------------

    and

    ------------------------
    Always Free Shipping:
    No, Normal Shipping Rules
    ------------------------
    (reason for this is because I didn't want the "FREE SHIPPING" icon shown, since there was no product to ship)


    My shipping modules:

    FREE SHIPPING
    Enable Free Shipping
    True

    Free Shipping Cost
    0.00

    Handling Fee
    0

    Tax Class
    --none--

    Shipping Zone
    --none--

    Sort Order
    0


    I'll try to figure out where the 'f' comes from.

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v154 Issue with Authorize.net AIM updating table - error 1366 incorrect integer value
    By inklingsolutions in forum Built-in Shipping and Payment Modules
    Replies: 48
    Last Post: 29 Dec 2016, 09:09 PM
  2. v154 Authorize.net SIM Incompatible with Mysql Strict Mode
    By PaulRRogers in forum Bug Reports
    Replies: 4
    Last Post: 5 Mar 2015, 08:04 PM
  3. Replies: 2
    Last Post: 22 Jun 2013, 03:48 AM
  4. Replies: 4
    Last Post: 14 Jan 2009, 11:45 AM
  5. Mysql 5 strict mode no null value for manufacturer id
    By jiffy in forum General Questions
    Replies: 5
    Last Post: 2 Feb 2008, 12:06 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