Tutorial: Importing and exporting contracts
This tutorial explains how to import and export contracts through two separate methods. One method utilizes the WebSphere Commerce Accelerator user interface, and the other method involves importing or exporting the XML files that define the contract. Not all of the contract functionality is available through the Commerce Accelerator, and therefore importing and exporting the XML files directly often gives you more options. Your contracts may individually specify thousands of products, so it would not be practical in such cases to use the user interface to set up these contracts. In this tutorial we will first learn about the XML files that define contracts, and then we will import and export a contract using both the Commerce Accelerator and the XML files directly.
Learning objectives
After completing this tutorial, you should be able to import and export contracts using both the Commerce Accelerator, and the contract XML files directly.
Time required
Expect this tutorial to take 2 hours to complete.
Audience
This tutorial is designed for those people who are interested in learning how to import and export contracts into stores.
Prerequisites
You have installed WebSphere Commerce Developer, and published the B2BAdvanced starter store.
ResourcesDownload the sample code zip file related to this tutorial. Included in the zip file is a useful utility that you can use to import and export accounts and contracts. This utility is explained in step 4. The zip file also includes sample accounts and contracts that you can use as references for complete XML syntax.
Lessons in this tutorial
- Understand contract XML files
In this section of the tutorial we will learn what XML formats are supported, where the XML files are located by default, and about the contents of the XML files.
- Import and exporting a contract using the WebSphere Commerce Accelerator
The easiest way to import and export contracts is through the WebSphere Commerce Accelerator. Although, some functionality of contracts cannot be implemented in this way. In those cases it would be necessary to import and export contracts using the XML files directly, as discussed in the next step of this tutorial.
- Import and exporting a contract using XML files
In this step of the tutorial, we will learn how to import and export contracts using the XML files that define those contracts, as well as some simple utilities supplied with WebSphere Commerce.
- HTML Utility for importing and exporting contracts
This section of the tutorial explains HTML Utility for importing and exporting contracts.
- Canadian tax configuration
This sample demonstrates how to load the Canadian taxes into a WebSphere Commerce database and test the taxes in the store using a modified JSP page. This is a sample scenario you can follow the instructions and modify the rates to match the current tax rates and settings. For more information about changing the tax rates, see Update the WebSphere Commerce tax configuration to match the current tax rate.