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