Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 27
  1. #11
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Problem of checking out the cart; PHP error: 1264: Out of range value for column

    Quote Originally Posted by jfigure.com View Post
    Thank you for your modification for includes/modules/payment/paypalwpp.php regarding the table, "exchange_rate". ...
    No problem. You can change your database (make a backup first!) to change the number of characters allowed in the paypal::payment_type field by copying and pasting the following SQL query into your store's admin's Tools->Install SQL Patches:
    Code:
    ALTER TABLE paypal MODIFY payment_type varchar(64) NOT NULL default '';
    That will extend the length of that field from a maximum of 40 characters to a maximum of 64, so that your store can continue to take orders. Note that the "official" Zen Cart change might be different!

  2. #12
    Join Date
    May 2013
    Location
    Tokyo, Japan
    Posts
    18
    Plugin Contributions
    0

    Default Re: Problem of checking out the cart; PHP error: 1264: Out of range value for column

    Dear lat9,

    Thank you for remedies.

    I ran the SQL patches and confirmed that the length of the field, "payment_type" has been extended to 64. (screenshot attached)
    However, I see the field, "exchange_rate" remain decimal(4,2) despite the change of the paypalwpp.php. Do I have to care for it or don't have to because the value is set "float" anyway?

    One more question. Do I have to delete from configure.php files the following lines which @swguy suggested after implementing two changes you suggested or leave as they are?

    define('DB_MYSQL_MODE', 'NO_ENGINE_SUBSTITUTION');

    Name:  スクリーンショット 2019-05-01 6.13.32.jpg
