OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

Forums Forums OroCommerce Multipage checkout: how to assign a different from 1 userOwner to new order?

This topic contains 2 replies, has 2 voices, and was last updated by  Frank 2 years, 10 months ago.

Starting from March 1, 2020 the forum has been switched to the read-only mode. Please head to StackOverflow for support.

  • Creator
  • #40445


    Hi there,

    I want to customize user_owner_id in oro_order, when a new order-record is created during the checkout-workflow.

    What I have tried is to override default owner = 1, with my custom owner in CheckoutListener Class:

    The code snippet shows both, customized and oro-core versions. It is clear, that I have to transfer working code into my own custom bundle …

    However, this does not work!

    After first ‘go-ahead’-button-click during the checkout process i am redirected to login-page, instead of the expected redirection to ‘Login-as-a-guest’ page (guest option has been enabled).

    It seems, that it is in some-way related with the generation of workflow-record, which may be generated not as requiered …
    I tried to debug it with xdebug, but could not catch the point …

    What did I miss to assign additionally to owner in CheckoutListener?

    Thanks for help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
  • #40463

    Andrey Yatsenko

    during the checkout process I am redirected to login-page

    It looks like the code works, but you changed the owner to the one that the logged-in frontend customer user don’t have access to.
    You can see why the user was redirected by opening the website in a dev environment and checking the symfony profiler for the redirect page. In a Security tab, there is detailed information with the voter that was denied permission.



    Hi Andrey,

    yes, using your recommendation and xdebug, i found AclVoter which was responsible finally.

    Thank you for your help!

    Kind regards

Viewing 2 replies - 1 through 2 (of 2 total)

The forum ‘OroCommerce’ is closed to new topics and replies.

Back to top

You will be redirected to [title]. Would you like to continue?

Yes No

You will be redirected to [title]. Would you like to continue?

Yes No