Update: this trick doesn't help. Two weeks later I received another duplicated order case.
Printable View
I want to add a little bit more information regarding this issue.
zc1.58 includes order_status.php by default, which has the same name as the order_status.php by opc.
So there will be two language definition files for lang.order_status.php. One from OPC (order_status.php), one from zc1.58 (lang.order_status.php). So obviously there is a conflict.
I re-wrote the order_status.php from OPC into zc1.58 format and name it as "lang.order_status.php", to replace the lang.order_status.php from zc1.58. And it worked fine.
My previous post could be confusing...Anyway, there are two similar language files. One from opc and one from the zc. So there might be some conflict for their functions.
Here is the language file I modified for opc and zc1.58 (lang.order_status.php). Please remove the original order_status.php from OPC in your directory.
Let's see if @lat9 has a better way to improve it.
PHP Code:
<?php
$define = [
// -----
// Part of the One-Page Checkout plugin => provided under GPL 2.0 license by lat9 ([email protected]).
// Copyright (C) 2018 => Vinos de Frutas Tropicales. All rights reserved.
//
// Adapted from the like-named page handling with the following history:
// - Integrated COWAA v1.0
'NAVBAR_TITLE' => 'Order Status',
'NAVBAR_TITLE_1' => 'My Account',
'HEADING_TITLE' => 'Check Order Status', //Lookup Order Information
'SUB_HEADING_TITLE' => 'Order Information',
'HEADING_ORDER_NUMBER' => 'Order #%s',
'HEADING_ORDER_DATE' => 'Order Date:',
'HEADING_ORDER_TOTAL' => 'Order Total:',
'HEADING_PRODUCTS' => 'Products',
'HEADING_TAX' => 'Tax',
'HEADING_TOTAL' => 'Total',
'HEADING_QUANTITY' => 'Qty.',
'HEADING_SHIPPING_METHOD' => 'Shipping Method',
'HEADING_PAYMENT_METHOD' => 'Payment Method',
'HEADING_ORDER_HISTORY' => 'Status History & Comments',
'TEXT_NO_COMMENTS_AVAILABLE' => 'No comments available.',
'TABLE_HEADING_STATUS_DATE' => 'Date',
'TABLE_HEADING_STATUS_ORDER_STATUS' => 'Order Status',
'TABLE_HEADING_STATUS_COMMENTS' => 'Comments',
'QUANTITY_SUFFIX' => ' ea. ',
'ORDER_HEADING_DIVIDER' => ' - ',
'TEXT_OPTION_DIVIDER' => ' - ',
'ENTRY_EMAIL' => 'E-Mail Address:',
'ENTRY_ORDER_NUMBER' => 'Order Number:',
'ERROR_INVALID_EMAIL' => 'You have entered an invalid e-mail address.',
'ERROR_INVALID_ORDER' => 'You have entered an invalid order number.',
'ERROR_NO_MATCH' => 'No match found for your entry.',
'TEXT_LOOKUP_INSTRUCTIONS' => 'To lookup the status of an order, please enter the order number and the e-mail address with which it was placed.',
'FOOTER_DOWNLOAD' => 'You can also download your products at a later time at \'%s\'',
'FOOTER_DOWNLOAD_COWOA' => 'You can download your products using the Order Status page until you reach max downloads or run out of time!',
];
return $define;
Cindy - Is there any way to somehow still enable GUEST CHECKOUT, but NOT have the one-page checkout?
One of the MAIN reasons why I love OPC is not for the single page, but rather, for the ability to have Guest Checkout.
As it stands, if the configuration for "Enable One-Page Checkout?" is set to false, it turns off the entire module. But since you also have an "Enable Guest Checkout?" value, is there any possibility in future releases where one can not be dependent on the other?
For example, can have the default 3 page checkout (by setting Enable OPC to false), but also have the Guest checkout option by setting that to true?
ZC 1.5.7d
Bootstrap 3.3.0
OPC 2.4.3
PhP version 7.3
I am getting some errors as follow and I believed it OPC related somehow:
Any helps on resolving would be greatly appreciated.Quote:
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_CONTACT_US - assumed 'JS_ERROR_CONTACT_US' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 46.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_AJAX_SHIPPING_TIMEOUT - assumed 'JS_ERROR_AJAX_SHIPPING_TIMEOUT' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 47.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_CONTACT_US - assumed 'JS_ERROR_CONTACT_US' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 47.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_AJAX_PAYMENT_TIMEOUT - assumed 'JS_ERROR_AJAX_PAYMENT_TIMEOUT' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 48.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_CONTACT_US - assumed 'JS_ERROR_CONTACT_US' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 48.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_AJAX_SET_ADDRESS_TIMEOUT - assumed 'JS_ERROR_AJAX_SET_ADDRESS_TIMEOUT' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 49.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_CONTACT_US - assumed 'JS_ERROR_CONTACT_US' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 49.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_AJAX_RESTORE_ADDRESS_TIMEOUT - assumed 'JS_ERROR_AJAX_RESTORE_ADDRESS_TIMEOUT' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 50.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_CONTACT_US - assumed 'JS_ERROR_CONTACT_US' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 50.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_AJAX_VALIDATE_ADDRESS_TIMEOUT - assumed 'JS_ERROR_AJAX_VALIDATE_ADDRESS_TIMEOUT' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 51.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_CONTACT_US - assumed 'JS_ERROR_CONTACT_US' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 51.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_AJAX_RESTORE_CUSTOMER_TIMEOUT - assumed 'JS_ERROR_AJAX_RESTORE_CUSTOMER_TIMEOUT' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 52.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_CONTACT_US - assumed 'JS_ERROR_CONTACT_US' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 52.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_AJAX_VALIDATE_CUSTOMER_TIMEOUT - assumed 'JS_ERROR_AJAX_VALIDATE_CUSTOMER_TIMEOUT' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 53.
[16-Nov-2022 16:33:48 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 75.113.172.163
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_CONTACT_US - assumed 'JS_ERROR_CONTACT_US' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 53.
Thank you
do you have this file in your install:
https://github.com/lat9/one_page_che...eckout_one.php
Yes I have the language files.
Could an additional jscript file cause the issue?
I added the following file named jscript_paypal.php in includes/modules/pages/checkout_one with the following code:
The paypal script is only needed on this page so i thought of doing it this way instead of in html_header between the <head> tag.Code:<script defer
src="https://www.paypal.com/sdk/js?client-id=Aegt8Ag48Qk8****hidden**********AWXJIkxeeiWN2Na1vIpn-mTwy6QygzUb&components=messages"
data-namespace="PayPalSDK">
</script>
Did i mess it up and/or did it wrong? It could be interfering with jscript_main.php
Thank you for your help
Do you also have this (https://github.com/lat9/one_page_che..._functions.php) file? That contains the function that 'converts' the new-format language files into language constants for pre-zc158 installations.
I have this file as well but my version was a little different.( after winmerge comparison)
I had this code around line 128:
instead ofCode:if (!defined('IS_ADMIN_FLAG') || IS_ADMIN_FLAG !== true) {
$base_language_dir = DIR_WS_LANGUAGES . '/' . $_SESSION['language'] . '/' . $legacy_dir;
} else {
$base_language_dir = DIR_FS_CATALOG_LANGUAGES . '/' . $_SESSION['language'] . '/' . $legacy_dir;
}
I replaced my file with the github version and also removed my jscript_paypal.php hoping it will fix the error log.Code:$base_language_dir = DIR_WS_LANGUAGES . '/' . $_SESSION['language'] . '/' . $legacy_dir;
I also looked up some of the constant using developer tool kit and they are present in the file /includes/languages/english/lang.checkout_one.php
Not sure what it could be. I resetted the error log and waiting to see if it happens again.
Looks like I am out of luck on this one.
The errors are back with a vengeance:
Anything other ideas what could be causing the issue?Quote:
[18-Nov-2022 11:40:03 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 172.58.140.245
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_AJAX_RESTORE_CUSTOMER_TIMEOUT - assumed 'JS_ERROR_AJAX_RESTORE_CUSTOMER_TIMEOUT' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 52.
[18-Nov-2022 11:40:03 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 172.58.140.245
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_CONTACT_US - assumed 'JS_ERROR_CONTACT_US' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 52.
[18-Nov-2022 11:40:03 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 172.58.140.245
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_AJAX_VALIDATE_CUSTOMER_TIMEOUT - assumed 'JS_ERROR_AJAX_VALIDATE_CUSTOMER_TIMEOUT' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 53.
[18-Nov-2022 11:40:03 America/Los_Angeles] Request URI: /index.php?main_page=checkout_one, IP address: 172.58.140.245
#1 require(/includes/modules/pages/checkout_one/jscript_main.php) called at [/includes/templates/bootstrap/common/html_header.php:201]
#2 require(/includes/templates/bootstrap/common/html_header.php) called at [/index.php:43]
--> PHP Warning: Use of undefined constant JS_ERROR_CONTACT_US - assumed 'JS_ERROR_CONTACT_US' (this will throw an Error in a future version of PHP) in /includes/modules/pages/checkout_one/jscript_main.php on line 53.
Thank you for all your help
@nicksab, whatever changes you have made to OPC's base files are what's are giving you these issues. I suggest that you do a full review of those changes to see how they might be affecting the OPC update.
My apologies has I must have messed up it up somehow. I removed OPC and reinstalled it as well as applied the Bootstrap changes. So fa, no error.
However, since I don t want to break it again:
How do i remove the "bottom instructions" box?
How can i make the "specials instructions/comment box" required or mandatory?
Thank you
You remove the "bottom instructions" by editing your template-override of /includes/languages/english/lang.checkout_one.php, so that would be in your bootstrap-clone's language sub-directory: /includes/languages/english/YOUR_TEMPLATE/lang.checkout_one.php.
You'll need custom code to make an entry in the comment-box mandatory.
Is it possible to add a shipping phone number to the shipping address block?
I tried the plug in at https://www.zen-cart.com/downloads.php?do=file&id=1100 but no luck.
anyone knows how to or managed to integrate it to OPC?
I am trying to have a shipping phone number field and that s the only thing i could find.
Any advise or suggestions would be appreciated
Thank you
I am still receiving the "missing elements" message. - Help, I'm not sure where else to look.
Zen version v1.5.8, OPC 2.4.3, Bootstrap 4 Template v3.4.0, Square WebPay , PHP7.4.32
I did a compare text on the tpl_checkout_one_default.php from both the Bootstrap directory and the Template Default directory and couldn't find any missing HTML id elements between the two. I even went so far as to make a copy and bring in the page directly from the template default directory and no luck there.
URL is www.NortheastTroller.com - OPC is not enabled currently.
Hi
I am running zencart 1.5.8 Bootstrap V 3.4.0 one-page-checkout V 2.4.3(2022-07-23) PHP 7.4
Sadly if apply Guest Checkout after putting something in the cart I get your session has expired. Can anyone advise , many thanks
Ok, Got that all set!
Now I'm receiving the "Sorry, but our expedited checkout process cannot be used. Click here to use our alternate checkout process." on test of Guest Checkout.
The Jscript error it pulls is Uncaught Error: Syntax error, unrecognized expression: .
at m.error (jscript_jquery-1.7.1.min.js:3:14665)
at m.filter (jscript_jquery-1.7.1.min.js:3:14605)
at m (jscript_jquery-1.7.1.min.js:3:12970)
at Function.m [as find] (jscript_jquery-1.7.1.min.js:3:24740)
at init.find (jscript_jquery-1.7.1.min.js:3:26850)
at new init (jscript_jquery-1.7.1.min.js:2:7847)
at e (jscript_jquery-1.7.1.min.js:2:6351)
at HTMLDocument.<anonymous> (jquery.checkout_one.min.js?1668905693:7:2372)
at n (jscript_jquery-1.7.1.min.js:2:14784)
at Object.fireWith (jscript_jquery-1.7.1.min.js:2:15553)
I do have the correct jscript_framework.php there - not sure if that's related or not.
On the checout_one page ( Checkout) ,is possible to have the following:
- shipping block to be expanded ( fully open without clickingon the "edit" buton)
- shipping block information to be empty ( as opposed to copy the billing information by default)
It is for a flower delivery site and 99% of customer don't ship to themselves.
It would make the checkout process easier/simpler for potential customers. I don t know anything about coding and have no idea if that s remotely possible without heavy changes.
I would appreciate any advice or help on this
Thank you in advance
Not sure - Possibly the old bootstrap template before upgrade?
Got the Jquery updated but still getting the same error message and this in the console -
Uncaught Error: Syntax error, unrecognized expression: #ottotal .ot-text.
at se.error (jquery-3.5.1.min.js:2:13606)
at se.tokenize (jquery-3.5.1.min.js:2:21617)
at se.select (jquery-3.5.1.min.js:2:22444)
at Function.se [as find] (jquery-3.5.1.min.js:2:7089)
at S.fn.init.find (jquery-3.5.1.min.js:2:25014)
at new S.fn.init (jquery-3.5.1.min.js:2:25503)
at S (jquery-3.5.1.min.js:2:1024)
at HTMLDocument.<anonymous> (jquery.checkout_one.min.js?1668905693:7:2372)
at e (jquery-3.5.1.min.js:2:30005)
at t (jquery-3.5.1.min.js:2:30307)
@dbltoe, it is already set this way and I have both field separated ( billing and shipping block)
My issue is that after a new customer creates an account and move on the next page, the biling and shipping are automatically filled up with the previous information entered. Since my customers do notorrarely ship to themselves, they have to erase the shipping infos and enter a new set of informations.
I just think it would be easier if the "shipping info" fields could remain blank instead of "erase" infos to enter the proper.
I hope this makes sense somehow in my particular case.
As for the shipping block to be expanded, i think it has something to do with the class=" hiddenField" but I have figure out a way to work around it yet
Thank you for the assistance
Installed the App and I am currently testing. Getting a speed bump.
Each time I enter the cc info and click to confirm, the page refreshes and displays a message "Your order's details have changed. Please review the current values and re-submit." The url is for one page checkout: https://needtoorder.com/index.php?ma...e=checkout_one.
I still needed to update the NEW Square Web Pay here.... then it worked like a charm
Attachment 20160
--> PHP Warning: Undefined array key "order_id" in /store/includes/modules/pages/order_status/header_php.php on line 58.
Happens when someone removes the order_id from $_POST data. Could do something like
$orderID = (!empty($_POST['order_id']) ? (int)$_POST['order_id'] : -1);
See this GitHub issue for resolution: https://github.com/lat9/one_page_checkout/issues/363
v2.4.4 of One-Page Checkout is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2095
This release contains changes associated with the following GitHub issues:
#351: Update documentation to indicate that information sidebox changes are already included in the ZCA Bootstrap 4 template.
#354: Additional checks needed when shipping is unavailable.
#355: Correct warnings issued by zen_address_label when changing the delivery address.
#357: Correct missing language constants on the order_status page when running on zc158.
#359: When changing a country dropdown, the associated states/provinces aren't sorted alphabetically.
#360: Add a notification just prior to the confirmation page's completion.
#362: Update zen_cfg_read_only to use the version supplied in zc158.
#363: Correct PHP warnings issued on the order_status page when variables are maliciously removed.
I think the issue may be in the sequence in which you loaded the mods.
We (myzencarthost.com) have found that OPC needs to be loaded prior to the Bootstrap files as bootstrap needs to modify OPC silightly in order for the two to properly operate together.
Also, don't forgetQuote:
- If you have OPC installed, its Order Total: jQuery Selector configuration setting should be set to #ottotal > .ot-text for the Bootstrap template's use.
Hi Guys, Love the OPC module, thank you for all your efforts. :)
I have checked my logs afer a week of using and found the following entries.
Could soneone hava quick look and help me resolve the issues please. :)
[29-Nov-2022 15:32:24 Australia/Melbourne] Request URI: /index.php?main_page=checkout_one, IP address: 159.196.51.68
#1 trigger_error() called at [/***/public_html/includes/classes/OnePageCheckout.php:1078]
#2 OnePageCheckout->getAddressValuesFromDb() called at [/***/public_html/includes/classes/OnePageCheckout.php:1051]
#3 OnePageCheckout->getAddressValues() called at [/***/public_html/includes/templates/template_default/templates/tpl_modules_opc_address_block.php:26]
#4 require(/***/public_html/includes/templates/template_default/templates/tpl_modules_opc_address_block.php) called at [/***/public_html/includes/templates/template_default/templates/tpl_modules_opc_billing_address.php:14]
#5 require(/***/public_html/includes/templates/template_default/templates/tpl_modules_opc_billing_address.php) called at [/***/public_html/includes/templates/template_default/templates/tpl_checkout_one_default.php:54]
#6 require(/***/public_html/includes/templates/template_default/templates/tpl_checkout_one_default.php) called at [/****/public_html/includes/templates/responsive_abcflags/common/tpl_main_page.php:178]
#7 require(/***/public_html/includes/templates/responsive_abcflags/common/tpl_main_page.php) called at [/***/public_html/index.php:94]
--> PHP Fatal error: unknown address_book_id (1199) for customer_id (1048) in /***/public_html/includes/classes/OnePageCheckout.php on line 1078.
Thanking you in advance. :)
--------------------
Thank you for answering. So the zen cart is a new install of Zen Cart V1.5.8 from a previous version 1.5.7 (previously used Guest checkout with out any issues). NO Debug-logs I turned on Enable Checkout bug found this in there as below. PHP 7.4 Plugins shipping UK Post Code a couple of others but nothing that should be an issue. Bootstrap 3.4.
So if you put something in the cart and then go to checkout , click on Check out as a Guest you immediately get the Login Time Out your sessions has expired.
I did copy the slightly older database over to the new one, is it possible something went wrong there?
I have used the plugins before with Bootstrap and not had a problem all has worked well in the past, so a bit confused.
From Checkout debug
Thanks appreciate any guidanceCode:2022-12-02 09:24:29 OnePageCheckout: updateOrderAddresses, on entry:order::__set_state(array( 'attachArray' =>
array (
),
'bestSellersUpdate' => NULL,
'billing' =>
array (
),
'content_type' => 'physical',
'customer' =>
array (
),
'delivery' =>
array (
),
'doStockDecrement' => NULL,
'extra_header_text' => NULL,
'email_low_stock' => NULL,
'email_order_message' => NULL,
'info' =>
array (
'order_status' => '2',
'currency' => 'GBP',
'currency_value' => '1.000000',
'payment_method' => '',
'payment_module_code' => '',
'coupon_code' => '',
'shipping_method' => '',
'shipping_module_code' => '',
'shipping_cost' => 0,
'subtotal' => 0,
'shipping_tax' => 0,
'tax' => 0,
'total' => 0,
'tax_groups' =>
array (
),
'comments' => '',
'ip_address' => '**.**.**.**1 - **.**.**.**1',
),
'orderId' => NULL,
'products' =>
array (
),
'products_ordered' => NULL,
'products_ordered_attributes' => NULL,
'products_ordered_html' => NULL,
'queryReturnFlag' => NULL,
'send_low_stock_emails' => NULL,
'statuses' =>
array (
),
'total_cost' => NULL,
'total_tax' => NULL,
'total_weight' => NULL,
'totals' =>
array (
),
'use_external_tax_handler_only' => NULL,
'observerAliases' =>
array (
'NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE' => 'NOTIFY_ORDER_CART_SUBTOTAL_CALCULATE',
),
))
OnePageCheckout Object
(
[isGuestCheckoutEnabled:protected] => 1
[registeredAccounts:protected] =>
[isEnabled:protected] => 1
[guestIsActive:protected] =>
[tempAddressValues:protected] =>
[guestCustomerInfo:protected] =>
[guestCustomerId:protected] => 1
[reset_info:protected] => Array
(
)
[tempBilltoAddressBookId:protected] => 1
[tempSendtoAddressBookId:protected] => 2
[dbStringType:protected] => stringIgnoreNull
[label_params:protected] =>
[sendtoSaved:protected] =>
[paypalAddressOverride:protected] =>
[paypalTotalValue:protected] =>
[paypalTotalValueChanged:protected] =>
[paypalNoShipping:protected] =>
[customerInfoOk:protected] =>
[billtoTempAddrOk:protected] =>
[sendtoTempAddrOk:protected] =>
[isVirtualOrder:protected] =>
[billtoAddressChangeable:protected] =>
[sendtoAddressChangeable:protected] =>
[observerAliases:base:private] => Array
(
[NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE] => NOTIFY_ORDER_CART_SUBTOTAL_CALCULATE
)
)
2022-12-02 09:24:29 OnePageCheckout: Current sendto: not set
2022-12-02 09:24:29 OnePageCheckout: updateOrderAddresses, , , 0, 0
[]
[]
[]
2022-12-02 09:24:31 checkout_one_observer: checkout_one redirect 1a: Array
(
[main_page] => checkout_shipping
)
Array
(
[securityToken] => 9a9b2dc89af9b4f22c438bc31871c9b6
[customers_host_address] => 82-69-16-141.dsl.in-addr.zen.co.uk
[opc] => OnePageCheckout Object
(
[isGuestCheckoutEnabled:protected] => 1
[registeredAccounts:protected] =>
[isEnabled:protected] => 1
[guestIsActive:protected] =>
[tempAddressValues:protected] =>
[guestCustomerInfo:protected] =>
[guestCustomerId:protected] => 1
[reset_info:protected] => Array
(
)
[tempBilltoAddressBookId:protected] => 1
[tempSendtoAddressBookId:protected] => 2
[dbStringType:protected] => stringIgnoreNull
[label_params:protected] =>
[sendtoSaved:protected] =>
[paypalAddressOverride:protected] =>
[paypalTotalValue:protected] =>
[paypalTotalValueChanged:protected] =>
[paypalNoShipping:protected] =>
[customerInfoOk:protected] =>
[billtoTempAddrOk:protected] =>
[sendtoTempAddrOk:protected] =>
[isVirtualOrder:protected] =>
[billtoAddressChangeable:protected] =>
[sendtoAddressChangeable:protected] =>
[observerAliases:base:private] => Array
(
[NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE] => NOTIFY_ORDER_CART_SUBTOTAL_CALCULATE
)
)
[cartID] =>
[cart_errors] =>
[valid_to_checkout] => 1
[cart] => shoppingCart Object
(
[contents] => Array
(
[200:3685352893bb559c6ee298feb1ef88ca] => Array
(
[qty] => 1
[attributes] => Array
(
[1] => 38
)
)
)
[total] => 33.95
[weight] => 0.3
[cartID] => 36454
[content_type:protected] => physical
[free_shipping_item:protected] => 0
[free_shipping_weight:protected] => 0
[free_shipping_price:protected] => 0
[download_count:protected] => 0
[total_before_discounts:protected] => 33.95
[display_debug_messages:protected] =>
[flag_duplicate_msgs_set:protected] =>
[flag_duplicate_quantity_msgs_set:protected] => Array
(
)
[observerAliases:base:private] => Array
(
[NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE] => NOTIFY_ORDER_CART_SUBTOTAL_CALCULATE
)
)
[check_valid_prod] => 1
[navigation] => navigationHistory Object
(
[path] => Array
(
[0] => Array
(
[page] => index
[mode] => SSL
[get] => Array
(
[cPath] => 2
)
[post] => Array
(
)
)
[1] => Array
(
[page] => product_info
[mode] => SSL
[get] => Array
(
[cPath] => 2_16
[products_id] => 200
[number_of_uploads] => 0
[action] => add_product
)
[post] => Array
(
)
)
[2] => Array
(
[page] => shopping_cart
[mode] => SSL
[get] => Array
(
)
[post] => Array
(
)
)
[3] => Array
(
[page] => checkout_shipping
[mode] => SSL
[get] => Array
(
)
[post] => Array
(
)
)
)
[snapshot] => Array
(
[page] => product_info
[mode] => SSL
[get] => Array
(
[cPath] => 2_16
[products_id] => 200
)
[post] => Array
(
)
)
[observerAliases:base:private] => Array
(
[NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE] => NOTIFY_ORDER_CART_SUBTOTAL_CALCULATE
)
)
[language] => english
[languages_id] => 1
[languages_code] => en
[layoutType] => legacy
[currency] => GBP
[today_is] => 2022-12-02
[updateExpirations] => 1
[antispam_fieldname] => 9xxX9M9fdi
[session_counter] => 1
[customers_ip_address] => **.**.**.**
[new_products_id_in_cart] => 200:3685352893bb559c6ee298feb1ef88ca
[cart_country_id] => 222
[country_info] => Array
(
[countries_name] => United Kingdom
[countries_iso_code_2] => GB
[countries_iso_code_3] => GBR
)
[shipping_weight] => 0.3
)
2022-12-02 09:24:31 checkout_one: CHECKOUT_ONE_ENTRY, version (2.4.4 (2022-11-30)), Zen Cart version (1.5.8), template (bootstrap)
2022-12-02 09:24:31 OnePageCheckout: startGuestOnePageCheckout, exit: sendto: not set, billto: not set
OnePageCheckout Object
(
[isGuestCheckoutEnabled:protected] => 1
[registeredAccounts:protected] =>
[isEnabled:protected] => 1
[guestIsActive:protected] =>
[tempAddressValues:protected] => Array
(
[ship] => Array
(
[gender] =>
[company] =>
[firstname] =>
[lastname] =>
[street_address] =>
[suburb] =>
[city] =>
[postcode] =>
[state] =>
[country] => 222
[country_id] => 222
[zone_id] => 0
[zone_name] =>
[address_book_id] => 0
[selected_country] => 222
[country_has_zones] => 1
[state_field_label] =>
[show_pulldown_states] => 1
[error] =>
[error_state_input] =>
[validated] =>
)
[bill] => Array
(
[gender] =>
[company] =>
[firstname] =>
[lastname] =>
[street_address] =>
[suburb] =>
[city] =>
[postcode] =>
[state] =>
[country] => 222
[country_id] => 222
[zone_id] => 0
[zone_name] =>
[address_book_id] => 0
[selected_country] => 222
[country_has_zones] => 1
[state_field_label] =>
[show_pulldown_states] => 1
[error] =>
[error_state_input] =>
[validated] =>
)
)
[guestCustomerInfo:protected] =>
[guestCustomerId:protected] => 1
[reset_info:protected] => Array
(
)
[tempBilltoAddressBookId:protected] => 1
[tempSendtoAddressBookId:protected] => 2
[dbStringType:protected] => stringIgnoreNull
[label_params:protected] =>
[sendtoSaved:protected] =>
[paypalAddressOverride:protected] =>
[paypalTotalValue:protected] =>
[paypalTotalValueChanged:protected] =>
[paypalNoShipping:protected] =>
[customerInfoOk:protected] =>
[billtoTempAddrOk:protected] =>
[sendtoTempAddrOk:protected] =>
[isVirtualOrder:protected] =>
[billtoAddressChangeable:protected] =>
[sendtoAddressChangeable:protected] =>
[observerAliases:base:private] => Array
(
[NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE] => NOTIFY_ORDER_CART_SUBTOTAL_CALCULATE
)
)
2022-12-02 09:24:37 checkout_one: CHECKOUT_ONE_ENTRY, version (2.4.4 (2022-11-30)), Zen Cart version (1.5.8), template (bootstrap)
2022-12-02 09:24:37 OnePageCheckout: startGuestOnePageCheckout, exit: sendto: not set, billto: not set
OnePageCheckout Object
(
[isGuestCheckoutEnabled:protected] => 1
[registeredAccounts:protected] =>
[isEnabled:protected] => 1
[guestIsActive:protected] => 1
[tempAddressValues:protected] => Array
(
[ship] => Array
(
[gender] =>
[company] =>
[firstname] =>
[lastname] =>
[street_address] =>
[suburb] =>
[city] =>
[postcode] =>
[state] =>
[country] => 222
[country_id] => 222
[zone_id] => 0
[zone_name] =>
[address_book_id] => 0
[selected_country] => 222
[country_has_zones] => 1
[state_field_label] =>
[show_pulldown_states] => 1
[error] =>
[error_state_input] =>
[validated] =>
)
[bill] => Array
(
[gender] =>
[company] =>
[firstname] =>
[lastname] =>
[street_address] =>
[suburb] =>
[city] =>
[postcode] =>
[state] =>
[country] => 222
[country_id] => 222
[zone_id] => 0
[zone_name] =>
[address_book_id] => 0
[selected_country] => 222
[country_has_zones] => 1
[state_field_label] =>
[show_pulldown_states] => 1
[error] =>
[error_state_input] =>
[validated] =>
)
)
[guestCustomerInfo:protected] => Array
(
[firstname] =>
[lastname] =>
[email_address] =>
[telephone] =>
[dob] =>
[gender] =>
)
[guestCustomerId:protected] => 1
[reset_info:protected] => Array
(
)
[tempBilltoAddressBookId:protected] => 1
[tempSendtoAddressBookId:protected] => 2
[dbStringType:protected] => stringIgnoreNull
[label_params:protected] =>
[sendtoSaved:protected] =>
[paypalAddressOverride:protected] =>
[paypalTotalValue:protected] =>
[paypalTotalValueChanged:protected] =>
[paypalNoShipping:protected] =>
[customerInfoOk:protected] =>
[billtoTempAddrOk:protected] =>
[sendtoTempAddrOk:protected] =>
[isVirtualOrder:protected] =>
[billtoAddressChangeable:protected] =>
[sendtoAddressChangeable:protected] =>
[observerAliases:base:private] => Array
(
[NOTIFIY_ORDER_CART_SUBTOTAL_CALCULATE] => NOTIFY_ORDER_CART_SUBTOTAL_CALCULATE
)
)
@ianhg, PM me a link to the site where you're having this issue.
If you actually read the installation instructions in either readme.html, both OPC and Bootstrap indicate that you should merge (not simply overwrite) changes for the template-override files.
That said, the information-sidebox code that comes with the template should take precedence over that shipped with OPC. There are no modifications to OPC required for Bootstrap to interoperate, only that the current version of both be used.
This was found in troubleshooting today. OPC installed in Zen Cart 1.5.8 and then added the new Square WebPay version 1.0.3. We were getting stopped at Confirm Checkout with a token error.
For those wondering about 1.5.8, WebPay works exactly as expected in Zen Cart 1.5.8 WITHOUT One Page Checkout.
If you are going to use both One Page Checkout AND Square WebPay with Zen Cart, you will need to get the OLD square javascript file from includes/modules/pages/checkout_payment/ called jscript_square.php.
Copy or FTP that file to includes/modules/pages/checkout_one/.
The includes/modules/pages/checkout_payment/jscript_square.php is still part of the 1.5.8 distribution zip file. It may not be part of further distros.
Thanks for letting the thread know. You may help others in the future.
I think I found an issue. I noticed this issue under 2.4.4 beta2 and 2.4.4 release version.
Open a fresh browser tab. Add a product to the shopping cart. Click "My Account" link on the bottom (/index.php?main_page=account), it will display the login page (/index.php?main_page=login), which is correct.
Then go back to the shopping cart, click "Go to checkout", then click "Go to checkout" button under the Guest Checkout section. You don't need to fill anything. Go to the bottom of the page then click "My Account" ((/index.php?main_page=account)). You will see error "ERROR_GUEST_CHECKOUT_PAGE_DISALLOWED" on the top of the page. A log file will be generated as the following:
[08-Dec-2022 14:25:27 America/New_York] Request URI: /index.php?main_page=account
#1 checkout_one_observer->messageCheck() called at [/includes/autoload_func.php:61]
#2 require(/includes/autoload_func.php) called at [/includes/application_top.php:222]
#3 require(/includes/application_top.php) called at [/index.php:25]
--> PHP Warning: Use of undefined constant ERROR_GUEST_CHECKOUT_PAGE_DISALLOWED - assumed 'ERROR_GUEST_CHECKOUT_PAGE_DISALLOWED' (this will throw an Error in a future version of PHP) in /includes/classes/observers/class.checkout_one_observer.php on line 258.
Hi @lat9, thanks for your always help.
I just checked my testing site directory, and I did find that file lang.checkout_one_extra_definitions.php under the directory /includes/languages/english/extra_definitions/.
To avoid any mistake, I got a fresh copy from the 2.4.4 zip file and uploaded it again to my directory to overwrite the previous file. Unfortunately, the issue remains...
Also, I used the developer took kit function from zen cart to search keyword "ERROR_GUEST_CHECKOUT_PAGE_DISALLOWED". I can find two files have this keyword:
/includes/classes/observers/class.checkout_one_observer.php
and
/includes/languages/english/extra_definitions/lang.checkout_one_extra_definitions.php
Raised as an issue on Github.
PR created. Thanks Simon.
v2.4.5 of One-Page Checkout is now available for download: https://www.zen-cart.com/downloads.php?do=file&id=2095
This release contains changes associated with the following GitHub issues:
#364: Correct missing language-constant ERROR_GUEST_CHECKOUT_PAGE_DISALLOWED.
#367: HTML5, remove type="text/javascript" from <script> tags.
#368: order_status page, correct PHP fatal error on initial installation on zc157.
#369: Ensure that $_SESSION['customers_email_address'] is set for registered-account creation and guest-checkout.
1.5.8 with PHP 8
BootStrap 3.5.0 -- IMPORTANT
Updating OPC to 2.4.7
Part of the OPC distro includes/modules/sideboxes/YOUR_TEMPLATE/information.php. It is said to not be a core file replacement. This seems to be false if the store is using bootstrap or a bootstrap clone.
If you clone bootstrap to, say, boot_dbltoe it then essentially becomes the "YOUR_TEMPLATE" folder for 1.5.8 running bootstrap.
The directions state to rename the OPC YOUR_TEMPLATE files to whatever your current template is called which would result in the provided OPC file to be renamed to includes/modules/sideboxes/boot_dbltoe/information.php.
When that file is loaded to the store, the original bootstrap information.php is overwritten by the OPC and the following log file occurs along with a partial blank page.
Replacing the OPC information.php file with the original from bootstrap 3.5.0 restores operation to the store.Code:[27-Dec-2022 13:08:33 America/Denver] Request URI: /index.php?main_page=down_for_maintenance, IP address: 255.255.255.255, Language id 1#1 require(/includes/templates/boot_dbltoe/sideboxes/tpl_information.php) called at [/includes/modules/sideboxes/boot_dbltoe/information.php:56]
#2 require(/includes/modules/sideboxes/boot_dbltoe/information.php) called at [/includes/templates/boot_dbltoe/common/tpl_offcanvas_menu.php:97]
#3 require(/includes/templates/boot_dbltoe/common/tpl_offcanvas_menu.php) called at [/includes/templates/boot_dbltoe/common/tpl_header.php:77]
#4 require(/includes/templates/boot_dbltoe/common/tpl_header.php) called at [/includes/templates/boot_dbltoe/common/tpl_main_page.php:125]
#5 require(/includes/templates/boot_dbltoe/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Undefined variable $box_id in /includes/templates/boot_dbltoe/sideboxes/tpl_information.php on line 12.
[27-Dec-2022 13:08:33 America/Denver] Request URI: /index.php?main_page=down_for_maintenance, IP address: 255.255.255.255, Language id 1
#1 require(/includes/modules/sideboxes/boot_dbltoe/information.php) called at [/includes/templates/boot_dbltoe/common/tpl_offcanvas_menu.php:97]
#2 require(/includes/templates/boot_dbltoe/common/tpl_offcanvas_menu.php) called at [/includes/templates/boot_dbltoe/common/tpl_header.php:77]
#3 require(/includes/templates/boot_dbltoe/common/tpl_header.php) called at [/includes/templates/boot_dbltoe/common/tpl_main_page.php:125]
#4 require(/includes/templates/boot_dbltoe/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Undefined variable $column_box_default in /includes/modules/sideboxes/boot_dbltoe/information.php on line 61.
[27-Dec-2022 13:08:33 America/Denver] Request URI: /index.php?main_page=down_for_maintenance, IP address: 255.255.255.255, Language id 1
#1 require(/includes/modules/sideboxes/boot_dbltoe/information.php) called at [/includes/templates/boot_dbltoe/common/tpl_offcanvas_menu.php:97]
#2 require(/includes/templates/boot_dbltoe/common/tpl_offcanvas_menu.php) called at [/includes/templates/boot_dbltoe/common/tpl_header.php:77]
#3 require(/includes/templates/boot_dbltoe/common/tpl_header.php) called at [/includes/templates/boot_dbltoe/common/tpl_main_page.php:125]
#4 require(/includes/templates/boot_dbltoe/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: Undefined variable $column_box_default in /includes/modules/sideboxes/boot_dbltoe/information.php on line 61.
[27-Dec-2022 13:08:33 America/Denver] Request URI: /index.php?main_page=down_for_maintenance, IP address: 255.255.255.255, Language id 1
#1 require() called at [/includes/modules/sideboxes/boot_dbltoe/information.php:61]
#2 require(/includes/modules/sideboxes/boot_dbltoe/information.php) called at [/includes/templates/boot_dbltoe/common/tpl_offcanvas_menu.php:97]
#3 require(/includes/templates/boot_dbltoe/common/tpl_offcanvas_menu.php) called at [/includes/templates/boot_dbltoe/common/tpl_header.php:77]
#4 require(/includes/templates/boot_dbltoe/common/tpl_header.php) called at [/includes/templates/boot_dbltoe/common/tpl_main_page.php:125]
#5 require(/includes/templates/boot_dbltoe/common/tpl_main_page.php) called at [/index.php:94]
--> PHP Warning: require(/includes/templates/boot_dbltoe/common): Failed to open stream: No such file or directory in /includes/modules/sideboxes/boot_dbltoe/information.php on line 61.
[27-Dec-2022 13:08:33 America/Denver] PHP Fatal error: Uncaught Error: Failed opening required 'includes/templates/boot_dbltoe/common/' (include_path='.:/opt/cpanel/ea-php80/root/usr/share/pear') in /includes/modules/sideboxes/boot_dbltoe/information.php:61
Stack trace:
#0 /includes/templates/boot_dbltoe/common/tpl_offcanvas_menu.php(97): require()
#1 /includes/templates/boot_dbltoe/common/tpl_header.php(77): require('/home/hornkati/...')
#2 /includes/templates/boot_dbltoe/common/tpl_main_page.php(125): require('/home/hornkati/...')
#3 /index.php(94): require('/home/hornkati/...')
#4 {main}
thrown in /includes/modules/sideboxes/boot_dbltoe/information.php on line 61
[27-Dec-2022 13:08:33 America/Denver] Request URI: /index.php?main_page=down_for_maintenance, IP address: 255.255.255.255
--> PHP Fatal error: Uncaught Error: Failed opening required 'includes/templates/boot_dbltoe/common/' (include_path='.:/opt/cpanel/ea-php80/root/usr/share/pear') in /includes/modules/sideboxes/boot_dbltoe/information.php:61
Stack trace:
#0 /includes/templates/boot_dbltoe/common/tpl_offcanvas_menu.php(97): require()
#1 /includes/templates/boot_dbltoe/common/tpl_header.php(77): require('/home/hornkati/...')
#2 /includes/templates/boot_dbltoe/common/tpl_main_page.php(125): require('/home/hornkati/...')
#3 /index.php(94): require('/home/hornkati/...')
#4 {main}
thrown in /includes/modules/sideboxes/boot_dbltoe/information.php on line 61.
Had this same problem before but was not able to replicate cause and effect till this time.
On ZC v1.5.8 is it necessary to have both 'lang.' and 'non-lang.' versions of
/includes/languages/english/modules/order_total/YOUR_TEMPLATE/ot_coupon.php
/includes/languages/english/modules/order_total/YOUR_TEMPLATE/ot_gv.php
could I merge both files into a 'lang.' version only?
Excellent, thank you.
Morning =)
So I have a new build 1.5.8 running the latest bootstrap & opc on PHP 7.3 (because of this https://www.zen-cart.com/showthread....ents-Pro-1-5-8) . When the confirm order is pressed nothing happens. I think the issues is also related to PayPal PRO. PHP is downgraded purposely because of the issues (bug) with PayPal PRO on PHP 8.
I also have PM'd you the debug log.Code:[19-Jan-2023 08:17:45 America/New_York] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 134.215.175.155
#1 paypaldp->__construct() called at [/home/xxx/public_html/includes/classes/payment.php:102]
#2 payment->__construct() called at [/home/xxx/public_html/includes/classes/ajax/zcAjaxPayment.php:80]
#3 zcAjaxPayment->prepareConfirmation() called at [/home/xxx/public_html/ajax.php:85]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/xxx/public_html/includes/modules/payment/paypaldp.php on line 282.
[19-Jan-2023 08:17:45 America/New_York] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 134.215.175.155
#1 paypaldp->__construct() called at [/home/xxx/public_html/includes/classes/payment.php:102]
#2 payment->__construct() called at [/home/xxx/public_html/includes/classes/ajax/zcAjaxPayment.php:80]
#3 zcAjaxPayment->prepareConfirmation() called at [/home/xxx/public_html/ajax.php:85]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/xxx/public_html/includes/modules/payment/paypaldp.php on line 282.
[19-Jan-2023 08:17:45 America/New_York] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 134.215.175.155
#1 paypaldp->__construct() called at [/home/xxx/public_html/includes/classes/payment.php:102]
#2 payment->__construct() called at [/home/xxx/public_html/includes/classes/ajax/zcAjaxPayment.php:80]
#3 zcAjaxPayment->prepareConfirmation() called at [/home/xxx/public_html/ajax.php:85]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/xxx/public_html/includes/modules/payment/paypaldp.php on line 283.
[19-Jan-2023 08:17:45 America/New_York] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 134.215.175.155
#1 paypaldp->__construct() called at [/home/xxx/public_html/includes/classes/payment.php:102]
#2 payment->__construct() called at [/home/xxx/public_html/includes/classes/ajax/zcAjaxPayment.php:80]
#3 zcAjaxPayment->prepareConfirmation() called at [/home/xxx/public_html/ajax.php:85]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/xxx/public_html/includes/modules/payment/paypaldp.php on line 283.
[19-Jan-2023 08:17:45 America/New_York] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 134.215.175.155
#1 paypaldp->__construct() called at [/home/xxx/public_html/includes/classes/payment.php:102]
#2 payment->__construct() called at [/home/xxx/public_html/includes/classes/ajax/zcAjaxPayment.php:80]
#3 zcAjaxPayment->prepareConfirmation() called at [/home/xxx/public_html/ajax.php:85]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/xxx/public_html/includes/modules/payment/paypaldp.php on line 283.
[19-Jan-2023 08:17:45 America/New_York] Request URI: /ajax.php?act=ajaxPayment&method=prepareConfirmation, IP address: 134.215.175.155
#1 require_once() called at [/home/xxx/public_html/includes/classes/ajax/zcAjaxPayment.php:177]
#2 zcAjaxPayment->prepareConfirmation() called at [/home/xxx/public_html/ajax.php:85]
--> PHP Warning: require_once(/home/xxx/public_html/includes/languages/english.php): failed to open stream: No such file or directory in /home/xxx/public_html/includes/classes/ajax/zcAjaxPayment.php on line 177.
[19-Jan-2023 08:17:45 America/New_York] PHP Fatal error: require_once(): Failed opening required '/home/xxx/public_html/includes/languages/english.php' (include_path='.:/opt/cpanel/ea-php73/root/usr/share/pear') in /home/xxx/public_html/includes/classes/ajax/zcAjaxPayment.php on line 177
Thanks in advance.
this issue is fixed - please see Known Bugs in 1.5.8 thread.
Awesome thank you. It's kinda hidden a bit =) I'm used to seeing it in Forum: Zen Cart Release Announcements in its' own thread.
It will go there as soon as we release. We haven't released 1.5.8a yet.
So I did the bug fixes... whole file, not search & replace several times... but now when I checkout with a credit card I get
It's also worth noting that I uninstall PP express & PP pro and reinstalled them. I researched the error and triple checked all of the credentials they are correct.Quote:
10002 Security error - Security header is not valid
Transaction results in the security header error, here is the curl log
new build 1.5.8 running the latest bootstrap & opc on PHP 7.3Code:2023-01-20 05:51:45
-------------------
(live transaction) --> https://api-3t.paypal.com/nvp
Request Headers:
Array
(
[0] => Content-Type: text/namevalue
[1] => X-VPS-Timeout: 90
[2] => X-VPS-VIT-Client-Type: PHP/cURL
[3] => X-VPS-VIT-Integration-Product: PHP::Zen Cart(R) - PayPal/NVP
[4] => X-VPS-VIT-Integration-Version: 1.5.8
)
Request Parameters: {DoDirectPayment}
Array
(
[ACCT] => ************5340
[AMT] => 15.98
[BUTTONSOURCE] => ZenCart-DP_us
[CARDISSUE] =>
[CITY] => Woodbine
[COUNTRYCODE] => US
[CREDITCARDTYPE] => Visa
[CUSTOM] => DP-13256-1674211905
[CVV2] => ***
[EMAIL] => [email protected]
[EXPDATE] => 062023
[FIRSTNAME] => xxxx
[INVNUM] => 13256-1674211905-[xxx]
[IPADDRESS] => xxx.xxx.xxx.xxx
[ITEMAMT] => 5.25
[LASTNAME] => xxxx
[L_AMT0] => 5.25
[L_NAME0] => Glass Shaker - Set of 2 [1868]
[L_NUMBER0] => 742
[L_QTY0] => 1
[NOTIFYURL] => https://xxx/new/ipn_main_handler.php
[PAYMENTACTION] => Sale
[PAYMENTREQUEST_0_PAYMENTACTION] => Sale
[PHONENUM] => xxx
[SHIPPINGAMT] => 10.73
[SHIPTOCITY] => xxxx
[SHIPTOCOUNTRYCODE] => US
[SHIPTONAME] => xxxx
[SHIPTOSTATE] => GA
[SHIPTOSTREET] => xxxx
[SHIPTOZIP] => xxxx
[STATE] => GA
[STREET] => xxxx
[ZIP] => xxxx
[METHOD] => DoDirectPayment
[CURRENCYCODE] => USD
[USER] => xxxx_api1.xxxx.com
[PWD] => ****************
[VERSION] => 124.0
[SIGNATURE] => ****************************************************tfB8
)
Response:
Array
(
[TIMESTAMP] => 2023-01-20T10:51:45Z
[CORRELATIONID] => 4ce933a95d3bf
[ACK] => Failure
[VERSION] => 124.0
[BUILD] => 56068150
[L_ERRORCODE0] => 10002
[L_SHORTMESSAGE0] => Security error
[L_LONGMESSAGE0] => Security header is not valid
[L_SEVERITYCODE0] => Error
[CURL_ERRORS] =>
)
DoDirectPayment, Elapsed: 506ms -- Failure
TIMESTAMP=2023%2d01%2d20T10%3a51%3a45Z&CORRELATIONID=4ce933a95d3bf&ACK=Failure&VERSION=124%2e0&BUILD=56068150&L_ERRORCODE0=10002&L_SHORTMESSAGE0=Security%20error&L_LONGMESSAGE0=Security%20header%20is%20not%20valid&L_SEVERITYCODE0=Error&CURL_ERRORS=
Continued in next post as it was too long....
Thanks in advance
~Melanie
Also the following log warning
Also when I install or uninstall pro I get a database error.Code:[20-Jan-2023 05:51:45 America/New_York] Request URI: /new/index.php?main_page=checkout_process, IP address: 134.215.175.155
#1 paypaldp->__construct() called at [/home/xxx/public_html/new/includes/classes/payment.php:102]
#2 payment->__construct() called at [/home/xxx/public_html/new/includes/modules/checkout_process.php:45]
#3 require(/home/xxx/public_html/new/includes/modules/checkout_process.php) called at [/home/xxx/public_html/new/includes/modules/pages/checkout_process/header_php.php:13]
#4 require(/home/xxx/public_html/new/includes/modules/pages/checkout_process/header_php.php) called at [/home/xxx/public_html/new/index.php:35]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/xxx/public_html/new/includes/modules/payment/paypaldp.php on line 282.
[20-Jan-2023 05:51:45 America/New_York] Request URI: /new/index.php?main_page=checkout_process, IP address: 134.215.175.155
#1 paypaldp->__construct() called at [/home/xxx/public_html/new/includes/classes/payment.php:102]
#2 payment->__construct() called at [/home/xxx/public_html/new/includes/modules/checkout_process.php:45]
#3 require(/home/xxx/public_html/new/includes/modules/checkout_process.php) called at [/home/xxx/public_html/new/includes/modules/pages/checkout_process/header_php.php:13]
#4 require(/home/xxx/public_html/new/includes/modules/pages/checkout_process/header_php.php) called at [/home/xxx/public_html/new/index.php:35]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/xxx/public_html/new/includes/modules/payment/paypaldp.php on line 283.
[20-Jan-2023 05:51:45 America/New_York] Request URI: /new/index.php?main_page=checkout_process, IP address: 134.215.175.155
#1 paypaldp->zcLog() called at [/home/xxx/public_html/new/includes/modules/payment/paypaldp.php:1855]
#2 paypaldp->getLineItemDetails() called at [/home/xxx/public_html/new/includes/modules/payment/paypaldp.php:744]
#3 paypaldp->before_process() called at [/home/xxx/public_html/new/includes/classes/payment.php:288]
#4 payment->before_process() called at [/home/xxx/public_html/new/includes/modules/checkout_process.php:98]
#5 require(/home/xxx/public_html/new/includes/modules/checkout_process.php) called at [/home/xxx/public_html/new/includes/modules/pages/checkout_process/header_php.php:13]
#6 require(/home/xxx/public_html/new/includes/modules/pages/checkout_process/header_php.php) called at [/home/xxx/public_html/new/index.php:35]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/xxx/public_html/new/includes/modules/payment/paypaldp.php on line 1266.
[20-Jan-2023 05:51:45 America/New_York] Request URI: /new/index.php?main_page=checkout_process, IP address: 134.215.175.155
#1 paypaldp->_doDebug() called at [/home/xxx/public_html/new/includes/modules/payment/paypaldp.php:1276]
#2 paypaldp->zcLog() called at [/home/xxx/public_html/new/includes/modules/payment/paypaldp.php:1855]
#3 paypaldp->getLineItemDetails() called at [/home/xxx/public_html/new/includes/modules/payment/paypaldp.php:744]
#4 paypaldp->before_process() called at [/home/xxx/public_html/new/includes/classes/payment.php:288]
#5 payment->before_process() called at [/home/xxx/public_html/new/includes/modules/checkout_process.php:98]
#6 require(/home/xxx/public_html/new/includes/modules/checkout_process.php) called at [/home/xxx/public_html/new/includes/modules/pages/checkout_process/header_php.php:13]
#7 require(/home/xxx/public_html/new/includes/modules/pages/checkout_process/header_php.php) called at [/home/xxx/public_html/new/index.php:35]
--> PHP Warning: Use of undefined constant MODULE_PAYMENT_PAYPALDP_DEBUGGING - assumed 'MODULE_PAYMENT_PAYPALDP_DEBUGGING' (this will throw an Error in a future version of PHP) in /home/xxx/public_html/new/includes/modules/payment/paypaldp.php on line 1282.
Code:[20-Jan-2023 05:28:25 America/New_York] Request URI: /new/xxx/index.php?cmd=modules&set=payment&action=install, IP address: 134.215.175.155
#1 trigger_error() called at [/home/xxx/public_html/new/includes/classes/db/mysql/query_factory.php:667]
#2 queryFactory->show_error() called at [/home/xxx/public_html/new/includes/classes/db/mysql/query_factory.php:634]
#3 queryFactory->set_error() called at [/home/xxx/public_html/new/includes/classes/db/mysql/query_factory.php:275]
#4 queryFactory->Execute() called at [/home/xxx/public_html/new/includes/modules/payment/paypaldp.php:1218]
#5 paypaldp->install() called at [/home/xxx/public_html/new/xxx/modules.php:109]
#6 require(/home/xxx/public_html/new/xxx/modules.php) called at [/home/xxx/public_html/new/xxx/index.php:11]
--> PHP Fatal error: 1062:Duplicate entry 'MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY' for key 'unq_config_key_zen' :: INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Merchant Country', 'MODULE_PAYMENT_PAYPALDP_MERCHANT_COUNTRY', 'USA', 'Which country is your PayPal Account registered to? <br /><u>Choices:</u><br /><font color=green>You will need to supply <strong>API Settings</strong> in the Express Checkout module.</font><br /><strong>USA and Canada merchants</strong> need PayPal API credentials and a PayPal Payments Pro account.<br /><strong>UK merchants</strong> need to supply <strong>PAYFLOW settings</strong> (and have a Payflow account)<br><strong>Australia merchants</strong> choose Canada<br><em>(This setting is really about the internal PayPal API specification, and not so much about country: US=1.5, UK=2.0, Canada/Australia=3.0)</em>', '6', '25', 'zen_cfg_select_option(array(\'USA\', \'UK\', \'Canada\'), ', now()) ==> (as called by) /home/home4newxxx/public_html/new/includes/modules/payment/paypaldp.php on line 1218 <== in /home/xxx/public_html/new/includes/classes/db/mysql/query_factory.php on line 667.
PayPal error 10002 means your API credentials are wrong.
btw you should probably bump up to PHP 7.4. 7.3 support was only intended to allow people to do the upgrade; IIRC there are things in 1.5.8 storefront that don't work well with less than 7.4.
ZC 1.5.8
PHP 8.0.17
Template: Modified Stirling Grand (no resemblance)
CSS/JS Loader
CEON URI Mapping
OPC v2.4.5
DPU
Colorbox
Structured Data
IH5
Local dev site. Checking out as a guest, paying by money order and subsequently signing up for an account - Zen Cart does not generate the Welcome Email. No error logs. All emails for other orders/accounts are generated correctly. I enabled full OPC logs and two have been generated:
one_page_checkout-51-2023-02-16.log 180KB
one_page_checkout-na-2023-02-16.log 11KB
I have checked with the live site (ZC 1.5.7d / PHP 7.4 / OPC 2.4.3 / paying by Square) and the same occurs - must have missed that in my checks:(
Any suggestions?
My suggestion is that I (and others) have missed the fact that the welcome email isn't sent out for the past 5 years!
GitHub tracking issue: https://github.com/lat9/one_page_checkout/issues/373
Hi
I am trying to implement opc with edify theme. I have updated the ottotal with respective css selector.
But the order is not getting completed.
I have tried using responsive classic it is working fine.
I believe there is conflicting jquery/jscripts.
Is there any way I can add noconflict to checkout jquery.
Pls advise
Thanks
the edify theme was last updated 2014 and the jquery it is using is 1.11
I have replaced jquery. But when doing so, I get another issue unexpected_token:identifier.
continuing with it I get check_form not defined(when submitting) the order.
attached the snapshot for reference.
https://prnt.sc/00i-4zrnS8J3
Cindy - Can you tell me how to fix this specific behavior?
I have a custom payment option called (Pay Later). It's basically the check/money order module, just renamed to say "PAY LATER".
After the checkout page loads, if I just select the PAY LATER option (and nothing else, leaving everything else default), then when I hit the Submit Order button, the page refreshes and keeps me on the checkout page with an error: "Your order's details have changed. Please review the current values and re-submit."
If I immediately hit the Submit Order button again, it submits and works just fine.
How can I configure the module so that the order submits on the first time? Do I need to have the page refresh after the Pay Later option is selected, much like it refreshes when the shipping options change?
EDIT:
I am using OPC version 2.4.5, and my store is running 1.5.7
By the way, I have the debug log from the attempt. I just didn't know if you wanted me to post it here (it's rather long).
I have this exact same issue with a money order clone using bootstrap 3.5.0, Zen 1.5.8, PHP 7.3 & OPC 2.45. I am also using Square Web 1.04 so I have set no-update, but it doesn't matter the issue persists on refresh & update as well.
Thanks for your hard work =)
~Melanie
I am just posting the current working solution for the error: "Your order's details have changed. Please review the current values and re-submit."
In my case, it only happened when a customer selected the moneyorder payment type and immediately trying to submit your order. Because the moneyorder payment type didn't refresh the page, and because no further information was changed, the checkout form was throwing that error for some reason.
So to to fix this, under the OPC Configuration menu, I added the 'moneyorder' option to the "Payment Methods Requiring Confirmation". So now it looks like this: eway_rapid,stripepay,gps,moneyorder
Now when a customer chooses the moneyorder payment option, it will take them to a new page to confirm their order, and this eliminates that message from popping up.
I am using The One-Page Checkout version number and release date: 1.0.5-beta1 (2016-09-xx)
on my 1.54 site on Responsive Sheffield Blue WWW.GELCANDLECOMPANY.COM. I've been having some customers tell me that they are unable to follow through the checkout and get a blank screen right after they enter c/c info info.
I tried placing an order on my desktop pc and noticed the CONFIRM button was displayed way on the far right which has been unable for some to see.
(see pic)Attachment 20230
When some customers inform me of the trouble I inform that the button is at the far top right and they checkout successfully.
Is there any advice on how I can make the CONFIRM button appear in the center of the page making it more visible for desktop?
Mobile phones appear just fine.
Thanks for your input.
My apologies, but you're asking for help on an OPC version released 6 1/2 years ago (the current version's 2.4.5) and a version of Zen cart that was released 8+ years ago (2014-12-31).
The only help that I can provide (and I realize that it's not exactly hep) is that you need to upgrade your site so that you can make use of current versions of PHP (8.2 is the current as of this writing) as well as the current versions of Zen Cart (currently 1.5.8) and OPC.
The web's infrastructure regarding cookies and other security elements of a website have changed immensely over the past 6-8 years and I'll bet that those underlying changes and requirements are part of your issue.
i agree completely with what lat9 said.
that said, i looked at a bit at your site. i think very little about the author of your template...
but you have a very basic problem as demonstrated from this screenshot.
i'm guessing this problem carries over to OPC, and would need addressing. that is where i would start.
if this problem does not carry over to OPC (i decided to not create an account), i would then pursue all of the updates previously recommended.
the errors i am seeing are visible when accessing the developer tools in your browser.
best.
Hi,
I am having a couple issues with One-Page Checkout than I can't seem to resolve. Any help would be appreciated.
I just did a fresh install of zencart 158a with a database upgrade from 155f (all previous addons removed), One Page Checkout version 2.4.5, using xampp(php) 8.2. I'm using freeshipping, item, and storepickup. With the shipping estimator turned off.
Issue 1) While using guest checkout, I can't seem to delete the last remaining item in the shopping cart.
Issue 2) I'm getting the message "Either the available shipping options or your chosen shipping method's price has changed. Please re-select/review your
desired shipping method." sometimes when going from the shopping_cart.html to the checkout_one page. I don't see a reason why it happens
sometimes but not others.
Issue 3) the continue shopping button takes me to the checkout_one.html page (I would assume it should take me to the main index.php page)
OnepageCheckout log:
Attachment 20233
One question first, if the "Continue Shopping" button takes you to the checkout_one.html page, what configuration setting are you using to accomplish that?
The "Continue Shopping" button seems to take you back to whatever page you were on before you arrived in the shopping cart.
When I'm on the homepage I go to "checkout"-->"shopping cart"-->"continue shopping" then it takes me back to checkout (checkout_one).
If I'm on the homepage and go to "shopping cart"-->"checkout"-->"shopping cart"-->"continue shopping" then it takes me to the homepage.
So I guess the code logic makes sense as written since I'm coming from the "checkout" page. It just threw me off since I was trying to continue shopping but it would send me to checkout.
The "Continue Shopping" button seems to take you back to whatever page you were on before you arrived in the shopping cart.
When I'm on the homepage I go to "checkout"-->"shopping cart"-->"continue shopping" then it takes me back to checkout (checkout_one).
If I'm on the homepage and go to "shopping cart"-->"checkout"-->"shopping cart"-->"continue shopping" then it takes me to the homepage.
So I guess the code logic makes sense as written since in one instance I'm coming directly from the "checkout" page and in the other instance I'm not. It just threw me off since I was trying to continue shopping but it would send me to checkout.
Not sure about this one
ZC 1.5.8a
OPC 2.4.5
Square WebPay
PHP 8.0.28
Just upgraded from ZC 1.5.8 to Z1.5.8a, checking out as a guest using PayPal EC and I get a blank screen when completing the order.
line #2080 isCode:[24-Mar-2023 16:08:15 Europe/London] PHP Fatal error: Uncaught TypeError: zen_get_zone_code(): Argument #2 ($zone_id) must be of type int, string given, called in /home/mydomain_uk/public_html/includes/classes/OnePageCheckout.php on line 2080 and defined in /home/mydomain_uk/public_html/includes/functions/functions_addresses.php:173
Stack trace:
#0 /home/mydomain_uk/public_html/includes/classes/OnePageCheckout.php(2080): zen_get_zone_code()
#1 /home/mydomain_uk/public_html/includes/classes/observers/class.checkout_one_observer.php(597): OnePageCheckout->createPayPalTemporaryAddressInfo()
#2 /home/mydomain_uk/public_html/includes/classes/traits/NotifierManager.php(87): checkout_one_observer->update()
#3 /home/mydomain_uk/public_html/includes/modules/payment/paypalwpp.php(1768): base->notify()
#4 /home/mydomain_uk/public_html/ipn_main_handler.php(75): paypalwpp->ec_step1()
#5 {main}
thrown in /home/mydomain_uk/public_html/includes/functions/functions_addresses.php on line 173
[24-Mar-2023 16:08:15 Europe/London] Request URI: /ipn_main_handler.php?type=ec&markflow=1&clearSess=1&stage=final, IP address:
--> PHP Fatal error: Uncaught TypeError: zen_get_zone_code(): Argument #2 ($zone_id) must be of type int, string given, called in /home/mydomain_uk/public_html/includes/classes/OnePageCheckout.php on line 2080 and defined in /home/mydomain_uk/public_html/includes/functions/functions_addresses.php:173
Stack trace:
#0 /home/mydomain_uk/public_html/includes/classes/OnePageCheckout.php(2080): zen_get_zone_code()
#1 /home/mydomain_uk/public_html/includes/classes/observers/class.checkout_one_observer.php(597): OnePageCheckout->createPayPalTemporaryAddressInfo()
#2 /home/mydomain_uk/public_html/includes/classes/traits/NotifierManager.php(87): checkout_one_observer->update()
#3 /home/mydomain_uk/public_html/includes/modules/payment/paypalwpp.php(1768): base->notify()
#4 /home/mydomain_uk/public_html/ipn_main_handler.php(75): paypalwpp->ec_step1()
#5 {main}
thrown in /home/mydomain_uk/public_html/includes/functions/functions_addresses.php on line 173.
Code:'PAYMENTREQUEST_0_SHIPTOSTATE' => zen_get_zone_code($temp_address['country']['id'], $temp_address['zone_id'], $temp_address['state']),
I wonder if the above is to do with MySql Strict Mode, although I had no problem with the same database version on ZC v1.5.8
(I am running MySQL 5.5.68-MariaDB, I know, but an upgrade is in my sights - I have to update my VPS from CentOS 7 to Alma 8 which is a bit of a headache)
i can not see what strict mode would have to do with it. it does not look to be a database problem.
line 173 expects the zone id to be an integer. it is not.
the question is what is the address? and specifically the zone_id.
you might be able to change line 2080 to:
but i would be curious what the address is. and again what is the zone_id.PHP Code:
'PAYMENTREQUEST_0_SHIPTOSTATE' => zen_get_zone_code($temp_address['country']['id'], (int)$temp_address['zone_id'], $temp_address['state']),
right after line 2073, you could add, something like:
which would create a zc log file with the whole address.PHP Code:
if (!is_int($temp_address['zone_id'])) {
trigger_error(json_encode($temp_address));
}
hope that gives you a couple of ways forward.
best.
Thank you @carlwhat, the zone_id is empty (I don't use zones) - I'm guessing that might be part of the problem. The zc log file with the whole address is
I'll have to say adieu for tonight and pick this up again, tomorrow. I'll look at your changes to line 2080.Code:24-Mar-2023 20:34:06 Europe/London] PHP Notice: {"firstname":"My","lastname":"Name","company":"","street_address":"A Road","suburb":"","city":"A City","postcode":"AB11 1CD","state":"","zone_id":"","country":{"id":"222","title":"United Kingdom","iso_code_2":"GB","iso_code_3":"GBR"},"country_id":"222","format_id":21} in /home/my_server/public_html/includes/classes/OnePageCheckout.php on line 2075
I've just attempted a Square WebPay (v1.0.1) checkout, again as a Guest, and get the same error, albeit not apparently referring to OPC. Can checkout successfully with Square not as a Guest
I wonder if I should focus my attention on includes/functions/functions_addresses.php line #173Code:[25-Mar-2023 09:24:03 Europe/London] PHP Fatal error: Uncaught TypeError: zen_get_zone_code(): Argument #2 ($zone_id) must be of type int, string given, called in /home/mydomain_uk/public_html/includes/modules/payment/square_webPay.php on line 319 and defined in /home/mydomain_uk/public_html/includes/functions/functions_addresses.php:173
Stack trace:
#0 /home/mydomain_uk/public_html/includes/modules/payment/square_webPay.php(319): zen_get_zone_code()
#1 /home/mydomain_uk/public_html/includes/classes/payment.php(288): square_webPay->before_process()
#2 /home/mydomain_uk/public_html/includes/modules/checkout_process.php(98): payment->before_process()
#3 /home/mydomain_uk/public_html/includes/modules/pages/checkout_process/header_php.php(13): require('...')
#4 /home/mydomain_uk/public_html/index.php(35): require('...')
#5 {main}
thrown in /home/mydomain_uk/public_html/includes/functions/functions_addresses.php on line 173
[25-Mar-2023 09:24:03 Europe/London] Request URI: /index.php?main_page=checkout_process, IP address:
--> PHP Fatal error: Uncaught TypeError: zen_get_zone_code(): Argument #2 ($zone_id) must be of type int, string given, called in /home/mydomain_uk/public_html/includes/modules/payment/square_webPay.php on line 319 and defined in /home/mydomain_uk/public_html/includes/functions/functions_addresses.php:173
Stack trace:
#0 /home/mydomain_uk/public_html/includes/modules/payment/square_webPay.php(319): zen_get_zone_code()
#1 /home/mydomain_uk/public_html/includes/classes/payment.php(288): square_webPay->before_process()
#2 /home/mydomain_uk/public_html/includes/modules/checkout_process.php(98): payment->before_process()
#3 /home/mydomain_uk/public_html/includes/modules/pages/checkout_process/header_php.php(13): require('...')
#4 /home/mydomain_uk/public_html/index.php(35): require('...')
#5 {main}
thrown in /home/mydomain_uk/public_html/includes/functions/functions_addresses.php on line 173.
i think a change is in order for square_webPay.
i'm a fan of line 173 in the core code. it requires an integer. square_webPay is not providing it.
am not sure what version you are running, but i will take a look at this next week, as i'm busy this weekend.
as a temporary solution, you can change 173 to:
i think that should work.PHP Code:
function zen_get_zone_code(int $country_id, $zone_id, ?string $default_zone = '')
best.
GitHub tracking issue: https://github.com/lat9/one_page_checkout/issues/375
Hi Cindy and fellow posters. I'm sure this has been addressed but I cannot find it.
I am trying to implement the Reward Point module into 1.5.8.a with BOOTSTRAP and OPC.
On the checkout page, I see the Reward Point block load correctly, but the checkbox is hidden. I cannot figure out what I need to change (CSS? Some other config?).
Here are a couple screenshots.
This image shows what it looks like when you go to the checkout page (notice the missing checkbox).
Attachment 20234
But when you inspect the code, I can see that the checkbox is there (though it doesn't show up).
Attachment 20235
@Jeff_Mash, I'm not sure if Reward points is using zen_display_checkbox_field to (er) display its checkbox field, but if not you can look at how the checkbox for conditions and/or privacy are displayed by the template's /templates/tpl_modules_opc_conditions.php.
Hi Cindy - I don't normally have the Privacy or Conditions set to display during checkout. However, I just enabled it to test and that does display correctly.
Here is a screenshot of that code if it helps:
Attachment 20237
The only other checkbox on the Checkout page is the "Shipping Address, Same as Billing?" option, and that also displays correctly.
Attachment 20236
The only one that seems to be invisible is the Reward Points checkbox, and I can't figure out why (if it's a CSS edit that needs to happen or what).
If there is something else you need me to provide, please let me know. I am grateful for all your help!