I've seen the email templates and how they can tie into order workflow states, but what if you need to perform custom processing on orders when they hit certain states? An example is if there is existing backoffice software that needs to be "fed" information via xml:
So...say I want to create a file called order_[ordernumber]_.xml when the order hits the "Order was placed" state and save it to a special folder on the server, how would I go about doing this? Is there a built-in way to accomplish something like this or does it require digging into CommerceBuilder via the CommerceBuilder source license?
Is there some other way/option I'm not aware of to get Able to communicate with outside software?
Tap into Order Workflow
Re: Tap into Order Workflow
Gold R4 has the ability to export order in CSV and XML formats.Is there some other way/option I'm not aware of to get Able to communicate with outside software?
In order to accomplish this one way could be to edit your Website/Conlib/Checkout/PaymentWidget.ascx.cs file and then locate following event handlerSo...say I want to create a file called order_[ordernumber]_.xml when the order hits the "Order was placed" state and save it to a special folder on the server, how would I go about doing this? Is there a built-in way to accomplish something like this or does it require digging into CommerceBuilder via the CommerceBuilder source license?
Code: Select all
private void HandleCheckoutResponse(object sender, CheckedOutEventArgs e)
{
................
................
}
Code: Select all
if (e.CheckoutResponse.Success)
{
Order order = e.CheckoutResponse.Order;
// YOUR CUSTOM CODES RELATED TO THIRD PARTY CAN BE HERE
}
-
- Ensign (ENS)
- Posts: 12
- Joined: Thu Jan 31, 2013 4:53 pm
Re: Tap into Order Workflow
Awesome, thank you mazhar. That looks like it should work.
How does this affect upgrading? I guess it's inevitable that when upgrading I would have to re-apply any custom code changes made to the user controls (or build my own and update my custom controls with any new logic added form Able in an update)?
So, let's say I wanted to investigate the CommerceBuilder Source option. Can I achieve the same thing as above with that? Would that be a way to make code customizations "disconnected" from the rest of the AbleCommerce install? If so that would be ideal, because I'd much rather be able to update when new Able releases become available and have as little extra work as possible.
Is there any official documentation about the CommerceBuilder in regards to using the source license to make customizations?
How does this affect upgrading? I guess it's inevitable that when upgrading I would have to re-apply any custom code changes made to the user controls (or build my own and update my custom controls with any new logic added form Able in an update)?
So, let's say I wanted to investigate the CommerceBuilder Source option. Can I achieve the same thing as above with that? Would that be a way to make code customizations "disconnected" from the rest of the AbleCommerce install? If so that would be ideal, because I'd much rather be able to update when new Able releases become available and have as little extra work as possible.
Is there any official documentation about the CommerceBuilder in regards to using the source license to make customizations?
Re: Tap into Order Workflow
Agreed I think at some point you will be needing to merge updates with your custom changes in user controls or pages.How does this affect upgrading? I guess it's inevitable that when upgrading I would have to re-apply any custom code changes made to the user controls (or build my own and update my custom controls with any new logic added form Able in an update)?
The above task can be accomplished without commercebuilder source and in discontinued way. AbleCommerce Gold is making use of Windosr IOC container. This means there are some services that can be hooked by using configurations. The above solution was somthing rather simple and easy but same can be done by providing your custom Checkout service. In that service you can have your custom codes. I am going to attach a sample project containing example about how to provide custom checkout service where I am simply calling default checkout service to do the checkout. The project contains a config file called Windsor.Config, you need to place it under you Website/App_Data folder and then you need to copy AbleExtension dll to your bin folder. Then make a test checkout and order-{id}.xml file should appear under your app_data. You may need to set the CommerceBuilder reference in project. That will point to CommerceBuilder.dll you have in your Lib or Bin folder.So, let's say I wanted to investigate the CommerceBuilder Source option. Can I achieve the same thing as above with that? Would that be a way to make code customizations "disconnected" from the rest of the AbleCommerce install? If so that would be ideal, because I'd much rather be able to update when new Able releases become available and have as little extra work as possible.
You can found the CommerceBuilder documentation here http://wiki.ablecommerce.com/index.php/ ... uilder_API
Re: Tap into Order Workflow
BTW Here is post about how to upgrade havily customized site viewtopic.php?f=47&t=10082. This post was for AC 7 hopefully it will be handy for Gold too.
-
- Ensign (ENS)
- Posts: 12
- Joined: Thu Jan 31, 2013 4:53 pm
Re: Tap into Order Workflow
Awesome, thank you! Using SVN and then merging customizations into the new version makes perfect sense!