You can for example add this method in class cartprovider:
Thanks.
I see no update on Google Code.
So I'm trying to update the CartProvider class, but I get the
following build error :
Erreur 2 'System.Collections.Generic.List<ShoppingCart.CartItem>' ne
contient pas une définition pour 'Select' et aucune méthode
d'extension 'Select' acceptant un premier argument de type
'System.Collections.Generic.List<ShoppingCart.CartItem>' n'a été
trouvée (une directive using ou une référence d'assembly est-elle
manquante ?) C:\SVN\OL\eCommerce\trunk\OLFidelite\ShoppingCart
\CartProvider.cs 122 33 ShoppingCart
(for english readers : no definition for 'Select' method, using /
assembly reference may be missing)
I've tried to add System.Data.Linq.
No change.
Any idea?
;)
> Hi,
>
> You can for example add this method in class cartprovider:
>
> public int DistinctProductCount
> {
> get
> {
> if (List != null)
> {
> return List.Select(i => i.ProductId).Distinct().Count();
> }
> return 0;
> }
> }
>
> I have just add it in the code that you can find on GoogleCode
>
> Marc
>
> 2008/11/12 ZaR <cesar.outre...@gmail.com>
>
>
>
>
>
> > Hello,
>
> > Is there a quick way to get the count of products including
> > quantities ?
>
> > Example :
> > in cart : 2 products A + 1 products B -> get the count=3 (and not 2 as
> > in "You have <%#Container.Count%> products." in
> > <manyitemscartitemtemplate>.)
>