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?
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.
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.
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 :-)
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
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
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
is working on a reply...