Nope. Does not mean anything to me. It does not look like missing files so that is usually the extent of what I can understand.Quote:
Look at the log files anyway!
Hope this will help a bit,
Cheers,
jpda
Printable View
Nope. Does not mean anything to me. It does not look like missing files so that is usually the extent of what I can understand.Quote:
Look at the log files anyway!
Hope this will help a bit,
Cheers,
jpda
Right, I'm saying that the Troubleshooting section needs to be updated to identify the cause of this issue (missing jQuery selectors).
That log indicates that the file /includes/templates/template_default/templates/tpl_checkout_one_default.php is missing.
Hi there
I have been through the thread and saw someone had a similar issue but I followed it all and no resolution.
1) It was working fine when I installed my new payment gateway "ipaybySSL" by SCNET.
2) needed to fix the page where customers can change delivery address so resolved this as a result of this updated my old version 1.0x to the latest and followed installation instructions to the tee.
3) Now I get the error: Your order's details have changed. Please review the current values and re-submit.
Running zen version 1.5.4
ozpost module and the winchester responsive template.
As it is late here 2.21am I have had to turn the module off just in case some people try and purchase when there is not an issue with payments going through.
but when I wake up I can turn it on if you need to test it.
The website is www.jarsbottlesdirect.com.au
thanks in advance for your help
Stephen, that would imply that there's something that the payment method is doing that OPC doesn't like. I'll be in-and-out over the next few days, preparing for Irma's visit.
I wish you luck and godspeed and I hope for the best with the 'visit' of horrible Irma! :shocking:
Good luck!
jpda
For those of you using Image Handler and One-Page Checkout ...
Please refer to this IH4 issue that @torvista identified last year. I've found that IH4's imagehover script will interfere with OPC's operation if the changes that Steve proposed aren't incorporated.
I'll update the OPC readme to reflect this requirement and will get those changes incorporated into the next version of Image Handler.
I don't know if this goes with OPC or under credit card payment module. Please move if it goes elsewhere.
I entered a customer credit card number and transposed two numbers. After clicking on Submit Order nothing happened. I believe their used to be a Pop-up saying invalid credit card number. I discovered this by entering the CC again. This was a Visa card.
@EZorb, what payment method are you using?
I've replicated this issue on my demo site. The "invalid card" message is coming back from a.net, but isn't getting posted to the One-Page Checkout's data-gathering page. I'll note this as an issue in the plugin's GitHub repository; it might take me a couple of days for resolution.
We were lucky and "dodged the Irma bullet" with just a couple of trees and a lot of branches down.
OK, so a couple of days turned into a couple of weeks. Looking at this issue, I'm starting to form the opinion that it's a base Zen Cart issue with the AJAX confirmation. When the 'invalid card' message is received, the AJAX processing is redirecting back to the checkout_payment page for the display instead of returning the information "in-line" on the AJAX call.
Just in case it's my setup, would you verify that you don't receive the message when One-Page Checkout is disabled (i.e. going through the standard, 3-page version)?
@CaroleAs, you'll be just fine with IH4 and One-Page Checkout. Just make the changes identified in the link I posted.
I found the hover in IH annoying anyway so I turned it off in the admin panel, and removed the jscript_imagehover file altogether from the templates/YOUR TEMPLATE/jscript folder. Didn't create any problems that I'm aware of.
I've just submitted v1.4.1 to the Zen Cart plugins for review, containing the changes associated with the following GitHub issues:
#100: Update "Troubleshooting" section in readme.
#101: Display errors from payment modules that "collect credit-card data onsite".
#102: Correct display of confirmation page for payment modules that "collect credit-card data onsite".
I'll post back here once it's been approved.
" setFormSubmitButton, payment-module: null index.php:226:13
Showing "confirm" index.php:226:13
Setting orderConfirmed (0), submitter (null) index.php:226:13
jQuery version: 1.12.4"
I am facing this issue right now. i already find same issue posted by frank18 and tried his solution but it did not work for me.
@shopVille, you've included some of the OPC's jQuery console-logs that identify the sequence that's been performed; they're not an indication of any error.
What is the issue that you are having? Please include OPC and Zen Cart versions in your response.
we are using zencart version 1.5.4 and OPC version is 1.4.1. Here is what i am getting in my one page checkout. First of all there is error "Sorry, but our expedited checkout process cannot be used. Click " and after clicking Confirm Order Its showing another error "Your order's details have changed. Please review the current values and re-submit."
The "Sorry but the expedited process cannot be used" message implies a javascript/jQuery error on the page. Since OPC is very jQuery-intensive, the message is intended to allow your customers to continue checkout if the store's configuration won't support that jQuery support.
What shipping, payment and order-total methods are you using?
I also am getting "Your order's details have changed. Please review the current values and re-submit." it is like loop and I cannot get past it.
Setup:
OPC 1.4.1
zenCart 1.55e
The default "responsive_classic"
Payment: Third party credit card payment
can you help me? thanks.
Firstly, thanks to lat9 and all contributors for your hard work to develop this great plugin and assist the Zencart community. I appreciate it!
After getting OPC 1.4.0 to work successfully and then moving on to load further plugins, at an unknown point, I started experiencing a problem during the OPC process.
Now, at the Shopping Cart page, clicking CHECKOUT button generates an error log (attached with OPC debug file). While the Select Shipping/Payment and Confirm Your Order page then appears, clicking CONFIRM ORDER button doesn’t proceed further.
Attachment 17436Attachment 17437
Can anyone please help?
My current system:
- zen-cart-v1.5.5e
- running on local WAMP with SSL (apache 2.4.23; mysql 5.7.14; php 5.6.25)
- Template: clone of responsive_sheffield_blue_2.0 with recommended code changes from that thread e.g. for compatibility with ZC1.5.5
- Plugins as well as OPC v1.4.1:
- Direct Bank Deposit V1.5.3-revised;
- Australia Post Shipping Module v2.2.1,
- Image Handler 5.0.0Beta4
- Other adminy ones e.g. ckeditor-for-zencart_v3.7; backup_mysql_plugin_v5c
Things I’ve tried: When the problem first arose & after seeing similar error logs on this thread, I upgraded to OPC 1.4.1 – but the error didn’t resolve. After getting stumped by the error log (apologies, I’m a very inexperienced coder still learning), I tried tweaking Admin settings, reverting to earlier backups, uninstalling/reinstalling various plugins etc … but error persists. Interoperation issues seem ruled out between OPC & both IH5 plugin (lat9 confirmed this on another thread - thanks!) and Australia Post Shipping Module plugin (error persisted after uninstalling that plugin).
Thanks
Thanks Gerri - yes piddling down steadily here in Caloundra.
Any info is welcome, if you want to you could zip up the entire file system and also export the DB, email both to me office [at] isonetwork [dot] net [dot] au, and I whack it into my local dev environment.
Cheers / Frank
I received the OPC log and can confirm that the payment method that you are using is not compatible with OPC. It adds information to the customer's session during the transition from the data-collection to the confirmation step of the checkout.
You can try adding your custom payment method to the list of payment modules that require confirmation (see the OPC plugin's configuration settings).
When the "Confirm Order" button shows but doesn't proceed, there's likely a jQuery/javascript issue that's preventing that action.
Most modern browsers provide a "console" display in their developer's view; pressing F12 and then selecting the "Console" tab will allow you to view the status on the OPC page.
I can't explain that debug-log; it almost looks like the shopping cart was/is empty?
Thanks, lat8
I've taken screen shots of the F12 display in Firefox both:
- before the CHECKOUT button is pressed (showing the shopping cart items - no, it wasn't empty:no:) - Attachment 17447
- when the CHECKOUT button was pressed - Attachment 17446
And for completeness, here's the debug files generated with these: Attachment 17445 Attachment 17444
Thanks for your kind offer, Frank:smile:. I started zipping the files, but got called away. If this F12 report doesn't point us in the right directly, I'll complete that task and email them to you.
Cheers...Gerri
Thanks, lat8.
I've taken screen shots of the Firefox F12 display both:
- before the CHECKOUT button is pressed (showing the shopping cart items - no, it wasn't empty:no:) - Attachment 17451
- when the CHECKOUT button was pressed - Attachment 17450
And for completeness, here's the debug files generated with these: Attachment 17449 Attachment 17448
Thanks for your kind offer, Frank:smile:. I started zipping the files, but got called away. If this F12 report doesn't point us in the right directly, I'll complete that task and email them to you.
Cheers...Gerri
Since I'm unsure whether the F12 report provided above is taken pointing to the time the error occurs, here's the Firefox F12 reports in sequence:
1. Here's a snapshot of the Shopping Cart (Attachment 17455) and the F12 report that matches this (Attachment 17456
2. Then I click the CHECKOUT button
3. These error logs are generated (Attachment 17457) and I am moved to the next screen with this F12 report (Attachment 17458.
Hope I got it right for you.
Cheers...Gerri
What payment method(s) are you using? That myDEBUG*.log file references line 354 of the (presumed default) Zen Cart 1.5.5e order.php class, where the cart contents are being turned into an order. For some reason the "payment" class isn't being loaded.
For the F12 display, you're showing the "Inspector" tab (i.e. the low-level layout of the page); what I need to see is the contents of that "Console" tab to its right.
The file order.php file is default: version: Author: DrByte Fri Jan 1 12:23:19 2016 -0500 Modified in v1.5.5
I'm using Direct Bank Deposit v 1.5.3 revised with changed code to remove the "bank cheque" option from the plug-in. I thought this wasn't the culprit since, during my testing (if I remember correctly):
- the amended plugin worked without the error when I disable OPC,
- I uninstalled that plugin when (like you) I found line 354 read: 'payment_method' => $GLOBALS[$class]->title. This resulted in the same error when I used ZC's Cash on Delivery module instead.
In case I'm wrong and my amendments are the problem, here's copies of those two amended files (C:\wamp64\www\includes\modules\payment\dirbankaus.php & C:\wamp64\www\includes\languages\english\modules\payment\dirbankaus.php): Attachment 17461
Apologies. Here they are. F12 Console reports generated:
- at Shopping Cart page before CHECKOUT Button pressed: Attachment 17462
- at Select Shipping...page (after error log generated): Attachment 17463
- when I clicked various payment/shipping options on that page & clicked CONFIRM ORDER: Attachment 17464
I've also saved Debugging tab excerpts displayed on clicking some links in the Console view. However, they're big and I haven't worked out how to save or print those...so just used Snip-it.
Thanks again for looking at these.
Ah, it was the last image that you posted, showing the OPC's console logs when you're trying to change payment/shipping options.
I didn't look back through your postings to see what template you're using, but whatever it is the template file /jscript/jscript_framework.php is not being loaded (that is where the zcJS function is defined). That zcJS jQuery function is the method that OPC uses to do its AJAX "magic".
What version of Zen Cart are you using (again, being lazy)?
Using
- ZC1.5.5e
- jscript_framework.php version: OPC v1.4.1 (I checked just now with Beyond Compare to confirm this)
- Responsive Sheffield Blue v2.0 template with ZC1.5.5 compatibility code changes applied. This included reverting to the ZC1.5.5e version of jscript_framework.php.
So when I installed the OPC 1.4.1, I used that OPC version of ../includes/templates/MY_TEMPLATE/jscript/jscript_framework.php without merging.
Should I have merged the ZC and OPC versions? I did look at this with Beyond Compare...but to a newbie like me, the changes seemed such that adopting the OPC version seemed the wisest choice.
Thanks
Hi,Cindy,i am uyutom,i have updated the plugin’s Configuration->One-Page Checkout->Payment Methods Requiring Confirmation to add ,SecurityPayment to the existing list. But also messge "Your order's details have changed. Please review the current values and re-submit." i have send to email for error log,can you help me?
In case others have experienced similar issues...following on from Post #637, lat9 kindly worked with me off-line and we found a resolution :clap:using Firefox's F12 and Control-U functions. Thanks very much to lat9 for her assistance:D!
First, lat9 found a coding error where I accidentally omitted a "-" in "-->" in my amended html_header.php file (commenting out the zcJS function). When that didn't resolve the error, using the same debug methods, I found a bracket error in line 82 of the \includes\templates\My_TEMPLATE\jscript\jscript_framework file. I corrected that and got OPC working :p.
This issue may not be relevant to everyone since once OPC started operating correctly, reverting back to the original uncorrected file didn't duplicate the error :huh:. lat9 then provided me with a replacement file.
Thanks again! Very grateful for all assistance!
I installed the latest version of OPC
When submit the confirm button it goes in a loop and the checkout one page shows the message "Your order's details have changed. Please review the current values and re-submit". I read several messages about the same problems, but with no result. I really want to use OPC, so any help is welcome.
What Zen Cart version? What template are you using? What shipping, payment and order-total modules?
If possible (i.e. you're not testing on a local computer) could/would you post a link to the site? If you don't want it public, you can send me the link via PM.
Please note that the message you identified can result from a bunch of different underlying issues.
I have ZC1.5.5d
My shop is www.jolion.nl, although the site is in development.
I learned in here that is can have several causes, but I can't put my finger on the right one.
Thank you in advance for helping me!
Test account credentials received! The cause of the message, I believe, is that the modifications made to the tpl_checkout_one_default.php file have rendered the page's HTML invalid.
Since much of the OPC's processing involves jQuery processing of the page, invalid HTML can confuse the data-gathering performed when that "Confirm" (or "Review") button is pressed.
I'd suggest updating the changes you've made to the template to restore its valid HTML; I'm pretty sure that with valid HTML you'll have the OPC working.
Hi Lat9, thanks for your help so far! I have installed again the original tpl_chechout_one_default and figth my way through WS3 validator. Most of the errors comes from the main page, but I was able to tackle them all! The page is error free for now, but still no confirmation page and still have the error message "Your order's details have changed. Please review the current values and re-submit.".
In IE10 F12 console I see a error. See the attached image.
Attachment 17487
Do you have any clue how to fix this?
@jolion, please follow these instructions to create a OPC log; I'll send you my direct email via PM and you can email the log to me once you've created it.
- Make sure that your admin's Configuration->One Page Checkout->Debug is set to true.
- Log into your site, place an item in your cart and click the "Checkout" button.
- Using your webhost's cPanel's File Explorer or via FTP, delete any existing /logs/myDEBUG-one-page-checkout*.log files.
- Click the "Confirm Order" button.
- Navigate to your site's /logs directory, copy that most recent one-page-checkout log and email it to me.
Okay, here we go. haredoDOTcom 1.5.5a with latest Square and OPC. MySQL 5.6.37 PHP 5.6.3 Apache linux 3.10.0
Nothing else in the payment/checkout area that would effect checkout.
- User is not logged in NOR is user in customer database.
- User selects item for shopping cart. (https://haredoDOTcom/index.php?main_...&products_id=6)
- User adds to cart
- User clicks on checkout and is shown split checkout page.
- User selects PayPal Checkout
- User taken to PayPal for payment
- User selects Payment Type and continues
- PayPal returns user to haredoDOTcom for confirmation
- Confirmation button does not work.
Read me and troubleshot with F12 to discover hidden errors in Squre which led us to find that a file was not included in the newest release of Square Payment Module. CreateOrderRequestOrder.php is the file and changing it to .xxx vs .php cured a small problem with Square that was NOT throwing an error. Will post that part in Square Payment thread. Found another Square file that was not properly updated and fixed that.
Those repairs got us to the point that using the confirm order button would at least fire something in the F12 Console.
The system is crashing when I try to add the F12 Log so I'll have try in next thread
here's the F12 logCode:index.php?main_page=checkout_one:25 A parser-blocking, cross site (i.e. different eTLD+1) script, https://code.jquery.com/jquery-1.12.0.min.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.(anonymous) @ index.php?main_page=checkout_one:25
index.php?main_page=checkout_one:25 A parser-blocking, cross site (i.e. different eTLD+1) script, https://code.jquery.com/jquery-1.12.0.min.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus.com/feature/5718547946799104 for more details.
(anonymous) @ index.php?main_page=checkout_one:25
index.php?main_page=checkout_one:247 setFormSubmitButton, payment-module: paypalwpp
index.php?main_page=checkout_one:247 Showing "confirm"
index.php?main_page=checkout_one:247 Setting orderConfirmed (0), submitter (null)
index.php?main_page=checkout_one:247 jQuery version: 1.12.0
paymentform:1 Uncaught Error: SqPaymentForm element with id `square_cc-number` not found. Has the DOM finished loading?
See: https://docs.connect.squareup.com/articles/adding-payment-form/#generatingpaymentform
at s.buildIframeController (paymentform:1)
at s.buildIframeControllers (paymentform:1)
at s.build (paymentform:1)
at s.build (paymentform:1)
s.buildIframeController @ paymentform:1
s.buildIframeControllers @ paymentform:1
s.build @ paymentform:1
s.build @ paymentform:1
mycontentscript.js:13 KGen:Page => Ready !
index.php?main_page=checkout_one:247 submitFunction, 2 arguments: 0, 0,
index.php?main_page=checkout_one:247 Current order total: 11.31, text: $11.31
index.php?main_page=checkout_one:247 submitFunction, on exit submitter=null
index.php?main_page=checkout_one:247 Setting orderConfirmed (1), submitter (null)
index.php?main_page=checkout_one:247 Submitting order-creating form
index.php?main_page=checkout_one:247 Updating shipping method to usps_First-ClassTM Package Service, processing type: submit
index.php?main_page=checkout_one:50 {cache: false, type: "POST", traditional: true, dataType: "json", timeout: 5000, …}
index.php?main_page=checkout_one:247 Shipping method updated, error: false
index.php?main_page=checkout_one:247 Form submitted, type (submit), orderConfirmed (1)
index.php?main_page=checkout_one:247 Form checked, passed (true)
index.php?main_page=checkout_one:675 Uncaught TypeError: Cannot read property 'checked' of null
at HTMLFormElement.<anonymous> (https://haredo.com/index.php?main_page=checkout_one:675:125)
at HTMLFormElement.dispatch (https://code.jquery.com/jquery-1.12.0.min.js:3:12344)
at HTMLFormElement.r.handle (https://code.jquery.com/jquery-1.12.0.min.js:3:9071)
at Object.trigger (https://code.jquery.com/jquery-1.12.0.min.js:3:11471)
at HTMLFormElement.<anonymous> (https://code.jquery.com/jquery-1.12.0.min.js:3:18895)
at Function.each (https://code.jquery.com/jquery-1.12.0.min.js:2:2881)
at n.fn.init.each (https://code.jquery.com/jquery-1.12.0.min.js:2:846)
at n.fn.init.trigger (https://code.jquery.com/jquery-1.12.0.min.js:3:18871)
at n.fn.init.n.fn.(anonymous function) [as submit] (https://code.jquery.com/jquery-1.12.0.min.js:4:16189)
at Object.<anonymous> (https://haredo.com/index.php?main_page=checkout_one:554:75)
(anonymous) @ index.php?main_page=checkout_one:675
dispatch @ jquery-1.12.0.min.js:3
r.handle @ jquery-1.12.0.min.js:3
trigger @ jquery-1.12.0.min.js:3
(anonymous) @ jquery-1.12.0.min.js:3
each @ jquery-1.12.0.min.js:2
each @ jquery-1.12.0.min.js:2
trigger @ jquery-1.12.0.min.js:3
n.fn.(anonymous function) @ jquery-1.12.0.min.js:4
(anonymous) @ index.php?main_page=checkout_one:554
i @ jquery-1.12.0.min.js:2
fireWith @ jquery-1.12.0.min.js:2
e.(anonymous function) @ jquery-1.12.0.min.js:2
success @ index.php?main_page=checkout_one:58
i @ jquery-1.12.0.min.js:2
fireWith @ jquery-1.12.0.min.js:2
y @ jquery-1.12.0.min.js:4
c @ jquery-1.12.0.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.0.min.js:4
ajax @ jquery-1.12.0.min.js:4
(anonymous) @ index.php?main_page=checkout_one:70
Deferred @ jquery-1.12.0.min.js:2
zcJS.ajax @ index.php?main_page=checkout_one:36
changeShippingSubmitForm @ index.php?main_page=checkout_one:488
(anonymous) @ index.php?main_page=checkout_one:588
dispatch @ jquery-1.12.0.min.js:3
r.handle @ jquery-1.12.0.min.js:3
Further investigation shows that Square Payment is somehow inserting itself into the OPC proccess. We were gettingAnd, we still got the error without OPC using PayPal and the standard, three-page checkout.Code:paymentform:1 Uncaught Error: SqPaymentForm element with id `square_cc-number` not found. Has the DOM finished loading?
See: https://docs.connect.squareup.com/articles/adding-payment-form/#generatingpaymentform
at s.buildIframeController (paymentform:1)
at s.buildIframeControllers (paymentform:1)
at s.build (paymentform:1)
at s.build (paymentform:1)
s.buildIframeController @ paymentform:1
s.buildIframeControllers @ paymentform:1
s.build @ paymentform:1
s.build @ paymentform:1
PayPal brings the customer back to OPC and Square is looking for the cc number.
When PayPal brings the customer back to Step 2 of 3 in the standard checkout, the Square error is also there BUT, it disappears when the customer goes to Step 3 of 3. Once on Step 3 of 3, PayPal will confirm even with Square turned on as the error disappears between steps 2 and 3.
The system goes through all steps including registering the New Customer, emailing info, order shows up, etc.
Again, ALL failed testing is done as never before customer, using PayPal from Split-Page Login.
Conversely, when a logged-in user orders an item and clicks on Checkout (OPC ON - Square ON), the OPC is shown with the options for a CC or PayPal Express. Choosing PayPal Express and clicking Confirm takes the logged-in user to PayPal and completes the order on return. It does not return to OPC to give the user the option to confirm but, goes immediately to completion.
Synopsis:
We were wondering why some PayPal orders were coming in and we were getting emails that PayPal would not allow others to check out. Current trials result in:
1. Customer NOT logged in and NOT a previous customer with both Square and OPC enabled
* Places item in cart
* Selects Check Out
* Arrives a split-login
* Selects PayPal Express
* Browser opens PayPal
* Customer selects method of payment and pays
* Browser returns to site with "uncaught Error" from Square
* Customer is unable to complete the transaction as the Confirm Order Button does nothing
2. Returning Customer Or Newly Registered Customer, logged in with both Square and OPC enabled.
* Places item in cart
* Selects Check Out
* Arrives at OPC with options for Square, PayPal, or Money Order
* Selects PayPal Express
* Browser opens PayPal
* Customer selects method of payment and pays
* Browser returns to site and completes the transaction without requiring any further action from the Customer
We are still not certain whether Square or OPC is the culprit but, one of them is "sticking it's nose in where it doesn't belong.":P
Sorry, didn't catch my error until after edit time.should readQuote:
Further investigation shows that Square Payment is somehow inserting itself into the OPC proccess. We were getting
Quote:
Further investigation shows that Square Payment is somehow inserting itself into the OPC proccess when a non-logged in customer selects PayPal Express from the split-login page. We were getting
@dbltoe, thanks for the detailed investigation. I'm in the middle of another investigation right now, but will give this a look real-soon-now.
Thank You Cindy
Give me an hour it will be there and I will PM you the access credentials
PM sent
@dbltoe and @haredo, rather than replying with quote I thought I'd save the zen-cart site a little storage.:P
My initial hunch is that there's something that OPC needs to do to "convince" Square that the payment method is already determined and that it (and any other payment-module except for Express Checkout) can "bow out".
OK, I've had a chance to look into this a bit more. It turns out that there is also an issue with OPC and payeezyjszc during PayPal Express Checkout (i.e. like the customer can't complete their PP-ec purchase due to a jQuery issue).:oops:
The issue with OPC (and possibly the 3-page-checkout mode as well) is that all enabled payment methods are being loaded when the current order is being paid with PayPal-ec and some of those methods' javascript/jQuery scripts are getting confused since their payment-selections aren't rendered during "special checkout".
It might take me a couple of days, but I've at least got a direction to look!
The issue with the integration of PayPal Express Checkout, One-Page Checkout and payment methods that use a separate checkout_payment page jscript module is as follows.
Requirements to "expose" the issue:
The site has enabled the PayPal Express Checkout (and its shortcut button) and either Square or Payeezyjs in addition to One-Page Checkout.
A new customer chooses to pay via the PP-EC shortcut button and the email address associated with the customer's PayPal account is not associated with a customer on the site.
The problem:
The jscript processing associated with those payment methods (and possibly others) currently loads so long as the associated payment-method is enabled in the admin. When the customer makes a purchase using the PP-ec Shortcut button, the payment-gathering page is rendered only with the PayPal-related form elements. Unfortunately, the jscript for these payment methods assumes that its form-elements have been rendered if the jscript is loaded. When that jscript attempts to verify settings of an unrendered HTML element, a javascript error is raised; that error subsequently results in the One-Page Checkout's "Confirm Order" button failing to activate.
The solution:
Unfortunately, this change requires updates to both the One-Page Checkout and the payment-methods' processing.
First, the OPC's entry-page processing will check to see if the customer is currently in "special checkout" (a.k.a. checkout using the PP-ec shortcut) and, if so, "resets" the payment methods to activate only the special-checkout payment method. Note that this is a chicken/egg situation, since for OPC to determine whether or not the customer is in "special checkout", all currently-enabled payment methods must be loaded.
When OPC sees that the customer is in "special checkout", OPC reloads the payment methods to specify that the active payment-method is the "special checkout" one. This does not remove the object-instances associated with the other enabled payment methods, but does ensure that only the active payment-method will be called for subsequent payment actions.
Secondly, each payment-method that has a separate jscript_*.php module requires update to that module's loading to ensure that the associated javascript is only loaded when the customer is not in "special checkout".
The changes:
The file /includes/modules/pages/checkout_one/header_php.php:
This change is available on the OPC plugin's GitHub repository.Code:// load all enabled payment modules
require DIR_WS_CLASSES . 'payment.php';
$payment_modules = new payment;
// -----
// Check to see if we're in "special checkout", i.e. the payment's being made via the PayPal Express
// Checkout's "shortcut" button. If so, "reset" the payment modules to include **only** the payment
// method presumed to be recorded in the current customer's session.
//
if ($payment_modules->in_special_checkout()) {
unset($payment_modules);
$payment_modules = new payment($_SESSION['payment']);
}
$payment_selections = $payment_modules->selection();
$flagOnSubmit = count($payment_selections);
The jscript_square.php module, distributed as part of the Square payment-method:
The jscript_payeezy.php module, distributed as part of the PayeezyJsZc payment-method:Code:if ($payment_modules->in_special_checkout() || !defined(MODULE_PAYMENT_SQUARE_STATUS) || MODULE_PAYMENT_SQUARE_STATUS != 'True' || (!defined('MODULE_PAYMENT_SQUARE_APPLICATION_ID') || MODULE_PAYMENT_SQUARE_ACCESS_TOKEN == '')) {
return false;
}
I'll be cross-posting a link to this post to the Square and PayeezyJsZc payment methods' support threads.Code:if ($payment_modules->in_special_checkout() || !defined(MODULE_PAYMENT_PAYEEZYJSZC_STATUS) || MODULE_PAYMENT_PAYEEZYJSZC_STATUS != 'True' || (!defined('MODULE_PAYMENT_PAYEEZYJSZC_JSSECURITY_KEY') && !defined('MODULE_PAYMENT_PAYEEZYJSZC_JSSECURITY_KEY_SANDBOX') )) {
return false;
}
Shouldn't the modification to the other payment methods depend on the use of this plugin instead of always returning false if in special_checkout?
I've just submitted v1.4.2 of the One-Page Checkout to the Zen Cart plugins for review. Once reviewed and made available, the update can be downloaded from here.
That version contains the changes (both to the OPC's code and readme) associated with changes required for proper integration of the PayPal Express Checkout's shortcut button. Please refer to post#90 (above) of this support-thread for additional information.
I'll post back here once the download is available.
Version 1.4.2 of One-Page Checkout is now available for download from the Zen Cart plugins section.
I've just submitted v1.5.0 of One-Page Checkout to the Zen Cart plugins' area for review; I'll post back here when it's available for download.
This version contains the changes associated with the following GitHub issues:
#104: Defer installation until admin login.
#105: Split template blocks into separate files for easier re-arrangement
#106: Move jQuery processing to separately-loaded .js file, with minified version.
It's a major move forward in OPC's release, making it easier to customize since each of the major template "blocks" (e.g. payment-address, shopping-cart) are moved to a separate file. That way, you can move the blocks around more easily by simply updating your template's version of tpl_checkout_one_default.php.
In addition, the main page's jQuery processing has been split into a constant-setting file that then loads the actual jQuery processing (full-size or minified, based on an admin configuration setting). This allows (a) the ever-growing script file to be minimized and (b) for that file to be loaded after the page has been rendered by the browser ... both page-level load-time improvements.
If I have plugin reward points, I have to add this to one page checkout correct? like it's done for ot_coupon module? Thanks
Partially working. I upgraded to 1.4.2 on a client site using 1.5.5f.
It works when paying via check/money order but not PayPal Express (selected on the payment page, not the shopping cart). I have not tried PayPal Payments Pro but that is the third payment option.
Shipping modules include:
Flat Rate
Free Shipping Options
Store PickUp
USPS
Order Total modules include:
ot_categoryorderfee
ot_coupon
ot_group_pricing
ot_insurance
ot_loworderfee
ot_manufacturer_discount
ot_reward_points (I did include the two changed per the instructions)
ot_reward_points_display
ot_shipping
ot_subtotal
ot_tax
ot_total
I know it's a lot. I can send the error log as well.
Thanks I see that now; quick question it says to add this code in ot_reward_points.php after function collect_posts
Here is the code in that function. Do I need to replace this code with one above?PHP Code:
if (isset($_SESSION['redeem_flag']) && $_SESSION['redeem_flag'])
$_POST['redeem_flag'] = $_SESSION['redeem_flag'];
PHP Code:
function collect_posts()
{
if($_REQUEST['redeem_checkout_flag'])
if((isset($_REQUEST['redeem_flag']) && $_REQUEST['redeem_flag']) || (isset($_REQUEST['redeem_points']) && $_REQUEST['redeem_points']>0))
{
$_SESSION['redeem_points']=$this->get_points_redeeming();
$_SESSION['redeem_value']=$_SESSION['redeem_points']*GetRedeemRatio($_SESSION['customer_id']);
}
else
$this->clear_posts();
}
Jeking What errors you get?
The issue is with the ot_insurance "addition" to the order. On entry to the OPC confirmation page, the order's total is $160.08 and after running the "final" order-totals, the ot_insurance is adding an 'insurance' flag to the session ($_SESSION['insurance']) and updating the order's total to $162.08.
The "loop" is causes since the session-based information about the total has changed ... don't want to surprise the customer with that extra $2.00 when they get to the checkout_success page!
Where did/does that order-total come from?
Thanks I see that now; quick question it says to add this code in ot_reward_points.php after function collect_posts
PHP Code:
Here is the code in that function. Do I need to replace this code with one above? instead of request it's supposed to be session?PHP Code:
if (isset($_SESSION['redeem_flag']) && $_SESSION['redeem_flag'])
$_POST['redeem_flag'] = $_SESSION['redeem_flag'];
PHP Code:
PHP Code:
function collect_posts()
{
if($_REQUEST['redeem_checkout_flag'])
if((isset($_REQUEST['redeem_flag']) && $_REQUEST['redeem_flag']) || (isset($_REQUEST['redeem_points']) && $_REQUEST['redeem_points']>0))
{
$_SESSION['redeem_points']=$this->get_points_redeeming();
$_SESSION['redeem_value']=$_SESSION['redeem_points']*GetRedeemRatio($_SESSION['customer_id']);
}
else
$this->clear_posts();
}
@tmccaff, since I don't use reward_points you'll need to wait for validation from another Zenner that's successfully integrated reward_points with OPC.
Ok thanks. Quick question with checkout without account will work with onepage or no?
v1.5.0 is now available for download from the Zen Cart plugins: https://www.zen-cart.com/downloads.php?do=file&id=2095
Quick question: Will it work on ZC1.5.5f?Quote:
v1.5.0 is now available for download from the Zen Cart plugins: https://www.zen-cart.com/downloads.php?do=file&id=2095
Thanks,
jpda
Quick answer: Yes.
Thank you!:smile:
Cheers,
jpda
Hi lat9,
Would/should OPC v1.4.2 also be working with ZC 1.5.5f?
I have OPC v1.4.1 working perfectly on ZC 1.5.5e. I updated a local copy to v1.5.5f (working alright) and then I updated OPC to v1.4.2.
OPC is also still working alright, exept that no OPC log files are being written.
Any idea where to look?
TIA,
Cheers,
jpda
I did even set it to "full".Quote:
Stupid question coming: Have you enabled the OPC debug?
In addition: I disabled the email subsystem because this is a local XAMPP copy...
@jpda, are there any debug-logs being generated? I'm wondering if (somehow) the DIR_FS_LOGS definition got mangled during the upgrade.
After updating/merging the 1.5.5f file system files, I tried to run zc_install to update the db, knowing there were none. I coul not complete zc_install because it only offered me to create a new database, so I quitted zc_install. However, it had produced several zcInstallLog_*.log files in the logs directory. In configure.php no explicit define('DIR_FS_LOGS' ...) because optional in store and admin.
jpda
Anyway, I did check the local versions of configure.php, of course. No explicit defines for DIR_FS_LOGS, but I added them and now I do get myDEBUG logs AND also from OPC!:smile::clap:
Thus, I checked the configure.php files from the original site and they do have those explicit DIR_FS_LOGS defines (probably because that site had been upgraded from zc 1.5.4 to zc 1.5.5e.
Question now is: Why does ZC tell me those defines are optional?:unsure:
Cheers,
jpda
Woo-hoo! I'm glad you got the issue sorted. Those /includes/local/configure.php files can be "tricky" on an upgrade.
Zen Cart 1.5.5 (and later) split the DIR_FS_LOGS (and other definitions) out to /includes/defined_paths.php since the majority of the file-locations are simple derivatives of DIR_FS_CATALOG. That's why the definition is documented as "optional".