|
| 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
|
|