Creating store data assets in an XML file
Create your store assets in the format of XML files that can be loaded into the database using the loading utilities. If you are creating a globalized store, you may want to create separate XML files for each locale your store supports. The locale-specific file should specify all description information, so it can be easily translated.
About this task
For more information about the loading utilities, see Loading utilities.
The starter stores, from which
many of the examples in these tasks are taken, use one store.xml
file for all
information that does not need to be translated, and another store.xml
file for
each locale the store supports, for the information that needs to be translated. The locale-specific
files contain all the description information.
You can change the store data assets by using the WebSphere Commerce Accelerator.
Procedure
-
Create an XML file that follows the wcs.dtd. The DTD file is located in
the following directory:
- WC_installdir/schema/xml
- WCDE_installdir/schema/xml
-
Define a store entity in the STOREENT table, for example:
<storeent storeent_id="@storeent_id_1" member_id="&MEMBER_ID;" type="S" identifier="&STORE_IDENTIFIER;" setccurr="USD" />
-
Create a store address in the STADDRESS table. If you are creating a globalized store, you should include this information in a
locale-specific XML file.
<staddress staddress_id="@staddress_id_en_US_1" member_id="&MEMBER_ID;" nickname="storeaddress_en_US" address1="12xx Martindale Avenue" address2="Suite 9xx" businesstitle="ConsumerDirect" city="Clothesville" state="Ontario" zipcode="Lxx 1xx" country="Canada" phone1="1-800-555-1234" fax1="1-800-555-4321" email1="info@ConsumerDirect.xxx" />
-
Create a description for the store entity in the STOREENTDS table. If you are creating a globalized store, you should include this
information in a locale-specific XML file.
<storeentds description="Commerce Model Store entity" language_id="&en_US;" displayname="ConsumerDirect" storeent_id="@storeent_id_1" staddress_id_cont="@staddress_id_en_US_1" staddress_id_loc="@staddress_id_en_US_1" />
-
Create a store entity by adding information to the STORE table.
<store store_id="@storeent_id_1" directory="&STORE_DIR;" ffmcenter_id="@ffmcenter_id_1" language_id="&en_US;" storegrp_id="-1" allocationgoodfor="0" bopmpadfactor="0" ffmcselectionflags="0" rejectedordexpiry="259200" rtnffmctr_id="@ffmcenter_id_1" pricerefflags="0" storetype="B2C" quotegoodfor="1" />
-
Define a supported language for the store by adding information to the STORELANG table. If your store supports multiple languages, you should include this information in a
locale-specific XML file (one for each language your store supports).
<storelang language_id="&en_US;" storeent_id="@storeent_id_1" />
-
Define display information for each store language by adding information to the STORLANGDS table. If your store supports multiple languages, you should include this
information in a locale-specific XML file (one for each language your store supports).
<storlangds description="United States" language_id="&en_US;" storeent_id="@storeent_id_1" language_id_desc="&en_US;" />