Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14
  1. #11
    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'?

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

  3. #13
    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?

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

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

    .

    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.

 

 
Page 2 of 2 FirstFirst 12

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