Results 1 to 10 of 14

Hybrid View

  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,444
    Plugin Contributions
    279

    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,444
    Plugin Contributions
    279

    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,444
    Plugin Contributions
    279

    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.

 

 

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

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