-
-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempting to complete an order by payment returns error and clears out shipping method & addresses #85
Comments
Looks like I can replicate this event earlier in the process, when creating and order in the control panel although I can't quite nail down what's causing it. But something is stripping the shipping address from the order, causing Postie to log:
Multiple times, as you can see. I can replicate this by creating an order in the control panel, and selecting an Postie-provided shipping method, and saving the order. That seems to work all fine, but then selecting another shipping method (also from Postie), and then hitting save again defaults back to a Commerce-based shipping method ("Free Shipping" in my case), due to the above multiple order update call. I'll have to do some more investigating here, but I'd assume that this is the same issue as when getting to payment. To be clear, is this an order that's been completed? That does have some bearing on how we handle things. |
No, the order hasn't yet been completed. It's being completed, by way of a Payment, when we encounter the error. |
Yep, just thought to check as you can technically have a completed, unpaid order. What I mean is, is there a "Mark as Complete" button in the control panel when editing the order? |
Yes, I am dealing with an incomplete unpaid order — i.e. |
@engram-design hi Josh! This issue is from something Michael is working with our team at Steadfast on. I wanted to follow up to see if you had made any progress on this, or if you needed any more data from us to dig into this? |
@jakedohm Haven't had oodles of time to jump into this, but I was chatting with the Commerce team about it, and what's supposed to be happening, without much headway. I'll take another stab at it soon. |
I've made some improvements in 5a16e35 that should have some benefit here. In my testing, this doesn't seems to be happening anymore, but worth confirming on your end? |
Unfortunately, even roping in 5a16e35 via When completing an order via Transaction in the CP, we see a payment error:
Additionally, we see a new Customer Notice registered:
Finally — and most destructively — the Shipping Address, Billing Address, and Shipping Method are all cleared out. (To confirm, this order has been updated/saved to commit any extant changes, before attempting to complete the order with via a payment Transaction. Prior to attempting payment, the order does show its Postie-provided shipping method and cost.) (Craft CMS 3.7.37, Commerce 3.4.12) |
So I really can't replicate this on my end, and I've tried all sorts of different gateways, updating orders and different stages. Is there anything on your end that might modify the order on its complete event, payment event, or otherwise? Would it be too much to ask for a video of the issue, just in case I'm doing something different to you? Here's a recording of me going through the process. https://d.pr/v/vHHyiG |
Having the same issue here on Commerce 4.x. I noticed if you start in the CP, like in your recording Josh @engram-design, I don't have any issues. However, if you start an order on the front end, fill up your cart, pick a shipping method, once you hit the back end to complete it, it breaks. I'll get to the point on the front end where I'm going to take payment, I'll hop back to the control panel, jump into Active Carts, and then try to mark as complete from there (for example, for testing purposes). Seems Commerce doesn't want to play ball at this point. FWIW I'm using UPS plugin and PayPal gateway. Not sure if that helps... |
Is it the same error, or something else? And it still clears out the shipping method and addresses? |
Had a chance to do a little more digging. I think this might be more of Commerce bug than Postie. Client has a multisite with products in both. If I try completing the order on the primary site, everything works just fine. However, if I try to complete it on the secondary site, the whole order gets nulled. It's almost like Commerce is only using the primary site on the CP and when the products on the secondary site don't "exist", everything goes haywire. |
Ah, now that's good to know. I wonder if that might be different with multi-store in Commerce 5? I'll play around with it. |
Yeh I was wondering the same thing about 5... hopefully they've made some improvements with it. |
Everything works as expected on the front-end... but when we attempt to complete an order by payment in the admin CP, we run into a weird glitch: The request comes back with an error from Commerce:
Notably, the previously-saved shipping method and shipping/billing addresses are then cleared out.
Have yall seen anything like this before?
Additional info
The text was updated successfully, but these errors were encountered: