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.

  • feri 5 posts 25 karma points
    Mar 04, 2011 @ 08:40
    feri
    0

    Current basket total item?

    What's the best way to get the current basket total item programatically ?

    Thank You

    Feri

  • Søren Spelling Lund 1797 posts 2786 karma points
    Mar 04, 2011 @ 12:37
    Søren Spelling Lund
    0
    SiteContext.Current.OrderContext.GetBasket().PurhcaseOrder.OrderTotal

    Make sure that you've executed the basket pipeline at least once to have the latest value reflected in the total fields.

  • feri 5 posts 25 karma points
    Mar 07, 2011 @ 02:36
    feri
    0

    Hi Soren,

    Thanks for the reply, But the OrderTotal properties is the dollar value of the order. Is there away we know the number of item/s in the basket?

    Thanks You

    Feri

  • Christian Wendler 46 posts 155 karma points
    Mar 08, 2011 @ 00:55
    Christian Wendler
    0

    Hm, do you mean something like purchase.OrderLines.Count() (number of different items in basket)?

    Or do you want the total of all item quantities? This should work like this: int total = purchaseOrder.OrderLines.Sum(ol => ol.Quantity);

     

    bye

    Christian

  • feri 5 posts 25 karma points
    Mar 08, 2011 @ 05:20
    feri
    0

    Perfect!!

    Thank You Christian.

    If my question is confusing. I am sorry. :)

    Feri

Please Sign in or register to post replies

Write your reply to:

Draft