Copied to clipboard

Flag this post as spam?

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


  • Denford 132 posts 323 karma points
    Sep 20, 2020 @ 12:51
    Denford
    0

    link umbraco members on orders

    Trying to find out what is the best way to link umbraco members to orders and eventually display the orders for a logged in member and cant seem to find any current details on how this works.

    Found this post from 2012 not sure how relevant this is , https://our.umbraco.com/packages/website-utilities/tea-commerce/tea-commerce-support/31126-How-to-integrate-Umbraco-Members-with-Tea-Commerce

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Sep 21, 2020 @ 08:12
    Matt Brailsford
    0

    Hi Denford,

    TC orders have a CustomerId property on them which is auto set to the current logged in member either at the point of order creation, or just before the order is about to be redirected to the payment gateway. If you need to set it earlier to this though, you can set the order.CustomerId yourself at any point (such as at the point of login). You'll generally want to set it like so:

    order.CustomerId = member.ProviderUserKey.ToString();
    

    Once a customer id is set on an order, you can retrieve a list of their complete orders by calling following method.

    var orders = TC.GetFinalizedOrdersForCustomer(storeId, memberId);
    

    Hope this helps

    Matt

  • Denford 132 posts 323 karma points
    Sep 22, 2020 @ 01:47
    Denford
    0

    Tanks @matt will let you know how i get on once i got the accounts login/registration logic wired in.

    So the plan is if someone is already logged in then it automatically sets that order to that user and that looks like it will do it out of the box which is perfect.

    however is a user is not logged in, then at 1 of the cart steps, either when they add their order/shipping details ask them to also create an account with those details or do it when they finalize the order just before they pay. Not 100% when will be the best time to ask the user to register, but ideally get them to register and link that order to the new account just before they place that order.

    What would you recommend as the best place/way to implement this extra step.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Sep 22, 2020 @ 06:59
    Matt Brailsford
    0

    Hi Denford

    No problem.

    If you want TC to handle the assignment then ideally you’d need them to register and log in before the review step as that is when TC’s second attempt is triggered. From a UX perspective though I think a lot of systems tend to show the register option on the order confirmation page after the order is placed, but I guess this depends on whether people HAVE to have an account to order. If so then yea, that needs to be prior to the review step. If not, on the confirmation step might be less intrusive. The later would require you to assign the order yourself though.

    Hope this helps

    Matt

  • Denford 132 posts 323 karma points
    Sep 22, 2020 @ 11:20
    Denford
    1

    Thanks @Matt,

    Well the users dont have to have an account, so guess to avoid having to interfere too much with the flow of TC i will go with the option of having the register option at the end of the order and pass in the order Id, to my logic to register at that stage.

  • Matt Brailsford 4124 posts 22215 karma points MVP 9x c-trib
    Sep 22, 2020 @ 12:14
    Matt Brailsford
    0

    I think that's the nicer UX to be honest as it makes the checkout as clean and "roadblock" free and then on the confirmation page it becomes "well, I've come this for, I might as well make an account".

    Glad I could help

    Matt

Please Sign in or register to post replies

Write your reply to:

Draft