|
Home > Archive > Commerce Server General > July 2005 > Customizing the purchase order
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 |
Customizing the purchase order
|
|
| Yousry 2005-06-18, 5:48 pm |
| Hi,
I have question regarding the commerce server purchase order. I have a
requirement that whenever we submit an order to CS we have to bundle
this order with a few custom properties. For example if we are selling
hotel room the order should be customized by the checkin and checkout
dates and so on.
So is there a feature in CS that allows this functionality. If not , is
it a suitable idea to save the order first and then save our custom
fields in a separate table. If this is to be done , how could we
enfource transaction support on such scenario. Assume the custom field
saving fails , how can I rollback the order already saved in the CS
database.
Sorry for the long topic.
All comments are very appreciated
Thanks
| |
| Ravi Shankar 2005-06-19, 2:47 am |
| Hi Yousry,
You can extend the Commerce Server Order object to store additional
information by using the ".item" property..
so a basket.item("checkin_date") = .....
basket.item("expected_chackout_date") = ....
would provide you with this functionality. This information is typically
stored in the "marshalled_data" column of the tables.
If you want it available as visible fields in SQL (a FAQ ) then you'd
need to create appropriate fields in the OrderGroup or OrderGroupHeader
Tables and when you call basket.SaveAsOrder Commerce Server would persist
these values into the undelying fields (in the item(key) -> key should be the
name of the field.)
Have fun.
"Yousry" wrote:
> Hi,
> I have question regarding the commerce server purchase order. I have a
> requirement that whenever we submit an order to CS we have to bundle
> this order with a few custom properties. For example if we are selling
> hotel room the order should be customized by the checkin and checkout
> dates and so on.
>
> So is there a feature in CS that allows this functionality. If not , is
> it a suitable idea to save the order first and then save our custom
> fields in a separate table. If this is to be done , how could we
> enfource transaction support on such scenario. Assume the custom field
> saving fails , how can I rollback the order already saved in the CS
> database.
>
> Sorry for the long topic.
>
> All comments are very appreciated
>
> Thanks
>
>
| |
| dukenukem 2005-06-20, 5:18 am |
| Hi, Yousry
I'm working on a hotel solution using CS2002.
Can you help-me solving and highlight-me with my problem.
My e-mail is: research@oninetspeed.pt
Thanks | |
| Ziver MALHASOGLU 2005-06-27, 2:48 am |
| Hi Ravi,
Thank you for your informative answer.
Do you have a sample code or an article about this issue?
Regards,
Ziver
"Ravi Shankar" <shankycheil@newsgroup.nospam> wrote in message
news:7611FB1F-D89A-4D72-91B6-7A247184BCC4@microsoft.com...[vbcol=seagreen]
> Hi Yousry,
>
> You can extend the Commerce Server Order object to store additional
> information by using the ".item" property..
>
> so a basket.item("checkin_date") = .....
> basket.item("expected_chackout_date") = ....
>
> would provide you with this functionality. This information is typically
> stored in the "marshalled_data" column of the tables.
>
> If you want it available as visible fields in SQL (a FAQ ) then you'd
> need to create appropriate fields in the OrderGroup or OrderGroupHeader
> Tables and when you call basket.SaveAsOrder Commerce Server would persist
> these values into the undelying fields (in the item(key) -> key should be
> the
> name of the field.)
>
> Have fun.
>
>
> "Yousry" wrote:
>
| |
| Ravi Shankar 2005-06-27, 5:51 pm |
| No Ziver, I don't have an article to point you to.
I remember this being in the Commerce Server Docs (where I couldn't exactly
trace).
If you want to try it out then in your accept/purchase pipeline add a custom
stage (Scriptor). To this stage add code like
counter = 1
for each item in orderform.items
item.value("lineitem_number") = counter
counter = counter + 1
next
orderform.value("number_of_lines") = counter - 1
Close & Save the pipeline. Next using SQL Enterprise Manager go to your site
database and locate "OrderFormHeader" & "OrderFormLineItems" tables. Open the
"OrderFormHeader" table for "DESIGN" and add a field "number_of_lines" of
type int in it. Similarly open "OrderFormLineItems" in design mode and add a
field "lineitem_number" of type int in it.
Through a site, execute and complete an order. Go to the DB and check for
values in those fields. You'd find the values assigned stored in the DB.
If you don't define the fields in the tables, the data would still get
stored but would be available as "marshalled_data" )
Have Fun !
"Ziver MALHASOGLU" wrote:
> Hi Ravi,
>
> Thank you for your informative answer.
>
> Do you have a sample code or an article about this issue?
>
> Regards,
> Ziver
>
>
> "Ravi Shankar" <shankycheil@newsgroup.nospam> wrote in message
> news:7611FB1F-D89A-4D72-91B6-7A247184BCC4@microsoft.com...
>
>
>
| |
| Nihit Kaul [MSFT] 2005-07-06, 5:51 pm |
| Hi Yousry,
You can see the following topic in the CS 2002 documentation for more
details about this.
Order Processing programming Concepts
Also - read up about DBStorage and the OrderGroupSearch if you want to
search on these properties etc.
Thanks,
Nihit Kaul[MSFT]
Commerce Server
http://blogs.msdn.com/nihitk
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
--------------------
Thread-Topic: Customizing the purchase order
thread-index: AcV7On9MFmaVSRd+Sta5ve88i21pbQ==
X-WBNR-Posting-Host: 59.92.139.220
From: =?Utf-8?B?UmF2aSBTaGFua2Fy?= <shankycheil@newsgroup.nospam>
References: <1119104731.778107.146340@g49g2000cwa.googlegroups.com>
<7611FB1F-D89A-4D72-91B6-7A247184BCC4@microsoft.com>
<uoFdBIueFHA.3040@TK2MSFTNGP14.phx.gbl>
Subject: Re: Customizing the purchase order
Date: Mon, 27 Jun 2005 10:06:02 -0700
Lines: 91
Message-ID: <09BEE8E2-B47F-424B-9244-4C3059E26602@microsoft.com>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.commerceserver.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.commerceserver.general:2932
X-Tomcat-NG: microsoft.public.commerceserver.general
No Ziver, I don't have an article to point you to.
I remember this being in the Commerce Server Docs (where I couldn't exactly
trace).
If you want to try it out then in your accept/purchase pipeline add a
custom
stage (Scriptor). To this stage add code like
counter = 1
for each item in orderform.items
item.value("lineitem_number") = counter
counter = counter + 1
next
orderform.value("number_of_lines") = counter - 1
Close & Save the pipeline. Next using SQL Enterprise Manager go to your
site
database and locate "OrderFormHeader" & "OrderFormLineItems" tables. Open
the
"OrderFormHeader" table for "DESIGN" and add a field "number_of_lines" of
type int in it. Similarly open "OrderFormLineItems" in design mode and add
a
field "lineitem_number" of type int in it.
Through a site, execute and complete an order. Go to the DB and check for
values in those fields. You'd find the values assigned stored in the DB.
If you don't define the fields in the tables, the data would still get
stored but would be available as "marshalled_data" )
Have Fun !
"Ziver MALHASOGLU" wrote:
> Hi Ravi,
>
> Thank you for your informative answer.
>
> Do you have a sample code or an article about this issue?
>
> Regards,
> Ziver
>
>
> "Ravi Shankar" <shankycheil@newsgroup.nospam> wrote in message
> news:7611FB1F-D89A-4D72-91B6-7A247184BCC4@microsoft.com...
persist[vbcol=seagreen]
be[vbcol=seagreen]
>
>
>
|
|
|
|
|