Views: 136
Size:  92.8 KB

  3. #13
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,622
    Plugin Contributions
    123

    Default Re: Problem of checking out the cart; PHP error: 1264: Out of range value for column

    Remember that there's logic in tableCheckup() that resets the length of the field payment_type - you will need to remove that.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  4. #14
    Join Date
    May 2013
    Location
    Tokyo, Japan
    Posts
    18
    Plugin Contributions
    0

    Default Re: Problem of checking out the cart; PHP error: 1264: Out of range value for column

    Sorry to keep bothering you, guys, but I still have an error for 'exchange_rate".

    [01-May-2019 19:52:48 Asia/Tokyo] Request URI: /index.php?main_page=checkout_process, IP address: ##########
    #1 trigger_error() called at [/home/##########/jfigure-com/public_html/includes/classes/db/mysql/query_factory.php:171]
    #2 queryFactory->show_error() called at [/home/##########/jfigure-com/public_html/includes/classes/db/mysql/query_factory.php:143]
    #3 queryFactory->set_error() called at [/home/##########/jfigure-com/public_html/includes/classes/db/mysql/query_factory.php:270]
    #4 queryFactory->Execute() called at [/home/##########/jfigure-com/public_html/includes/functions/functions_general.php:952]
    #5 zen_db_perform() called at [/home/##########/jfigure-com/public_html/includes/modules/payment/paypalwpp.php:546]
    #6 paypalwpp->after_process() called at [/home/##########/jfigure-com/public_html/includes/classes/payment.php:253]
    #7 payment->after_process() called at [/home/##########/jfigure-com/public_html/includes/modules/pages/checkout_process/header_php.php:17]
    #8 require(/home/##########/jfigure-com/public_html/includes/modules/pages/checkout_process/header_php.php) called at [/home/##########/jfigure-com/public_html/index.php:36]
    --> PHP Fatal error: 1264:Out of range value for column 'exchange_rate' at row 1 :: INSERT INTO paypal (order_id, txn_type, module_name, module_mode, reason_code, payment_type, payment_status, pending_reason, invoice, first_name, last_name, payer_business_name, address_name, address_street, address_city, address_state, address_zip, address_country, address_status, payer_email, payer_id, payer_status, payment_date, business, receiver_email, receiver_id, txn_id, parent_txn_id, num_cart_items, mc_gross, mc_fee, mc_currency, settle_amount, settle_currency, exchange_rate, notify_version, verify_sign, date_added, memo) VALUES ('2517', 'cart', 'paypalwpp', 'PayPal', 'None', 'PayPal Express Checkout (instant)', 'Completed', 'None', 'EC-##########', '##########', '##########', '', '########## ##########', '##########', '##########', '##########', '##########', '', 'Confirmed', '##########', '##########', 'verified', '2019-05-01 10:52:47', '', '##########', '', '##########', '', '1', '##########', '##########', 'JPY', '0', 'JPY', '119.34816139488', '0', '', now(), '{Record generated by payment module}') ==> (as called by) /home/##########/jfigure-com/public_html/includes/functions/functions_general.php on line 952 <== in /home/##########/jfigure-com/public_html/includes/classes/db/mysql/query_factory.php on line 171.

    The change in paypalwpp.php doesn't work? How can I disable tableCheckup() that reset the length of the fields?

  5. #15
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,622
    Plugin Contributions
    123

    Default Re: Problem of checking out the cart; PHP error: 1264: Out of range value for column

    Put a return statement at the top of the function.
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  6. #16
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Problem of checking out the cart; PHP error: 1264: Out of range value for column

    Is the issue corrected if you change line 539 of /includes/modules/payment/paypalwpp.php to the following?
    Code:
     'exchange_rate' => (urldecode($this->responsedata['PAYMENTINFO_0_EXCHANGERATE']) > 0 ? round((float)urldecode($this->responsedata['PAYMENTINFO_0_EXCHANGERATE']), 2) : 1.0),

  7. #17
    Join Date
    May 2013
    Location
    Tokyo, Japan
    Posts
    18
    Plugin Contributions
    0

    Default Re: Problem of checking out the cart; PHP error: 1264: Out of range value for column

    Quote Originally Posted by lat9 View Post
    Is the issue corrected if you change line 539 of /includes/modules/payment/paypalwpp.php to the following?
    Code:
     'exchange_rate' => (urldecode($this->responsedata['PAYMENTINFO_0_EXCHANGERATE']) > 0 ? round((float)urldecode($this->responsedata['PAYMENTINFO_0_EXCHANGERATE']), 2) : 1.0),

    Thanks. I change the paypalwpp.php file as you suggested and see what will happen. (I'm on the live site.)

  8. #18
    Join Date
    May 2013
    Location
    Tokyo, Japan
    Posts
    18
    Plugin Contributions
    0

    Default Re: Problem of checking out the cart; PHP error: 1264: Out of range value for column

    Quote Originally Posted by jfigure.com View Post
    Thanks. I change the paypalwpp.php file as you suggested and see what will happen. (I'm on the live site.)
    Strange. The value thrown into the column, "exchange_rate", seems to have been fixed ("119.42") but I still got an error.


    [04-May-2019 01:01:38 Asia/Tokyo] Request URI: /index.php?main_page=checkout_process, IP address: ###########
    #1 trigger_error() called at [/home/###########/jfigure-com/public_html/includes/classes/db/mysql/query_factory.php:171]
    #2 queryFactory->show_error() called at [/home/###########/jfigure-com/public_html/includes/classes/db/mysql/query_factory.php:143]
    #3 queryFactory->set_error() called at [/home/###########/jfigure-com/public_html/includes/classes/db/mysql/query_factory.php:270]
    #4 queryFactory->Execute() called at [/home/###########/jfigure-com/public_html/includes/functions/functions_general.php:952]
    #5 zen_db_perform() called at [/home/###########/jfigure-com/public_html/includes/modules/payment/paypalwpp.php:546]
    #6 paypalwpp->after_process() called at [/home/###########/jfigure-com/public_html/includes/classes/payment.php:253]
    #7 payment->after_process() called at [/home/###########/jfigure-com/public_html/includes/modules/pages/checkout_process/header_php.php:17]
    #8 require(/home/###########/jfigure-com/public_html/includes/modules/pages/checkout_process/header_php.php) called at [/home/###########/jfigure-com/public_html/index.php:36]
    --> PHP Fatal error: 1264:Out of range value for column 'exchange_rate' at row 1 :: INSERT INTO paypal (order_id, txn_type, module_name, module_mode, reason_code, payment_type, payment_status, pending_reason, invoice, first_name, last_name, payer_business_name, address_name, address_street, address_city, address_state, address_zip, address_country, address_status, payer_email, payer_id, payer_status, payment_date, business, receiver_email, receiver_id, txn_id, parent_txn_id, num_cart_items, mc_gross, mc_fee, mc_currency, settle_amount, settle_currency, exchange_rate, notify_version, verify_sign, date_added, memo) VALUES ('2524', 'cart', 'paypalwpp', 'PayPal', 'None', 'PayPal Express Checkout (instant)', 'Completed', 'None', 'EC-###########', ###########', '###########', '', '########### ###########', '###########', '###########', '###########', '###########', '', 'Confirmed', '###########', '###########', 'verified', '2019-05-03 16:01:18', '', '###########', '', '###########, '', '1', '16795', '729', 'JPY', '0', 'JPY', '119.42', '0', '', now(), '{Record generated by payment module}') ==> (as called by) /home/###########/jfigure-com/public_html/includes/functions/functions_general.php on line 952 <== in /home/###########/jfigure-com/public_html/includes/classes/db/mysql/query_factory.php on line 171.

  9. #19
    Join Date
    Jul 2012
    Posts
    16,718
    Plugin Contributions
    17

    Default Re: Problem of checking out the cart; PHP error: 1264: Out of range value for column

    From what I found in research of this issue was that in mysql 5.7 (your current version), supposedly the parentheses that follow the size definition actually do play a factor in why this error is being generated. The description found in the mysql manual indicates that for the data type of decimal having (4, 2) is that the number can only be between -99.99 and 99.99. That in this case to have 119.42, the numbers should be 5, 2 at least.

    If you rerun the alter table sql previously provided changing 4,2 to 5,2, does the error stop being generated?
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  10. #20
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,399
    Plugin Contributions
    87

    Default Re: Problem of checking out the cart; PHP error: 1264: Out of range value for column

    Quote Originally Posted by mc12345678 View Post
    From what I found in research of this issue was that in mysql 5.7 (your current version), supposedly the parentheses that follow the size definition actually do play a factor in why this error is being generated. The description found in the mysql manual indicates that for the data type of decimal having (4, 2) is that the number can only be between -99.99 and 99.99. That in this case to have 119.42, the numbers should be 5, 2 at least.

    If you rerun the alter table sql previously provided changing 4,2 to 5,2, does the error stop being generated?
    Nice one, @mc12345678! Do you think that, perhaps, that field should be changed from a decimal format to simply float, given the "variety" of exchange rates?

 

 
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. 1264 Out of range value for column 'products_id' at row 1 - after importing products
    By suntower in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 20 Nov 2010, 12:23 AM
  2. 1264 Out of range value adjusted for column '2co_order_id' at row 1
    By tweakservers in forum Addon Payment Modules
    Replies: 0
    Last Post: 15 Sep 2008, 05:59 PM
  3. ERROR 1264 Out of range value
    By sharemind in forum Installing on a Windows Server
    Replies: 3
    Last Post: 25 May 2006, 02:17 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