Results 1 to 8 of 8

Hybrid View

  1. #1
    Join Date
    Sep 2008
    Posts
    54
    Plugin Contributions
    0

    Default PHP Fatal error: 1366:Incorrect decimal value after upgrade to 1.5.6

    Hi guys,

    Iīm stuck here...

    after upgrade to 1.5.6a (from 1.5.4) I have noticed a problem which I cannot solve.

    When trying to update a product or add one, I recieve this message:

    WARNING: An Error occurred, please refresh the page and try again.If you were entering information, press the BACK button in your browser and re-check the information you had entered to be sure you left no blank fields.

    after looking to my logs, it seems that there is some problem with products_price in database and incorrect decimal value:

    [21-Dec-2019 21:11:05 UTC] Request URI: /admin/product.php?cPath=62&pID=1198&action=update_product, IP address: xxx
    #1 trigger_error() called at [/home/xxx/public_html/includes/classes/db/mysql/query_factory.php:171]
    #2 queryFactory->show_error() called at [/home/xxxx/public_html/includes/classes/db/mysql/query_factory.php:143]
    #3 queryFactory->set_error() called at [/home/xxxx/public_html/includes/classes/db/mysql/query_factory.php:270]
    #4 queryFactory->Execute() called at [/home/xxxx/public_html/admin/includes/functions/database.php:51]
    #5 zen_db_perform() called at [/home/xxxx/public_html/admin/includes/modules/update_product.php:83]
    #6 require(/home/xxxx/public_html/admin/includes/modules/update_product.php) called at [/home/xxxx/public_html/admin/product.php:34]
    --> PHP Fatal error: 1366:Incorrect decimal value: '53,9167' for column 'products_price' at row 1 :: update products set products_quantity = '12', products_type = '1', products_model = 'code', products_price = '53,9167', products_date_available = null, products_weight = '0', products_status = '1', products_virtual = '0', products_tax_class_id = '1', manufacturers_id = '0', products_quantity_order_min = '1', products_quantity_order_units = '1', products_priced_by_attribute = '0', product_is_free = '0', product_is_call = '0', products_quantity_mixed = '1', product_is_always_free_shipping = '0', products_qty_box_status = '1', products_quantity_order_max = '0', products_sort_order = '0', products_discount_type = '0', products_discount_type_from = '0', products_price_sorter = '53,9167', products_image = 'image.jpg', products_last_modified = now(), master_categories_id = '62' where products_id = 1198 ==> (as called by) /home/xxxx/public_html/admin/includes/functions/database.php on line 51 <== in /home/xxxx/public_html/includes/classes/db/mysql/query_factory.php on line 171.

    my other eshops based on 1.5.4 are fully functional on the same server,

    I use PHP 7.2.25 and MySQL 5.6.45

    Any idea, please, what went wrong here? I recieve this message on both e-shops I have upgraded to 1.5.6a (actually, one of them is already on 1.5.6c - I didnīt realized this problem before another upgrade)

  2. #2
    Join Date
    Jul 2012
    Posts
    15,028
    Plugin Contributions
    17

    Default Re: PHP Fatal error: 1366:Incorrect decimal value after upgrade to 1.5.6

    The numbers need to have/use a dot for the decimal when storing such a number. Perhaps the previous store(s) were modified to do this or handle it differently, but a decimal number should not include a thousands separator and should be stored with a period for the decimal such that the product's price should be entered as '53.9167' instead of '53,9167'.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  3. #3
    Join Date
    Sep 2008
    Posts
    54
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1366:Incorrect decimal value after upgrade to 1.5.6

    Thanks for trying to help, mc12345678,

    problem is these prices are stored in db with a dot and I see them in the admin with a dot...

    I can update a product directly through db without problems,

    stores didnīt have this problem before the upgrade - I updated products regularly...

    Could you please point me where should I look?
    Last edited by Doomm; 22 Dec 2019 at 08:46 AM.

  4. #4
    Join Date
    Sep 2008
    Posts
    54
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1366:Incorrect decimal value after upgrade to 1.5.6

    Update - now I found that problem is somehow related to languages - everything works fine in english, problem is when I change the languate to another one (slovak in my case). Will work on that and try what I did wrong :-)

  5. #5
    Join Date
    Jul 2012
    Posts
    15,028
    Plugin Contributions
    17

    Default Re: PHP Fatal error: 1366:Incorrect decimal value after upgrade to 1.5.6

    I am thinking that perhaps there is javascript associated with the page changes that may/may not have been involved with this. I'm not entirely sure how the selection of the current currency is incorporated into the step through process of storing a product but it seems to me that it only occurs in one place to display the value not to store it.

    Perhaps could also explain how the site was upgraded? There were some significant changes that could possibly explain a discrepancy occurring.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...
    Upgraded to Zen Cart V1.5.3 from V1.5.1 from V1.5.0 from V1.3.9h

  6. #6
    Join Date
    Sep 2008
    Posts
    54
    Plugin Contributions
    0

    Default Re: PHP Fatal error: 1366:Incorrect decimal value after upgrade to 1.5.6

    Itīs true that sites were not updated exactly by the book - I just uploaded all new files, updated db through zc_install and one by one updated all plugins (there are only a few ones),

    whatīs confusing for me is that I donīt have this problem when I switch the site to english - Iīll investigate this further and will post if Iīll find the answer.

 

 

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. Replies: 2
    Last Post: 22 Jun 2013, 03:48 AM
  3. Replies: 4
    Last Post: 14 Jan 2009, 11:45 AM
  4. 1366 Incorrect string value: 'zone_name'
    By technologist in forum Installing on a Windows Server
    Replies: 2
    Last Post: 9 Jul 2008, 04:17 PM
  5. VAT error message (1366 Incorrect decimal value)
    By Typhoon in forum Currencies & Sales Taxes, VAT, GST, etc.
    Replies: 5
    Last Post: 18 Jul 2006, 11:32 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