Closed lsjroberts closed 11 years ago
Regarding https://github.com/messagedigital/cog-mothership-user/pull/18#issuecomment-24598894 and https://github.com/messagedigital/cog-mothership-user/pull/18#issuecomment-24599063
@joeholdcroft @dannyhannah Should we go with events or a modification to the checkout?
@lsjroberts see my following comment:
Maybe we can be more clever by doing something like:
When in checkout, detect if the user is actually an admin impersonating a user If so, present an option to bypass SagePay and enter a MOTO reference instead (not sure how this would effect checkout flow). Your option may be more plausible for v1, though. What do you think @dannyhannah ?
I've added the listener on cog-mothership-ecommerce:user-impersonate
. This sets adds a field called place_order
which allows you to do $this->get('http.session')->get('impersonate.data.place_order')
. It needs some logic within the checkout process to see if that is true then skip payment.
@dannyhannah Should this be in Message\Mothership\Ecommerce\Controller\Checkout\Payment
or elsewhere?
I think it makes sense for it to go there for now.
All works.
Though there is one issue which seems to be the same on the current system, after going to impersonate a user you then are logged in as them and therefore have no access to the admin area. Does that matter or is this all good to merge?
I accidently closed and merged the previous pull request #18 so here it is again.
We need to implement this feature as it exists on the current site:
Ecommerce
so may need planning with @dannyhannah.@messagedigital/front-end-developers will likely also want to help figure out how this should look and where it should live.
See current system for current behavior (screenshot below).