Commerce Server General - Re: Pipeline problem with diferent pricing for different customer

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > March 2005 > Re: Pipeline problem with diferent pricing for different customer





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

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

2005-03-25, 5:49 pm

Bobby,
This is how i used in the pipeline. I created a Scriptor component in
the basket pipeline under the Stage Order Adjust Price and put the
following code :

Function MSCSExecute(config, orderform, context, flags)
On Error Resume Next
intCount = orderform.items.count -1
for i = 0 to intCount
If orderform.value("ADD15") = "Y"
orderform.items(i).Value("_cy_iadjust_currentprice") =
orderform.items(i).Value("_product_cy_list_price") + 15
orderform.items(i).Value("cy_placed_price") =
orderform.items(i).Value("_product_cy_list_price") + 15
orderform.items(i).Value("_cy_iadjust_regularprice") =
orderform.items(i).Value("_product_cy_list_price") + 15
orderform.items(i).Value("cy_unit_price") =
orderform.items(i).Value("_product_cy_list_price") + 15
Else
orderform.items(i).Value("_cy_iadjust_currentprice") =
orderform.items(i).Value("_product_cy_list_price")
orderform.items(i).Value("cy_placed_price") =
orderform.items(i).Value("_product_cy_list_price")
orderform.items(i).Value("_cy_iadjust_regularprice") =
orderform.items(i).Value("_product_cy_list_price")
orderform.items(i).Value("cy_unit_price") =
orderform.items(i).Value("_product_cy_list_price")
End if
next
MSCSExecute = 1
End Function

If you want to check in item level then replace
If orderform.value("ADD15") = "Y" with If
orderform.items(i).value("ADD15") = "Y"

The only differnce i could see between your code and my code is i am
using orderform.value("ADD15") and you are using
Orderform.[shopper_type]. The word 'Value' is missing in your code
while accessing dictionary.
It looks like in the dump you are getting the value for
Orderform.[shopper_type]. Is the dump is from basket page or is it from
Payment page ? If it is from basket page, then you are good to go. You
can use : If orderform.items(i).value("shopper_type") = "1"

Hope this helps,

Regards

Ravi

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com