Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • ianhoughton 281 posts 605 karma points c-trib
    Apr 04, 2023 @ 20:02
    ianhoughton
    0

    Copy or clone a finalised order

    Hi Matt,

    We currently list out the logged in members orders on a page. We would like to add a button for them to re-order any of those orders.

    What is best approach to copy the order? Just get the order via the orderservice, and loop over all the properties / order lines and copy into a new order? Or is there a vendr api method I'm missing?

    I have search the docs honest !!

  • Matt Brailsford 4124 posts 22220 karma points MVP 9x c-trib
    Apr 05, 2023 @ 07:35
    Matt Brailsford
    0

    Hey Ian,

    Good question.

    We don't have an API for copying an order currently, so yea, you'd probably need to loop over the order lines and properties yourself.

    I'll defo have a think on this though 👍

  • ianhoughton 281 posts 605 karma points c-trib
    Apr 05, 2023 @ 07:39
    ianhoughton
    0

    Thanks Matt.

    I'd seen a property called CopiedFromOrderId so thought I was missing something.

    I'll stick with copying manually for now. The properties and order lines are fairly easy. Do I need to re-assign the shipping / payments methods as well?

    We're currently assigning these behind the scenes as we only have 1 shipping method, and a free payment method.

  • Matt Brailsford 4124 posts 22220 karma points MVP 9x c-trib
    Apr 05, 2023 @ 07:55
    Matt Brailsford
    0

    Hi Ian,

    Yea, that property is really a hangover from how Tea Commerce used to work, where it would duplicate an order if you canceled out of the payment process, where as we just re-issue a new order number.

    Yea, you'll probably want to copy the shipping + payment methods / countries too

Please Sign in or register to post replies

Write your reply to:

Draft