Rank: Administration
Groups: Administration
Joined: 10/8/2008(UTC) Posts: 190  Was thanked: 1 time(s) in 1 post(s)
|
Hi Gregdfd, For Creating discount for each loged in user, you can use an open control to add atricles into the shoppingcart. the code for this is basicly Code:
Dim ErrString as string = ""
Dim UserEscapeIndex as integer = pbw.UserEscape_Shop_UserEscape_Index("SOURCESHOP25", Cid, False, pbw.Get_RunSource_CreateAssembly, pbw.Get_RunSource_RunFromAssembly(), Server, Request, Session, Constring, "", "", Response, errstring)
Dim ShopSettingIndex as integer = pbw.UserEscape_Shop_Settings_Index("SOURCESHOP24", Cid, False, pbw.Get_RunSource_CreateAssembly, pbw.Get_RunSource_RunFromAssembly(), Server, Request, Session, Constring, "", "", Response, errstring)
pbw.Shop_Cart_Add(ShopSettingIndex,UserEscapeIndex,Httpcontext.current.Session, Id, Amount,Price, "", "", "", "", "", "", "", "", "", "", constring)
Amount is the number of items you want to add, mostly 1 of the time, price is de price this custumer has to pay, I think you can calculate it with the original price and customerdiscount. And Id is the Id of the article you want to add into the shoppingcart.
|