Results 1 to 10 of 14

Hybrid View

  1. #1
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    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.

  2. #2
    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

  3. #3
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    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.

  4. #4
    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

  5. #5
    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

  6. #6
    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

  7. #7
    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.

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

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

    It seems that the problem can be summarized as follows:

    Have one virtual product in your cart. Hit the Checkout button. The flow should skip past the "Checkout - Step 1" step and go automatically to "Payment Method - Step 2". The shipping text at the bottom should show "Free Shipping".

    Here's what looks like happens.

    When hitting the checkout button, the flow goes into the "Checkout - Step 1" stage. In here, there is logic that says:

    /includes/modules/pages/checkout_shipping/header_php.php
    Code:
    // if the order contains only virtual products, forward the customer to the billing page as
    // a shipping address is not needed
      if ($order->content_type == 'virtual') {
        $_SESSION['shipping'] = 'free_free';
        $_SESSION['shipping']['title'] = 'free_free';
        $_SESSION['sendto'] = false;
    and then redirects to the next stage in the flow. Eventually it gets to a /includes/modules/order_total/ot_shipping.php file

    Code:
        function process() {
          ... (snip) ...
          $module = substr($_SESSION['shipping']['id'], 0, strpos($_SESSION['shipping']['id'], '_'));
    $_SESSION['shipping'] has a value of 'free_free' from above, but $_SESSION['shipping']['id'] only has a value of 'f'.

    in the same function:
    Code:
          ... (snip) ...
            if ($_SESSION['shipping'] == 'free_free')
            {
                $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
            }
    I may be missing something, but for this 'free_free' type, it never sets the "shipping_cost"... and how it gets a shipping cost of 'f' I haven't found yet.

    Can anyone give a solution to the issue? Adding $order->info['shipping_cost'] = 0; to that last code snippet seems to work, but I want to know if there are other side-effects that it would cause? Right place for the 'patch'?

  9. #9
    Join Date
    Oct 2009
    Posts
    1
    Plugin Contributions
    0

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

    Was this ever fixed? I have a vanilla installation of v1.3.8a with the demo data and when I add "New v1.2/downloads/Single Download" to the cart and click "confirm the order" on checkout step 3, I get the same error as others:

    ==================================
    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 ('6', 'Free Shipping:', '$0.00', 'f', 'ot_shipping', '200')]
    ==================================

    Thanks

    edit: It happens on both download products.

  10. #10
    Join Date
    Oct 2006
    Posts
    1
    Plugin Contributions
    0

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

    Turning off strict mode fixed the problem. However I have several live orders that never made it past this error. Help! I am using paypal payment pro. From looking at this issue, it doesn't seem to matter which payment method is used, all of them give this error. How to I fix these orders so they show up?

 

 

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