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?

U03T08LE3CP
U03T08LE3CP Posts: 185 πŸ§‘πŸ»β€πŸš€ - Cadet

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

Comments

  • Alberto Reyer
    Alberto Reyer Posts: 690 πŸͺ - Explorer

    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

    Great, thanks

  • U03T08LE3CP
    U03T08LE3CP Posts: 185 πŸ§‘πŸ»β€πŸš€ - Cadet

    any unintended consequences if that logic is something completely different?

  • U03T08LE3CP
    U03T08LE3CP Posts: 185 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited February 2023

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

  • Alberto Reyer
    Alberto Reyer Posts: 690 πŸͺ - Explorer
    edited February 2023

    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

    ok great