Copied to clipboard

Flag this post as spam?

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


  • Pantelis 53 posts 107 karma points
    May 30, 2014 @ 13:00
    Pantelis
    0

    Multiple orders (cart and wishlist)

    Hello :-)

    I'm building my first commerce site with tea commerce and I want the functionality of a wishlist. So any customer should be able to add a product to cart or (if he's logged in) to have an option to add it to his wishlist and save it for later.

    The probable thing to do is create 2 separate orders one for the cart and one for the wishlist and switch between them when adding products.

    I've been searching the forum and I found a few relative posts about order handling, saving, switching etc. But in most of your comments you say that in TC 2.x the API would be much friendlier.

    I'm on TC 2.3.0 for Umbraco 7 and I wanted to know what would be the best way to implement this feature!

    Also, it's still not very clear to me how to create a new order. Is removing the current order and using addorderline to create a new order the only way?

    Any help would be very appreciated!

    All best :-)

  • Anders Burla 2560 posts 8256 karma points
    Jun 02, 2014 @ 12:37
    Anders Burla
    0

    Hi

    The easy way to do it, is just to use a cookie for saving the Umbraco node id and then as normal use the Tea Commerce Razor API to present the prices etc for the whishlist view.

    Kind regards
    Anders

  • Pantelis 53 posts 107 karma points
    Jun 02, 2014 @ 13:46
    Pantelis
    0

    Hi Anders,

    Well yes this is the easy way, but I'd like the user to have access to the wishlist from any device he logs in!

    So, if there is any advice on handling additional orders it would be very appreciated!

    Kind regards,
    Pantelis 

  • Anders Burla 2560 posts 8256 karma points
    Jun 03, 2014 @ 09:17
    Anders Burla
    0

    Ahh - yes that is a more advance solution :)

    You will have to be sure the user is logged in so Tea Commerce saves the id of the member that is logged in. Then you will have to write some custom code that checks if the customer has an order with his member id using SQL and use the order id with the SetCurrenOrderId in the API. Then you can add order lines to that order. And then you properly need some mecanism to switch between the wishlist and the actual order.

    Kind regards
    Anders

Please Sign in or register to post replies

Write your reply to:

Draft