|
Home > Archive > Commerce Server General > November 2007 > Tax Exempt Customers, Profiles, and Custom Pipelines
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 |
Tax Exempt Customers, Profiles, and Custom Pipelines
|
|
| Andy Meadows 2007-11-17, 1:22 am |
| My current customer has a need to support tax exempt customers -- not
individual products, but the customer itself is marked as tax exempt. I
have found no "built-in" support for tax exemption at the User or
Organization Profile level and am altering the profile at both the user and
organization level to support this.
My problem, then, is how do I retrieve this information from the pipeline.
Assuming I have an organization that is tax exempt and I can retrieve the
value in a form similar to
OrganizationProfile.Property["GeneralInformation.is_tax_exempt"] == true),
how can I get this value when I'm in the pipeline.
In dealing with the user profile, the same issue arises. All sample code I
have seen passes the UserProfile object into the pipeline context through
the Profiles part of the context as such:
pipeline.Profiles.Add("UserObject", CommerceContext.Current.UserProfile);
I'm assuming there's a reason it's done like this and not added directly to
the context dictionary (actually curious about this but atm it's not the
most pressing issue). That said, how can I retrieve the current user
profile -- or any profile for that matter -- from within the Execute method
of the custom pipeline? Can I safely pass the profile object directly in
the context without using the Profiles collection of the PipelineInfo
object?
Thanks in advance for your response.
Andy M.
| |
| Andy Meadows 2007-11-17, 1:22 am |
| Anyone?
> My current customer has a need to support tax exempt customers -- not
> individual products, but the customer itself is marked as tax exempt. I
> have found no "built-in" support for tax exemption at the User or
> Organization Profile level and am altering the profile at both the user
> and organization level to support this.
>
> My problem, then, is how do I retrieve this information from the pipeline.
> Assuming I have an organization that is tax exempt and I can retrieve the
> value in a form similar to
> OrganizationProfile.Property["GeneralInformation.is_tax_exempt"] == true),
> how can I get this value when I'm in the pipeline.
>
> In dealing with the user profile, the same issue arises. All sample code
> I have seen passes the UserProfile object into the pipeline context
> through the Profiles part of the context as such:
>
> pipeline.Profiles.Add("UserObject", CommerceContext.Current.UserProfile);
> I'm assuming there's a reason it's done like this and not added directly
> to the context dictionary (actually curious about this but atm it's not
> the most pressing issue). That said, how can I retrieve the current user
> profile -- or any profile for that matter -- from within the Execute
> method of the custom pipeline? Can I safely pass the profile object
> directly in the context without using the Profiles collection of the
> PipelineInfo object?
>
> Thanks in advance for your response.
> Andy M.
>
>
|
|
|
|
|