Hi - just wondered if it would be possible to add a 'wishlist' with a ucommerce shop and if so how I would go about it? I have a client who wants to have the user be able to add items into a 'wishlist' and save this for later.
Its really just like another basket but with no check out links.
You can definitely use the basket for storing wishlists. What you can do is use the object model to create a new basket. If you leave the basketid blank for your wish list the default basket will be unaffected and you're free to do whatever you want with the basket.
Using dynamic order properties you can let your customers set a wish list name or even do groups if that's required.
You'll need a way to tie the basket to a customer. What you can do is create a customer object to match the current customer and link that to the member profile for the currently logged in user.
The following pseudo code should help you along. I'm using EntitiesV2 for this one:
// Assuming that a member is logged on and a customer exists for that member
var customer = Customer.All().Single(x => x.UmbracoMemberId == Member.CurrentMemberId());
var basket = new PurchaseOrder();
basket.ProductCatalogGroup = ProductCatalogGroup.All().First(); // use any catalog group
basket.Currency = basket.ProductCatalogGroup.Currency;
basket.OrderStatus = OrderStatus.All().Single(x => x.Name == "Basket");
basket.Save();
Wishlist
Hi - just wondered if it would be possible to add a 'wishlist' with a ucommerce shop and if so how I would go about it? I have a client who wants to have the user be able to add items into a 'wishlist' and save this for later.
Its really just like another basket but with no check out links.
thanks
S
You can definitely use the basket for storing wishlists. What you can do is use the object model to create a new basket. If you leave the basketid blank for your wish list the default basket will be unaffected and you're free to do whatever you want with the basket.
Using dynamic order properties you can let your customers set a wish list name or even do groups if that's required.
You'll need a way to tie the basket to a customer. What you can do is create a customer object to match the current customer and link that to the member profile for the currently logged in user.
The following pseudo code should help you along. I'm using EntitiesV2 for this one:
Thanks - that is very helpful.
is working on a reply...