OroCommerce Forums

Covering OroCommerce topics, including community updates and company announcements.

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 months, 2 weeks ago.

  • Creator
    Topic
  • #40445

    Frank
    Participant

    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.
    Frank

Viewing 2 replies - 1 through 2 (of 2 total)
  • Author
    Replies
  • #40463
    Andrey Yatsenko
    Andrey Yatsenko
    Moderator

    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.

    #40551

    Frank
    Participant

    Hi Andrey,

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

    Thank you for your help!

    Kind regards
    Frank

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

You must be logged in to reply to this topic.

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

Yes No