Thanks, @haredo, that nailed it. The issue is that the Square payment module is creating a jQuery/javascript error and preventing OPC from continuing.
See this image for the console-log. What version of Square are you using?
Thanks, @haredo, that nailed it. The issue is that the Square payment module is creating a jQuery/javascript error and preventing OPC from continuing.
See this image for the console-log. What version of Square are you using?
Cindy,
Square Payments Module 0.95
Are You Vulnerable for an Accessibility Lawsuit?
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL, Domain, and MagicThumb with semi-annual and longer hosting
There was a similar issue with that module previously, but you should report it to the Square Payments' payment-method's support thread.
It affects OPC due to OPC's heavy use of jQuery; I'm guessing that the console log will still be there on the 3-page checkout's confirmation page but doesn't wreck as much havoc.
Cindy,
Thank you for your time and I will start a thread in the Square Section.
Are You Vulnerable for an Accessibility Lawsuit?
myZenCartHost.com - Zen Cart Certified, PCI Compatible Hosting by JEANDRET
Free SSL, Domain, and MagicThumb with semi-annual and longer hosting
Here's hoping someone can help with some OPC problems that I've unsuccessfully tried to resolve for some time.
I was using this great plugin successfully for some time on my development website (constantly changing) but started having payment-order_total interaction issues. The fix supplied at #148 in Github resolved that part (thanks lat9!). But there are now other problems. Since it's a bit complicated, I provide a summary here... & then a detailed step-by-step guide later (so apologies for long post).
Summary
A. Shipping-payment module interaction issue (see Issue 1 below) that's resolved when browser is refreshed:In Dr Byte's Square installation instructions, he cites where this can happen:If you find the input fields for credit card numbers are flat with no text box to type into, this typically means you're missing the jscript_square.php file as described earlier in the Installation Instructions.
- Or you've got a firewall or browser plugin blocking access to Square's javascript code.
- Or you've got a plugin having jQuery conflicts.
My efforts to find possible jQuery conflicts iaw ZC forum research (e.g. uninstalling some plugins [e.g. CSS/JS Loader v1.5.2]; upgrading some jquery files - done both before and after the step-by-step sequence below) all failed to resolve this problem. However, my experience here is limited…so I may have missed something.B. Payment-order_total interaction issues (see Issues 2-5 below) that's resolved when OPC sends the customer back with the "…order has changed…resubmit" message.
BTW, I only remembered to get a CTRL-U dump after those steps were completed & after some last-ditch effects to address possible jQuery conflicts:https _recoveredheritage.com.au_checkout.txt.zip
Thanks for any help in advance.
Cheers…Gerri
My system:
ZC 1.5.5e
jQuery: In ...template/mytemplate/common/html_header.php: v11.1 (during step-by-step seq.) Upgraded to ZCv1.5.5f's 1.12.4.min.js after.
Template: clone of Responsive Sheffield Blue (modified to work with ZCv1.5.5)
OPC: v2.0.5-beta1 (i.e. v2.04 + fix for issue #148 provided in Github)
Shipping: Australia Post Shipping Module v2.3; In Store Pick-up (modified for specific postcodes iaw this thread);
Payment: Direct Bank Deposit V1.5.3-revised, Square v0.96
Order-Total: Optional Shipping Insurance v3.2.3 (was using jquery/jquery-1.6.min.js. I modified this so think it now accesses v 1.12.4); Payment Module Fee v1.1.0; Override Shipping No Price Module v1.1 ot_AUD_total (a clone of ot_total I modified iaw this thread - only shows up when foreign currency used)
Other plugins: Lots. E.g. of those using JQuery installed b4 from problems started: Image Handler 5.0.0Beta4, EC Analytics v1.2.2
Website: https://recoveredheritage.com.au/ (under development so Maintenance currently enabled - pls let me know & I can turn it off temporarily if needed).
STEP-BY-STEP SEQUENCE:
a. Starting point:
- OPC guest checkout disabled; OPC logging = true,
- At entry into Checkout page:
- cheapest of 2 x postage options is auto-selected (Parcel Post incl P&H fee [$16.75 incl GST]); In-store Pickup is also available but not selected
- none of the 2 x payment options selected (Square CC or Direct Bank Deposit;
- In order-total box, all is correct:
- product T001 is selected ($77 incl GST of 10%);
- Insurance of $2.00 (incl GST)
- total = $95.75; GST = $8.70;
b. Change postage to Express Post ($19.75 incl GST); no payment selected yet
- ISSUE 1: the Square CC text boxes disappear.
- In order-total box, all is correct: $8.98 GST; total = $98.75
- Screen dump:
Attachment 18171NOTE: Issue 1 also occurs even when In Store pickup is selected…so it's unlikely that the AU Post shipping module is the cause.c. Payment selected - Direct Bank Deposit:
- Nothing changes (nothing should)
- I progress the payment without any issue.
d. OPC log file of preceding steps: A Bank Transfer purchase - myDEBUG-one_page_checkout-9.zip
e.Cleared the cache & repeated steps a-b above. Issue 1 is duplicated.
f. Payment selected - Square (CC):
- in addition to the CC text boxes not appearing... there's another problem:
- ISSUE 2: a transaction fee (for CC payments) should have shown up in order-total box
- Since I can't complete the sale, I have to refresh the browser.
g. After browser refresh, SQUARE CC text boxes appear again, no payment option is selected & order-total is correct (as it was before)
h. When CC selected:
- Order-total box correctly shows Card Transaction Fee ($2.13 = 2.2%'of the total; I don't charge GST)
- 3 issues in order total box (numbered 1, 2 & 3 in screen dump):
- ISSUE 3: Express Post cost in order-total is incorrect: it quotes the ex-GST price ($17.95) instead of incl-GST price ($19.75)- ISSUE 4: GST calculation is incorrect: it doesn't include the postage GST; shows $7.18 instead of $8.98 i.e. it's lost the GST for the P&H charge added within the AUPost module- ISSUE 5: the total shows a rounding error: total of figure above should be $99.08, not $99.09 (I have tries various suggestions from ZC forums to correct this - but no luck yet.)
- Screen dump:
i. If I then change payment method to Bank Deposit, Transaction Fee correctly disappears but ISSUES 3-5 remain
j Progress the CC payment:
- Change payment method back to CC, the transaction fee reappears (correct); ISSUES 3-5 remain
- Click REVIEW ORDER button
- OPC sends customer back to Checkout page with "Your order's details have changed. Please review the current values and re-submit" message
- On return, all is correct - no ISSUE 3-5. (The customer could proceed to CONFIRM - but I don't in this test environment)
k. OPC log file for preceding steps: B Credit Card CONFIRM page - myDEBUG-one_page_checkout-9.zip
@GerriM, PM sent with my IP address so that I can see your site in Maintenance Mode.
A couple of initial observations:
- The Square payment module (https://www.zen-cart.com/downloads.php?do=file&id=156) has been updated to correct some jQuery interaction issues. I'm not sure if that's part of the problem you're having, but I suggest that you upgrade your version of that payment method.
- I'm guessing that the Shipping Insurance order-total is using a checkbox-type field to allow the customer to make their selection. I've seen other OPC issues arise, requiring a continual 'Please re-submit', when a checkbox is used to gather that page-to-page information. See that referenced OPC posting for additional information.
Thanks very much for looking at this, Cindy.
P/O my reply, for other Zenners' info:
Square v0.96 (released by Dr Byte on 6 Dec) already uploaded. Had my fingers crossed...but no help: nothing changed.The Square payment module (https://www.zen-cart.com/downloads.php?do=file&id=156) has been updated to correct some jQuery interaction issues. I'm not sure if that's part of the problem you're having, but I suggest that you upgrade your version of that payment method.
No. Insurance is compulsory & the rest come up automatically as req'd (I've made code modifications). But I'll look at that bit of the docs again in case it's relevant. Thnx.I'm guessing that the Shipping Insurance order-total is using a checkbox-type field to allow the customer to make their selection....See that referenced OPC posting for additional information.
Last edited by GerriM; 11 Dec 2018 at 08:06 PM.
First, thanks to @GerriM for granting me access to her test site so that I could investigate the issues she identified.
There are actually two underlying issues that I've identified and currently opened as issues on the OPC's GitHub repository:
Square payment inputs disappear after shipping-method change
The Square (and possibly other?) payment-method has an external jQuery script that's loaded on a full-page load, so when OPC re-loaded only the payment-selection block, that processing didn't kick in ... resulting in no input fields for the Square credit card information.
My current approach, validated by @GerriM, has its limitations. For the Square module to operate properly when the shipping method changes, it's necessary to not re-load the payment-choices block. Unfortunately, there are payment methods that are dependent on the shipping method selected (like enabling a Cash payment only when the shipping-method is store-pickup), so these payment methods absolutely require that the payment-choices' block be updated on a shipping method change.
The approach I plan to take (unless a better solution is proposed) is to add another configuration value to the One-Page Checkout Configuration, allowing a store-owner to identify payment methods that require no reload of the payment-choices' block; that setting will be initialized to identify the square method by default. What this means to store-owners utilizing OPC is that you can't have a combination of payment methods that require the block to be updated and those that require the block not to be updated.
If anyone has a better solution to the issue, I'm open to suggestions!
Taxed order-totals 'lose' their tax on payment method update.
This one was caused by the payment-method update's AJAX not initializing the order's shipping- and payment-classes prior to requesting the order-total modules to perform their calculations.
I'll be updating the OPC's GitHub in the morning with my current changes.
I've just submitted v2.0.5 of One-Page Checkout to the Zen Cart plugins for review. This version contains changes associated with the following GitHub issues:
#133: Guest/Registered-Accounts, pre-fill Zip Code
#148: Payment change requires order-totals block update
#151: zc156 updates not fully incorporated
#152: Salutation Ms. not saved on guest-account creation
#156: Square payments input blocks disappear after shipping change
#157: Taxed order-totals 'lose' their tax on payment-method update.
#158: Correct various 'PHP Notice' issues.
#159: Partial zc156 integration; downward-compatible files only.
Please note: This version is not fully integrated with Zen Cart 1.5.6; you'll need to review the core- and template-file changes and merge the well-marked change sections into the Zen Cart 1.5.6 base. I expect to have the zc156 integration completed early next year.
This is the final release that will continue to support Zen Cart versions less than 1.5.5f, too, due to the number of changes introduced by the zc156 core.
Bookmarks