Pipeline problem with diferent pricing for different customer grou
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Commerce Server > Commerce Server General > Pipeline problem with diferent pricing for different customer grou




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Pipeline problem with diferent pricing for different customer grou  
bobby


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-24-05 07:50 AM

Hi:
I have a commerce site and I am trying to create differnt pricing based on
the session id that I create at login.  I added a scriptor before Validate
Ship-To in the plan pipeline here is the code:
'The following entry points are available (shown in VBScript format):

function MSCSExecute(config, orderform, context, flags)


if Orderform.[_shopper_type] =  "1" then
for each item in orderform.items
item.[_product_list_price] = item.[_product_list_price]  * .75
next
else

if Orderform.[_shopper_type]  = "2" then
for each item in orderform.items
item.[_product_list_price] = item.[_product_list_price]  * .5
next
else

for each item in orderform.items
item.[_product_list_price] = item.[_product_list_price]
next

end if
end if

MSCSExecute = 1

end function

sub MSCSOpen(config)

end sub


sub MSCSClose()

end sub

and in my basket.asp I added this:
Set Orderform = Server.CreateObject("Commerce.Dictionary")
Orderform.[_shopper_type] = "1"
but it does not working the only condition it recognises is the last one in
my pipeline which is:
else

for each item in orderform.items
item.[_product_list_price] = item.[_product_list_price]
would you please tell me what am I doing wrong or is there a better way to
do this.
Best Regards





[ Post a follow-up to this message ]



    Re: Pipeline problem with diferent pricing for different customer grou  
Ravi


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
03-24-05 12:51 PM

Bobby,
Here are few thing you can try :
1) Dump the values to a log file before you call this component and
make sure you are getting the right value for
Orderform.[_shopper_type]. There is a Dumporder.vbs file that comes
with CS2002. You can use this to write log.
2) I have done this kind of discount in my projects, but i have put
this code in Basket pipeline. Try putting it in basket pipeline.
3) Create the dictionary variable as Orderform.[shopper_type] instead
of Orderform.[_shopper_type].  Dont start with underscore character.

Hope this helps,

Regards

Ravi






[ Post a follow-up to this message ]



    Re: Pipeline problem with diferent pricing for different customer grou  
Matt Nield


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
04-18-05 12:53 PM

Hi There,

Looking at what you are trying to do, you seem to have a  very consistent
requirement for changing prices.  As a suggestion, why not use Virtual
Catalogs and Catalog Sets to achieve this?  When building the virtual
catalogs for shopper type 1 and 2, you can then apply a 75% and 50% pricing
rule (respectively) across the two new virtual catalogs and use the
shopper_type to drive the user catalog set.  IT will also give you al little
more control if you wish to restrict products for these types of user.

Hope this helps and you get it sorted

Regards

Matt

"bobby" <bobby@discussions.microsoft.com> wrote in message
news:EEAD32A5-FE4B-4366-A1F9-13E91CF2E290@microsoft.com...
> Hi:
> I have a commerce site and I am trying to create differnt pricing based on
> the session id that I create at login.  I added a scriptor before Validate
> Ship-To in the plan pipeline here is the code:
> 'The following entry points are available (shown in VBScript format):
>
> function MSCSExecute(config, orderform, context, flags)
>
>
> if Orderform.[_shopper_type] =  "1" then
> for each item in orderform.items
>    item.[_product_list_price] = item.[_product_list_price]  * .75
>  next
> else
>
> if Orderform.[_shopper_type]  = "2" then
> for each item in orderform.items
>    item.[_product_list_price] = item.[_product_list_price]  * .5
>  next
> else
>
> for each item in orderform.items
>    item.[_product_list_price] = item.[_product_list_price]
>  next
>
> end if
> end if
>
>    MSCSExecute = 1
>
> end function
>
> sub MSCSOpen(config)
>
> end sub
>
>
> sub MSCSClose()
>
> end sub
>
> and in my basket.asp I added this:
> Set Orderform = Server.CreateObject("Commerce.Dictionary")
> Orderform.[_shopper_type] = "1"
> but it does not working the only condition it recognises is the last one
> in
> my pipeline which is:
> else
>
> for each item in orderform.items
>    item.[_product_list_price] = item.[_product_list_price]
> would you please tell me what am I doing wrong or is there a better way to
> do this.
> Best Regards







[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 03:28 PM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register