Copied to clipboard

Flag this post as spam?

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


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Klaus Pedersen 15 posts 71 karma points
    Apr 06, 2011 @ 11:06
    Klaus Pedersen
    0

    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();

    }

  • Søren Spelling Lund 1797 posts 2786 karma points
    Apr 06, 2011 @ 11:40
    Søren Spelling Lund
    0

    First questions: Do you have an HTML input called "isPostBack" in the posted form? If not, the code will never be executed.

  • Klaus Pedersen 15 posts 71 karma points
    Apr 06, 2011 @ 22:17
    Klaus Pedersen
    0

    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 :)

     

  • Søren Spelling Lund 1797 posts 2786 karma points
    Apr 07, 2011 @ 08:18
    Søren Spelling Lund
    0

    Hi Klaus,

    I'm glad to here that. Thank you for your positive feedback. Much appreciated.

Please Sign in or register to post replies

Write your reply to:

Draft