Page 1 of 2 12 LastLast
Results 1 to 10 of 14
  1. #1
    Join Date
    Jun 2007
    Posts
    5
    Plugin Contributions
    0

    Default [Done v1.3.7.1]Checking out virtual products leads to SQL error (MySQL 5)

    Version 1.3.7
    MySQL 5.0.10-community-nt via TCP/IP

    First Reported in thread:
    http://www.zen-cart.com/forum/showthread.php?t=63993

    When trying to checkout an order with all virtual products, I got a few errors. The first ones were described and fixed using the modifications in the thread above.

    Afterwards, I got this error:

    -------------------------
    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')]
    -------------------------

    As summarized in the thread above, it looks like the 'shipping_cost' (and possibly other settings) is never set for shipping values of the 'free_free' type.

    Adding the line below in red to the /includes/modules/order_total/ot_shipping.php file seems to fix it.

    Code:
            if ($_SESSION['shipping'] == 'free_free')
            {
                $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
    Added:                  $order->info['shipping_cost'] = 0;
    
    Is this valid or is there more to add?

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Checking out virtual products leads to SQL error (MySQL 5)

    Have you loaded the Cart with the Demo product set?

    Try it as there are virtual products there and you can view the admin settings for these
    Zen-Venom Get Bitten

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

    Default Re: Checking out virtual products leads to SQL error (MySQL 5)

    Same problem.

    I just did a fresh install (in a separate directory and Sql server), and installed the demo product set.

    I tried to purchase a $5 gift certificate - a virtual product.

    Ran into the same problems as before. Had to follow the first instructions (add the '(int)' in front of the format id values), and then witnessed this same error:

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

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Checking out virtual products leads to SQL error (MySQL 5)

    Did you read th post by DrByte?
    Quote Originally Posted by DrByte
    '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?
    'f' seems to be the issue....
    Zen-Venom Get Bitten

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

    Default Re: Checking out virtual products leads to SQL error (MySQL 5)

    I agree that the 'f' is the issue.. but I was trying to figure out where the 'f' came from.

    It seems to come from the 'free_free' shipping that was automatically set in the script. I don't think that everything that needs to be set is actually set.

  6. #6
    Join Date
    Oct 2007
    Posts
    12
    Plugin Contributions
    0

    Idea or Suggestion Re: Checking out virtual products leads to SQL error (MySQL 5)

    Adding the line below in red to the /includes/modules/order_total/ot_shipping.php file seems to fix it.

    Code:
            if ($_SESSION['shipping'] == 'free_free') {
                $order->info['shipping_method'] = FREE_SHIPPING_TITLE;
    Added:                  $order->info['shipping_cost'] = 0;
    
             }
    Yes, I added the same extra line and it fixed the problem. I cant see any side affects anywhere so it seems to solve the problem.

    (I just added the closing bracket to your code to make it clearer to others)

    Thanks for posting your solution.

    Murray

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Checking out virtual products leads to SQL error (MySQL 5)

    Just for giggles and grins, what happens if you install a test copy into a test database with the demo products of the current version of Zen Cart v1.3.7.1 ...
    http://www.zen-cart.com/forum/showthread.php?t=69769
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  8. #8
    Join Date
    Jun 2007
    Location
    Australia - Melbourne
    Posts
    310
    Plugin Contributions
    6

    Default Re: Checking out virtual products leads to SQL error (MySQL 5)

    Great post, thanks everybody, had the same problem but now fixed.

    However now the new orders made are not shown in user account and admin. I've checked the database and the orders are there. Think I'll do some search on the forum for this problem.
    The greatest pleasure in life is doing what people say you cannot do.

    Check on www.WebExtremeCustomiser.com for my modules (free contribution):
    AJAX Image Swapper
    AJAX Banner Swapper
    Fixed Navigation

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Checking out virtual products leads to SQL error (MySQL 5)

    If you do a Search on orders_id do they show?

    If so, check the Modules ... Order Total ... and make sure Total ot_total is installed and enabled ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  10. #10
    Join Date
    Jun 2007
    Location
    Australia - Melbourne
    Posts
    310
    Plugin Contributions
    6

    Default Re: Checking out virtual products leads to SQL error (MySQL 5)

    Yes they show and yes ot_total has been enabled...

    Ah but the problem has been fixed in zen-cart 1.3.7.1

    thanks ;)
    The greatest pleasure in life is doing what people say you cannot do.

    Check on www.WebExtremeCustomiser.com for my modules (free contribution):
    AJAX Image Swapper
    AJAX Banner Swapper
    Fixed Navigation

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v138a error checking out
    By spikesta in forum General Questions
    Replies: 5
    Last Post: 28 Nov 2012, 05:09 PM
  2. Replies: 7
    Last Post: 19 Apr 2010, 06:31 AM
  3. [Done v1.3.9a] New Products... results in SQL Error
    By llemberg in forum Bug Reports
    Replies: 6
    Last Post: 5 Dec 2009, 05:43 PM
  4. [DONE] Error Checking Out
    By gigi in forum Bug Reports
    Replies: 2
    Last Post: 24 Jun 2006, 04:35 PM

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