Commerce Server General - Access ordergroup_id within scriptor in pipeline

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > January 2006 > Access ordergroup_id within scriptor in pipeline





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 Access ordergroup_id within scriptor in pipeline
Sam

2006-01-29, 9:09 pm

Hi,

I am creating a scriptor component in a checkout pipeline to send the
customer a confirmation email.

I have the following code so far:

========================================
============================
'The following entry points are available (shown in VBScript format):

function MSCSExecute(config, orderform, context, flags)

dim objMail
'set objMail = CreateObject("CDO.Message")
'objMail.subject =
"http://www.healthchemist-beta.co.nz/confemail.asp?ordergroup_id=" &
orderform.value("ordergroup_id") ' "Thank you for your order"
'objMail.from = "service@healthchemist.co.nz"
'objMail.to = orderform.value("user_email_address")

'objMail.CreateMHTMLBody
"http://www.healthchemist-beta.co.nz/confemail.asp?ordergroup_id=" &
orderform.[ordergroup_id]

'objMail.send

'set objMail = nothing
MSCSExecute = 1
end function

sub MSCSOpen(config)



end sub

========================================
===========================

My problem is that I cannot access the ordergroup_id to pass to the asp
script. Is there anyway I can access and pass the ordergroup_id here?

Thanks.


Sam.
Ravi Shankar

2006-01-29, 9:09 pm

Hi Sam,

The ordergroup_id would not exist if the basket has not be converted to an
order through the basket.SaveAsOrder() call. The things such as order
confirmations, etc are typically carried out under the "Accept" stages in a
separate pipeline which one'd typically called after the checkout. The accept
pipeline would be run on the resultant purchaseorder object
(purchaseorder.runpipeline call), where you'd be able to access the
ordergroup_id by using the orderform.ParentOrderGroup.OrderGroupID.

--
Ravi Shankar


"Sam" wrote:

> Hi,
>
> I am creating a scriptor component in a checkout pipeline to send the
> customer a confirmation email.
>
> I have the following code so far:
>
> ========================================
============================
> 'The following entry points are available (shown in VBScript format):
>
> function MSCSExecute(config, orderform, context, flags)
>
> dim objMail
> 'set objMail = CreateObject("CDO.Message")
> 'objMail.subject =
> "http://www.healthchemist-beta.co.nz/confemail.asp?ordergroup_id=" &
> orderform.value("ordergroup_id") ' "Thank you for your order"
> 'objMail.from = "service@healthchemist.co.nz"
> 'objMail.to = orderform.value("user_email_address")
>
> 'objMail.CreateMHTMLBody
> "http://www.healthchemist-beta.co.nz/confemail.asp?ordergroup_id=" &
> orderform.[ordergroup_id]
>
> 'objMail.send
>
> 'set objMail = nothing
> MSCSExecute = 1
> end function
>
> sub MSCSOpen(config)
>
>
>
> end sub
>
> ========================================
===========================
>
> My problem is that I cannot access the ordergroup_id to pass to the asp
> script. Is there anyway I can access and pass the ordergroup_id here?
>
> Thanks.
>
>
> Sam.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com