Query Regarding Discount ...
How to reflect discounts to the basket which is created through BizDesk?
This's how I've tried....
Basket basket=CommerceContext.Current.OrderSystem.GetBasket(new Guid(g));
LineItem li=new LineItem();
li.ProductID="11012";
li.ProductCatalog="WWStore";
li.ProductCategory="Kitchen Tools";
li.Quantity=20;
OrderContext orders = CommerceContext.Current.OrderSystem;
string filter = "enabled=1 and language_id='en-US'";
string[] columns = {"shipping_method_id","shipping_method_name"};
DataSet ds = orders.GetShippingMethods(filter,"shipping_method_name",columns);
OrderAddress addr = new OrderAddress("Shipping","Shipping");
OrderForm of;
if (basket.OrderForms.Count == 0)
{
basket.OrderForms.Add(new OrderForm("default"));
}
of = basket.OrderForms["default"];
of.LineItems.Add(li);
PipelineInfo pipeInfo = new PipelineInfo("basket",OrderPipelineType.Basket);
PipelineInfo pipeInfo1 = new PipelineInfo("checkout",OrderPipelineType.Checkout);
basket.RunPipeline(pipeInfo);
basket.RunPipeline(pipeInfo1);
basket.Save();
Label2.Text=basket.SubTotal.ToString();
ContentSelector cst=CommerceContext.Current.TargetingSystem.SelectionContexts["discounts"].GetSelector();
StringCollection sc=cst.GetContent();
foreach (string DisItem in sc)
{
Response.Write(DisItem);
}
I can able to retrieve the discounts from the bizdesk. But how to reflect the discount values in basket.
Kindly help me with Sample Code...
Thanks & Regards
Sam

