Checkout - saving to order user-defined subtotal
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 > Checkout - saving to order user-defined subtotal




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

    Checkout - saving to order user-defined subtotal  
Ripos


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


 
09-21-05 10:52 PM

In the Cart class we define our own scheme of calculating SubTotal field=
.
That's OK for showing it in the ShoppingCart, but when we use  =

SaveAsOrder(), then
original field is saved.
All instances of this field is read-only and the class Basket is sealed =
in  =

the assembly.

How can we save our own SubTotal field to the order?

We use CS2002+FP1+SP3+Starter site





[ Post a follow-up to this message ]



    Re: Checkout - saving to order user-defined subtotal  
Colin Bowern


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


 
09-21-05 10:52 PM

Hello Ripos,

When you execute a SaveAsOrder the returning value is a PurchaseOrder object
.
That is where you should be pulling values from after executing that method.
You can access all of the fields at the Order Group or Order Form level
through that object.  The PurchaseOrder object is essentially a dictionary
object so all fields, like in the basket and order form objects, are accessi
ble
with keys (e.g. Receipt["saved_cy_total_total"])

If you want to persist your own fields in the database outside of the marsha
led
data contents you need to create a column in the table with the same key
name.   For example we have added several fields to the database:

saved_cy_oadjust_subtotal
saved_cy_orderlevel_discounts_subtotal
saved_cy_shipping_total
etc..

Hope that helps.
Colin


> In the Cart class we define our own scheme of calculating SubTotal
> field
> .
> That's OK for showing it in the ShoppingCart, but when we use
> SaveAsOrder(), then
> original field is saved.
> All instances of this field is read-only and the class Basket is
> sealed
> in
> the assembly.
>
> How can we save our own SubTotal field to the order?
>
> We use CS2002+FP1+SP3+Starter site
>







[ Post a follow-up to this message ]



    RE: Checkout - saving to order user-defined subtotal  
Ravi Shankar


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


 
09-21-05 10:52 PM

Hi Ripos,

The SubTotal is calculated in the "Basket" pipeline through a component. You
should replace it with one that calcualtes the subtotal the way you want it.
You would need to write this component.
--
Ravi Shankar


"Ripos" wrote:

> In the Cart class we define our own scheme of calculating SubTotal field..
> That's OK for showing it in the ShoppingCart, but when we use
> SaveAsOrder(), then
> original field is saved.
> All instances of this field is read-only and the class Basket is sealed in
> the assembly.
>
> How can we save our own SubTotal field to the order?
>
> We use CS2002+FP1+SP3+Starter site
>





[ Post a follow-up to this message ]



    Re: Checkout - saving to order user-defined subtotal  
Ripos


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


 
09-23-05 01:58 AM

Ok. This is a good solution. But can you help me with understanding of  =

mapping
dictionary keys to the columns of DB.
Consists resulting Order object of OrderGroup's columns only?

Some of columns (such as 'saved_cc_number') are found at OrderFormHeader=
.  =

How can
I wrote to those fields?
If some fields are in OrderLineItems table, have I to write to Dictionar=
y  =

of a
LineItem object?

PS. your answer was Very helpful. Thank you.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 07:20 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