Calling Developers!
We are reenergizing our code contribution process! Learn More

What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Can I easily modify the way how the order customer reference is generated?

Options
U03T08LE3CP
U03T08LE3CP Posts: 185 🧑🏻‍🚀 - Cadet

Can I easily modify the way how the order customer reference is generated?

Comments

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 🪐 - Explorer
    Options

    The order customer reference is manually set by the customer, if you want to adapt the internal order reference (default: DE--), \Spryker\Zed\Sales\Business\Model\Order\OrderReferenceGenerator is what you are looking for.

  • U03T08LE3CP
    U03T08LE3CP Posts: 185 🧑🏻‍🚀 - Cadet
    Options

    Great, thanks

  • U03T08LE3CP
    U03T08LE3CP Posts: 185 🧑🏻‍🚀 - Cadet
    Options

    any unintended consequences if that logic is something completely different?

  • U03T08LE3CP
    U03T08LE3CP Posts: 185 🧑🏻‍🚀 - Cadet
    edited February 2023
    Options

    i.e does something somewhere assume the format is --ID

  • Alberto Reyer
    Alberto Reyer Lead Spryker Solution Architect / Technical Director Posts: 690 🪐 - Explorer
    edited February 2023
    Options

    Order references still need to be unique, but beside that in Spryker the order reference is only a string.

    It can be what ever you want, maybe a uuid, or customer reference + a number or what ever you can imagine. As long as it is unique over all orders in the same DB.

  • U03T08LE3CP
    U03T08LE3CP Posts: 185 🧑🏻‍🚀 - Cadet
    Options

    ok great