04-07-04 11:58 AM
Hi Jorge,
Thanks a lot for your help. I could solve my problem.
Regards
Ajay
>-----Original Message-----
>Hi Ajay
>
>Look at these lines, may be you can find them a little
interesting.
>
> basketDiscountListItems = CType
(txContext.CartOrderForm.Item("_qualifying_discounts"),
SimpleList)
> allDiscounts = CType
(txContext.CartOrderForm.Item("_discounts"), ContentList)
> For Each basketDiscountItem In
basketDiscountListItems
> freeDiscount = allDiscounts.Search
("item_id", basketDiscountItem)
> If CInt(freeDiscount.Fields
("order_level").Value) = 0 Then ' ITEMLEVEL
> If CInt(freeDiscount.Fields
("offer_type").Value) = 2 Then ' Percentage
> If CInt(freeDiscount.Fields
("offer_value").Value) = 100 Then
> ' Assume: EXPRESSION NAME =
PRODUCT ID
> tempExprID =
freeDiscount.Fields("award_expr").Value
> Dim prodID as String =
expressionStoreObj. GetExprName(CInt(tempExprID))
> ' If the product doesn't have
variants then you can add it to the basket.
> End If
> End If
> End If
> Next
>
>Just for reference:
>
>Dim tempExprID as Object
>Dim basketDiscountListItems as SimpleList
>Dim allDiscounts as ContentList
>Dim freeDiscount as RowCollection
>Dim basketDiscountItem As Object
>
>Hope this help.
>
>Jorge
>
>.
>
[ Post a follow-up to this message ]
|