Jon Fergus
Forum Replies Created
-
Ok, I just opened a new ticket and submitted the plugin zip file there.
Hi Oliver. What’s the best way for me to send it to you privately?
Seems to me that the actual issue is a PayPal one, not specific to this plugin (which is by far the best PayPal plugin out there imo). It’s PayPal who is limiting it to only one address that can be sent/received from the Express Checkout form to/from woo. As long as that’s the case, I see no option but to force the use of shipping address rather than billing address, because it’s far more important to get the shipping address correct.
Until PayPal decides to set it up on their side to allow for both billing and shipping addresses to be communicated between it and woo, I’d say we’re all stuck with the way it’s currently setup in this plugin.
Forum: Plugins
In reply to: [WooCommerce] Relocate coupon notices on cart page?Update:
You can find the full solution with some edits here: https://wordpress.stackexchange.com/questions/305939/relocate-woocommerce-notices-messages-on-cart-page
With the addition of a blank div (with class=”cart-coupon-notices”) hooked to the coupon form and then targeting the apply_coupon and remove_coupon_click notices to its class, you get this:
https://pasteboard.co/Hq8pKlq.jpg
I think this is a much better placement for those specific notices. All other notices still appear at the top of the page, so this doesn’t interfere with any other functionality on the cart page (the update cart button not working was some kind of odd glitch that solved itself).
With this better placement of those two notices I now have no need to disable auto-scroll. This means that the only thing needed to relocate those two notices is a simple edit in cart.js (i.e. changing
show_notice( response );
toshow_notice( response, $('.cart-coupon-notices') );
.I know my specific situation is rather unique, but I still think it would be a good idea to build in allowance for this kind of customization of notice location, so devs don’t need to replace cart.js but can simply use some kind of apply_filter function.
Anyway, thanks everyone for the help and feedback!
Forum: Plugins
In reply to: [WooCommerce] Relocate coupon notices on cart page?Thanks for the feedback. About the notices all showing up in the new location, that’s not how it works using the solution given on stackexchange. The only notices that are relocated are apply_coupon and remove_coupon_click from cart.js. For example, here’s a screenshot of what happens if I trigger a different kind of notice:
https://pasteboard.co/Hq2kEZG.jpg
So building in functionality to allow developers to easily relocate specific notices still seems like a good idea to me. Having the add coupon notice pop up right where the customer is seems like a best practice kinda thing to me, while scrolling to the top for major errors seems fine.
About the layout on our test site, this is using avada’s basic cart layout with some modifications (I like your idea of login on click, just need to learn how to do that); this site is still very much a playground of testing. But that said, even if I moved the coupon form up, the notices in standard woo would still be above the cart items, as you say, so if the customer has a few items it still means they will be scrolled up past where they had already scrolled down through and made to scroll down again. I don’t think that’s a good flow.
In any case, I’ve now moved those two coupon notices to within the coupon form, just beneath the add coupon button, and that seems to me to be the perfect setup. Customer window is going to be there anyway, so no need to scroll at all.
Not sure what’s going on with the add to cart button tbh.
Forum: Plugins
In reply to: [WooCommerce] Relocate coupon notices on cart page?Thanks @daymobrew. Something like that would be a good solution imo. Disabling the auto-scroll is more-or-less a non issue if the notices can be relocated to somewhere near where the customer’s window will be when adding or removing coupons. A solution where we could customize the location of the notices with a simple function instead of needing to deregister and dequeue cart.js file and add our own modified version would be ideal.
Forum: Plugins
In reply to: [WooCommerce] Relocate coupon notices on cart page?Hi Thomas. So, the issue I’m having is specifically with the Cart page, not “when a coupon is added at checkout”, as you’ve tested for. I’m using the Avada theme, and I have the coupon form included in cart collaterals on the cart page. The functions that are at play here are within cart.js
I’ve been getting some help from two woo experts and it does seem that the “auto-scroll” function is setup in cart.js to always scroll to the notice, not just when there are errors. This has been tested with multiple themes. Maybe you can test this also?
Here’s a work-around solution from one of the woo experts, using a customized cart.js file in a custom plugin: https://wordpress.stackexchange.com/questions/305939/relocate-woocommerce-notices-messages-on-cart-page
Have a look at the two changes he made to affect the auto-scroll.
1. relocation of the notice for coupons: under apply_coupon he’s modified the line
show_notice( response );
toshow_notice( response, $('.cart-collaterals') );
, which relocates the coupon notices from the top of the page. (I’ve changed this from.cart-collaterals
to.coupon
and also done the same for the remove_coupon_clicked function).And:
2. under update_cart he’s modified the function to incorporate an if statement related to scroll_to_notices. So auto-scroll now doesn’t happen for coupons.
I’ve tested this by creating a plugin and it works on my site, but I’m not super keen on using my own custom cart.js because it just adds more potential trouble during updates. Anyway, for now you can see his method with my changes in action on our cart page here: https://stage2.fitafvegan.com (there’s a test product you can add)
Based on what I’ve seen here, and from the help from others, I’d suggest it’d be good idea to tweak the native cart.js for a future update, if possible. Either relocate the coupon notices to just above the .coupon div or disable auto-scroll for coupon functions, or both (or distinguish between error notices and regular notices, which doesn’t seem to be the case for the cart page).
Any thoughts?
Hi Oliver. I’ve done this already, but it doesn’t seem to change the list of countries in the actual PayPal Express window. This screenshot shows what I mean:
Thanks for the explanation. Makes sense now.
I think I’ll just restructure the way we intend to use express checkout to do as you recommend and skip the checkout page. Seems like that’ll be the best setup.
Thanks Oliver.
I don’t know what you mean. Multiple hooks to what? for what? which hooks?
It shows once everywhere EXCEPT the checkout page. You need to add an item to the cart then proceed to checkout to see where the double recaptcha shows.
Tested it, and it only needed me to check the first captcha to allow registration. So, I suppose I could just css display:none the ID for the second captcha div, but would be better to have a cleaner solution.
I second this. A geolocation function is a must.
Forum: Plugins
In reply to: [PayPal for WooCommerce] Error using Rest API paymentI was hoping to try Braintree next, but apparently they aren’t available where we are (Israel) either.
As far as I can tell, PayPal Express and PayPal Standard will be the only options for us, at least for now.
Thanks again.