Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2019
    Location
    Sweden
    Posts
    2
    Plugin Contributions
    0

    Default Digital download setup - error after checkout

    Hi all! I really need help with this

    I did a fresh install of ZenCart v. 1.5.6c with responsive classic default theme and are trying to set up digital products to download.

    If I follow Zencart tutorial for digital download I end up with this error after payment is completed:
    WARNING: An Error occurred, please refresh the page and try again.

    BUT: If I add one more attribute to my product it works -
    It also works fine with checkout if I add an additional product with two attributes option to my cart and checkout, then the download works fine and the error doesn't appear.

    But I only want ONE option and not two radiobuttons. I can't solve this! BUG or configuration errors?


    Error log shows:
    [04-Aug-2019 19:30:06 UTC] Request URI: /index.php?main_page=checkout_process, IP address: 90.227.242.86
    #1 trigger_error() called at [/home/xenbwyun/public_html/yourownfont.com/includes/classes/db/mysql/query_factory.php:171]
    #2 queryFactory->show_error() called at [/home/xenbwyun/public_html/yourownfont.com/includes/classes/db/mysql/query_factory.php:143]
    #3 queryFactory->set_error() called at [/home/xenbwyun/public_html/yourownfont.com/includes/classes/db/mysql/query_factory.php:270]
    #4 queryFactory->Execute() called at [/home/xenbwyun/public_html/yourownfont.com/includes/functions/functions_general.php:952]
    #5 zen_db_perform() called at [/home/xenbwyun/public_html/yourownfont.com/includes/classes/order.php:695]
    #6 order->create() called at [/home/xenbwyun/public_html/yourownfont.com/includes/modules/checkout_process.php:95]
    #7 require(/home/xenbwyun/public_html/yourownfont.com/includes/modules/checkout_process.php) called at [/home/xenbwyun/public_html/yourownfont.com/includes/modules/pages/checkout_process/header_php.php:14]
    #8 require(/home/xenbwyun/public_html/yourownfont.com/includes/modules/pages/checkout_process/header_php.php) called at [/home/xenbwyun/public_html/yourownfont.com/index.php:36]
    --> PHP Fatal error: 1366:Incorrect integer value: '' for column `xenbwyun_zencart`.`orders`.`delivery_address_format_id` at row 1 :: INSERT INTO orders (customers_id, customers_name, customers_company, customers_street_address, customers_suburb, customers_city, customers_postcode, customers_state, customers_country, customers_telephone, customers_email_address, customers_address_format_id, delivery_name, delivery_company, delivery_street_address, delivery_suburb, delivery_city, delivery_postcode, delivery_state, delivery_country, delivery_address_format_id, billing_name, billing_company, billing_street_address, billing_suburb, billing_city, billing_postcode, billing_state, billing_country, billing_address_format_id, payment_method, payment_module_code, shipping_method, shipping_module_code, coupon_code, cc_type, cc_owner, cc_number, cc_expires, date_purchased, orders_status, order_total, order_tax, currency, currency_value, ip_address) VALUES ('4', 'test buyer', '', 'fdfdfdfd', '', 'sydney', '77777', 'Australian Capital Territory', 'Australia', '4636472364', 'shop-buyer@yourownfont.com', '7', ' ', '', '', '', '', '', '', '', '', 'test buyer', '', 'fdfdfdfd', '', 'sydney', '77777', 'Australian Capital Territory', 'Australia', '7', 'PayPal', 'paypalwpp', 'Free Shipping', 'free', '', '', '', '', '', now(), '2', '3', '0', 'USD', '1.000000', '90.227.242.86 - 90.227.242.86') ==> (as called by) /home/xenbwyun/public_html/yourownfont.com/includes/functions/functions_general.php on line 952 <== in /home/xenbwyun/public_html/yourownfont.com/includes/classes/db/mysql/query_factory.php on line 171.
    Thanks in advance for any help!

  2. #2
    Join Date
    Jul 2012
    Posts
    14,210
    Plugin Contributions
    17

    Default Re: Digital download setup - error after checkout

    So the "quick" fix (meaning I don't think it really resolves the why this is an issue) is to modify includes/classes/order.php

    At lines 658, 667, and 676
    Insert/force conversion to an integer by use of (int).

    Like so where applicable:
    Code:
    (int)$this->billing['format_id'],
    Code:
    (int)$this->customer['format_id'],
    Code:
    (int)$this->shipping['format_id'],
    While I haven't yet attempted to reproduce the issue, I was curious if the payment method had anything to do with it as it appears that the format_id was set to 0 though it did not translate properly to an integer just as an empty value and yet earlier in processing/data collection within the class it appears that such a value is assigned an integer making it seem like it doesn't need to be so assigned in the lines above... but if something else adjusted the associated assignments, it would be good to know. Though perhaps it was a lack of assignment is why it didn't get set to a zero.
    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
    Jul 2019
    Location
    Sweden
    Posts
    2
    Plugin Contributions
    0

    Default Re: Digital download setup - error after checkout

    Quote Originally Posted by mc12345678 View Post
    So the "quick" fix (meaning I don't think it really resolves the why this is an issue) is to modify includes/classes/order.php

    At lines 658, 667, and 676
    Insert/force conversion to an integer by use of (int).

    Like so where applicable:
    Code:
    (int)$this->billing['format_id'],
    Code:
    (int)$this->customer['format_id'],
    Code:
    (int)$this->shipping['format_id'],
    While I haven't yet attempted to reproduce the issue, I was curious if the payment method had anything to do with it as it appears that the format_id was set to 0 though it did not translate properly to an integer just as an empty value and yet earlier in processing/data collection within the class it appears that such a value is assigned an integer making it seem like it doesn't need to be so assigned in the lines above... but if something else adjusted the associated assignments, it would be good to know. Though perhaps it was a lack of assignment is why it didn't get set to a zero.
    I tried inserting (int) but it didn't fix the issue, I will just have to live with the two attributes setting.... Or install the old version I used to have.... But if anyone have a solution I'm willing to try :) But it's time to get working now!

 

 

Similar Threads

  1. Replies: 1
    Last Post: 28 Aug 2010, 10:42 AM
  2. Replies: 0
    Last Post: 2 Jun 2010, 06:14 PM
  3. Can I use Zen-Cart for a digital download site w/google checkout?
    By Mr_bill in forum Addon Payment Modules
    Replies: 2
    Last Post: 2 May 2010, 12:59 PM
  4. Email password to customer after digital download
    By ballyc27 in forum Managing Customers and Orders
    Replies: 1
    Last Post: 28 Feb 2009, 11:38 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