Here is the main action going on, and i use the purchaseOrder varible to write out the values rest of the way
@{
var purchaseOrder = SiteContext.Current.OrderContext.GetBasket().PurchaseOrder; decimal shippingPrice = 0; int shippingMethod = 0; int i = 0; int indexforshipping = 0;
if(Request.Form["isPostBack"] != null)
{ int index = 0; foreach (var line in purchaseOrder.OrderLines)
I do but i managed to figure it out i need to call the SiteContext.Current.OrderContext.GetBasket().PurchaseOrder again to get the right price. seems the reffrence i got is not updated.
Order total not updating
Here is the main action going on, and i use the purchaseOrder varible to write out the values rest of the way
@{
var purchaseOrder = SiteContext.Current.OrderContext.GetBasket().PurchaseOrder;
decimal shippingPrice = 0;
int shippingMethod = 0;
int i = 0;
int indexforshipping = 0;
if(Request.Form["isPostBack"] != null)
{
int index = 0;
foreach (var line in purchaseOrder.OrderLines)
{
if(Request.Form["quantityInput_" + @index.ToString()] == "0")
{
line.Delete();
}
else
{
line.Quantity = int.Parse(Request.Form["quantityInput_" + @index.ToString()]);
line.Update();
}
index++;
}
}
Library.ExecuteBasketPipeline();
}
First questions: Do you have an HTML input called "isPostBack" in the posted form? If not, the code will never be executed.
I do but i managed to figure it out i need to call the SiteContext.Current.OrderContext.GetBasket().PurchaseOrder again to get the right price. seems the reffrence i got is not updated.
Thanks :)
The framework is great to work with by the way :)
Hi Klaus,
I'm glad to here that. Thank you for your positive feedback. Much appreciated.
is working on a reply...