Hi lat9, I'm testing this one-page checkout module (v2.4.0) right now, and I noticed there might be a mistake for the installation notes. Step G is the following:
"Now, check your store's current /includes/modules/pages/checkout_payment directory's contents. The "base" Zen Cart distribution includes two files in that directory: header_php.php and jscript_main.php. If your directory contains any other files, be sure to copy them to your store's /includes/modules/pages/checkout_one directory. Those additional files come from plugins and additional payment methods and will be required for those modifications to operate correctly in the one-page checkout environment."
I checked the zen cart v1.5.7c and v1.5.7d zip files, there are five files under /includes/modules/pages/checkout_payment folder, which are the following:
header_php.php
jscript_main.php
jscript_double_submit.php
jscript_pmt_support.php
jscript_square.php
Maybe the early version zen cart only comes with 2 files for this folder and but now it have 5 files. It is not critical and you may clarify it in your next update.
Thanks in advance.
Hi Lat9, I just installed this plug-in (v2.4) on my testing site 1.5.7d, php 7.4. Under admin--One-Page Checkout Settings, I have enabled this plug-in. However, this plug-in does not show up like the demo website. The Guest checkout section did not show up if I clicked "Go to checkout" button in the shopping cart. When I checked the log file, I received the exact same warning:
I commented out this line and put your new code there. No warning file is generated but this plug-in still doesn't show up.PHP Code:
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 567.
Ok. I found out why my plug-in didn't show up. After the plug-in is installed, two settings need to be changed manually:
Enable One-Page Checkout?
False => True
Enable Guest Checkout?
False => True
Now it works, other than the warning log generated:
--> PHP Warning: var_export does not handle circular references in /includes/classes/OnePageCheckout.php on line 744.
When debug is ON, I received the following warning:
--> PHP Warning: var_export does not handle circular references in /includes/classes/observers/class.checkout_one_observer.php on line 690.
Line 567 warning is gone, by changing the code provided by Lat9 in the previous posts.
Sorry. zen cart 1.57d with php 7.4.
Shipping modules I'm using are: FedEx (fedexwebservices), USPS (k11), table and store pickup.
Payment modules I'm using are: PayPal pro (US), paypal express and check/money order. paypal standard is installed but not used.
This is a real edge case, just reporting it in case you are working in this area and have an opportunity to fix.
On the checkout_one page, press the Edit button for Billing/Shipping Address.
Add a new address in a different country, press Save Changes.
Shipping does not reflect the new zone.
If you use the dropdown for saved addresses after pressing the edit button, the shipping correctly reflects the selected country's zone, it just fails on adding a new address.
That Software Guy. My Store: Zen Cart Support
Available for hire - See my ad in Services
Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
Do you benefit from Zen Cart? Then please support the project.
I did some tests on my site. This plug-in is slow. Here is what I found.
Under the checkout page, if I selected a different shipping method in the shipping quote section, jquery-3.5.1.min.js will be reloaded remotely. It will take more than 1000ms to load this script. When I first enter this checkout page (shipping method is not selected), jquery-3.5.1.min.js is always loaded from cache with no delay. Even I refresh the whole checkout page, this script will be always loaded from the cache. But I don't know why it will be force to load from remote server when I choose a different shipping method every time, not from the cache. If this script file can be loaded from cache as well, it will be much faster. There is an option "Load Minified Script Files?" under the plug-in settings page. I tried both true and false, no difference. jquery-3.5.1.min.js will be loaded by both ways. Not sure if it is related to the warning generated before.
I tried the recommended code for jquery.checkout_one.js from @niccol post, seems better (by the original code, firefox sometimes will pop up slow load warning, new code does not show warning), but still over 1000ms.
PHP Code:
// -----
// Monitor the billing- and shipping-address blocks for changes.
//
jQuery(document).on('change', '#select-address-bill', function(event) {
jQuery('#checkoutPayment > .opc-overlay').addClass('active');
useSelectedAddress('bill', this.value);
});
jQuery(document).on('change', '#select-address-ship', function(event) {
jQuery('#checkoutPayment > .opc-overlay').addClass('active');
useSelectedAddress('ship', this.value);
});
Last edited by njcyx; 13 May 2022 at 03:40 PM.
Maybe my last post is not correct. I double checked the results from my browser's network console, when I selected a different shipping method, File called is "act=ajaxOnePageCheckout & method=updateShipping" Initiator is jquery-3.5.1.min.js. So it looks like JS script is pulled and updated something on the background. My site uses usps and fedex modules. When I select different FedEx shipping methods, the processing time is over 1000ms. When I select different USPS shipping methods, the time is about 800-900ms. When I selected store pickup, the time is only ~100ms. So there is a processing difference between two shipping modules. See screenshot attached.
![]()
Hi
I have installed the square payment method. I have two flat rate shipping methods enabled on the site.
When I change the shipping method at opc, the credit card fields goes missing. They are showing only refreshing the page.
Can any one please what is wrong.
Thanks
Balaji R
Bookmarks