View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0003637 | Composr | shopping | public | 2018-06-29 02:56 | 2018-06-29 21:41 |
Reporter | Adam Edington | Assigned To | Chris Graham | ||
Severity | Feature-request | ||||
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Fixed in Version | |||||
Summary | 0003637: Cart accumulation and breadcrumb bugs | ||||
Description | Added a test product and clicked Buy. The item is added to the cart. Whenever I visit the shopping cart page (using the main menu) it seems to add another entry (and order ID) into the my order page (again I visited this page using the main menu). I now have 7 entries awaiting payment and no option to delete any of them from the orders page (despite being logged in as admin, so I assume the member cannot delete orders from this page, though of course they likely wouldn't need to if not for this bug). Additionally clicking on an order number from the my orders presents a breadcrumb which links back to 'orders' which cannot be found as the page name is 'my_orders'. | ||||
Tags | No tags attached. | ||||
Time estimation (hours) | |||||
Sponsorship open | |||||
|
Deleting the item from the shopping cart does not delete the order entry/entries (which is probably as intended, but mentioning just in case it isn't) |
|
|
|
I have partly resolved it, however the core issue of duplicate orders is by design and not something easy to solve. 1) Breadcrumb issues - solved, including some I also found in the Admin Zone, along with an issue with a bad <title> on the shopping cart. 2) Also fixed that order cancellation option showed for already cancelled orders in Admin Zone. 3) I have made it smarter about clearing out old orders. a) If you explicitly cancel your order from the payment gateway, it actually will now do less order cleaning up, only cleaning out orders that are over a week old. It won't actually delete that order now. So this goes against what you are suggesting, but it's important because there's nothing stopping someone clicking back to get back to the payment gateway then deciding to proceed. And that would result in a payment with no matching order, not good! b) Additionally when old orders are cleaned up, if there are notes on that order it won't now delete them, but cancel them. c) However, when refreshing the cart it will still create duplicate orders. This is necessary because the order has to be created immediately, as the payment gateway buttons are directly embedded on the cart. i) It is perfectly possible for someone to open the cart, pay, the payment to be delayed coming back to the site then refresh - so we can't delete the pending order and recreate because it might have a payment coming soon (we can't allow a payment not matched with an order). ii) ... and we can't just keep the same order open in the cart either for the same reason (we can't allow double purchase by letting them click pay on that order twice). iii) we could probably try and track that an exact same order exists and reset to an empty cart, or show an error message. But we don't know that existing order was actually carried through to payment. d) It will however delete pending orders more than a week old when refreshing the cart. I think the proper solution to '3c' would be to not have payment gateway buttons direct on the cart, but to pass through an interstitial page - which would create the order and clear the cart. However that's adding further complexity, and the cart is meant for very simple use cases. i.e. selling T-shirts and mugs, not running a sophisticated store. It may also be a violation of the T&Cs of payment gateways who want you to use their code and logos in a specific way. |
|
Honestly it's damned complex and tying my head in knots thinking about it. Just think of any time you going to the cart as the 'checkout' step, and any changes to the contents of the cart, or going back to the checkout, is creating a new order. Just we can't clear out the old one as we can't track what might have happened on the payment gateway end prior to a payment finishing being processed. |
|
I don't intend to use the shopping cart and was just reporting my discoveries when testing. Solution for 3c might be useful for those that do, but it doesn't affect my plans. If it's confusing to you I have no chance :) I just found it odd that I ended up with several orders just by visiting the page after clicking buy (and not proceeding any further). I don't even have a payment gateway set up to proceed beyond the intent to buy. |
Date Modified | Username | Field | Change |
---|---|---|---|
2018-06-29 02:56 | Adam Edington | New Issue | |
2018-06-29 02:57 | Adam Edington | Note Added: 0005749 | |
2018-06-29 03:03 | Adam Edington | File Added: bankloanplease.png | |
2018-06-29 15:57 | Chris Graham | Note Added: 0005750 | |
2018-06-29 15:57 | Chris Graham | Status | non-assigned => resolved |
2018-06-29 15:57 | Chris Graham | Resolution | open => fixed |
2018-06-29 15:57 | Chris Graham | Assigned To | => Chris Graham |
2018-06-29 15:58 | Chris Graham | Note Edited: 0005750 | View Revisions |
2018-06-29 16:02 | Chris Graham | Note Edited: 0005750 | View Revisions |
2018-06-29 16:05 | Chris Graham | Note Added: 0005751 | |
2018-06-29 21:41 | Adam Edington | Note Added: 0005752 | |
2018-06-29 21:53 | Adam Edington | Note Edited: 0005752 | View Revisions |
2018-06-29 21:53 | Adam Edington | Note Edited: 0005752 | View Revisions |