Skip to main content

Creating Shipping XML in WCS 7.0

Creating shipping assets using an XML file

Create your shipping 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

The starter stores, from which many of the examples in these tasks are taken, use one shipping.xml file for all information that does not need to be translated, and another shipping.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, so it can be easily translated.
To create shipping assets for your store using an XML file:
Procedure
  1. Create an XML file that follows the wcs.dtd file. The DTD file is located in the following directory:
  2. Define the jurisdictions and jurisdiction group to which you are shipping goods and services. All jurisdictions must belong to a jurisdiction group.
    1. Using the following example as your guide, define a jurisdiction group in your XML file in the JURSTGROUPtable:
      <jurstgroup
      jurstgroup_id="@jurstgroup_id_1"
      description="Jurisdiction Group1
      for Shipping"subclass="1"
      storeent_id="@storeent_id_1"
      code="World"
      markfordelete="0"
      />
    2. Using the following example as your guide, define a jurisdiction in your XML file in the JURST table.
      <jurst
      jurst_id="@jurst_id_1" 
      storeent_id="@storeent_id_1"
      code="World"
      subclass="1"
      markfordelete="0"
      />
    3. Using the following example as your guide, associate the jurisdiction you created in step b with the jurisdiction group you defined in step a, by adding information to the JURSTGPREL table.
      <jurstgprel
      jurst_id="@jurst_id_1"
      jurstgroup_id="@jurstgroup_id_1"
      subclass="1"/>
    4. Repeat steps a through c for all jurisdictions and jurisdiction groups your store supports.
  3. Define the shipping modes your store will use.
    1. Using the following example as your guide, define a shipping mode in your XML file for the SHIPMODE table:
      <shipmode
      shipmode_id="@shipmode_id_1"
      field1
      storeent_id="@storeent_id_1"
      code="Ground 1 week"
      carrier="XYZ Carrier"
      markfordelete="0"
      />
    2. Using the following example as your guide, add information about the shipping mode to the SHPMODEDSC table. If you are creating a multicultural store, you should include this information in a locale-specific XML file:
      <shpmodedsc
      description="International mail"
      field1="USD$5.00 per order plus USD$1.00 for each item"
      field2="5 business days"
      shipmode_id="@shipmode_id_1"
      language_id="&en_US;"/>
    3. Repeat steps a and b for all shipping modes in your store.
  4. Define the calculation codes to be used by your store.
    1. Using the following examples as your guide, define the calculation code in your XML file for the CALCODE table.
      <calcode calcode_id="@calcode_id_1" 
      code="shipping Code 1- per/order"
      calusage_id="-2" 
      storeent_id="@storeent_id_1"
      groupby="0" 
      published="1" 
      sequence="+0.00E+000" calmethod_id="-23"
      calmethod_id_app="-24"
      calmethod_id_qfy="-22"flags="0"
      />
    2. Using the following example as your guide, add the calculation code description information in your XML file for the CALCODEDSC table. If you are creating a globalized store, you should include this information in a locale-specific XML file.
      <calcodedsc
              calcode_id="@calcode_id_3"
              description="5.00USD per order"
              language_id="&en_US"        
              longdescription= "This shipping calculation code charges 5.00USD per order." />
    3. Repeat steps a and b for each calculation code used in your store.
  5. Define the calculation rules for your store.
    1. Using the following example as your guide, set up the calculation rule in your XML file for the CALRULE table:
      <calrule
      calrule_id="@calrule_id_1"
      calcode_id="@calcode_id_1"
      startdate="1900-01-01 00:00:00.000000"
      enddate="2100-01-01 00:00:00.000000"
      sequence="+1.00000000000000E+000"
      combination="2"
      calmethod_id="-27"
      calmethod_id_qfy="-26"
      flags="1"
      identifier="1"/>
    2. Repeat step a for each calculation rule used in your store. Note that each calculation code may have several calculation rules. For example, calcode_id="@calcode_id_1" may be associated with several calrule_ids.
  6. Define calculation scales for your store.
    A calculation scale is the set of ranges that will apply to the calculation. For example, for shipping costs you may have a set of weight ranges that each correspond to a particular cost. That is, a product that weighs between 0 to 5 kg might cost $10.00 to ship. And a product weighing 5 to 10 kg might cost $15.00 to ship. These ranges create a scale.
    1. Using the following example as your guide, set up the calculation scale in your XML file for the CALSCALE table:
      <calscale calscale_id="@calscale_id_1"
      code="Scale Code 1 per order USD"storeent_id="@storeent_id_1"
      calusage_id="-2"setccurr="USD"
      calmethod_id="-28"/>
    2. Repeat step a for each calculation scale used in your store.
  7. Define calculation ranges for the calculation scales.
    1. Using the following example as your guide, set up the calculation range in your XML file for the CALRANGE table.
      <calrangecalrange_id="@calrange_id_1"
      calscale_id="@calscale_id_1"calmethod_id="-33"
      rangestart="0.00000"cumulative="0"/>
    2. Repeat step a for each calculation range associated with the calculation scale used in your store.
  8. Define the calculation lookup values for the calculation scales. The calculation lookup values are the values associated with the calculation scale. For example, a calculation scale includes the following weight ranges and associated prices for shipping:
    • 0 to 5 kg costs $10.00
    • 5 to 10 kg costs $15.00
    The lookup values are $10.00 and $15.00.
    1. Using the following examples as your guide, set up the calculation lookup values in your XML file for the CALRLOOKUP table. If you are creating a multicultural store, you should include this information in a locale-specific XML file, that is, one file per locale that your store supports. For example, if your store ships to customers in the United States and Japan, you should add the US dollar lookup values in one XML file, and the Yen lookup values in another XML file.
      <calrlookup
      calrlookup_id="@calrlookup_id_1"
      setccurr="USD"
      calrange_id="@calrange_id_1"
      value="5.00"/>
    2. Repeat step a for each lookup value associated with the calculation scale used in your store.
  9. Associate the calculation rule and calculation scale
    1. Using the following examples as your guide, associate the calculate scale with the calculation rule in your XML file for the CRULESCALE table.
      <crulescale
       calrule_id="@calrule_id_1"
       calscale_id="@calscale_id_1" />
    2. Repeat step a for each calculation scale and rule association.

Shipping Data Model

Image map

Comments

Popular posts from this blog

How to read applied promotions codes

The below snippet will give you to read the promotions codes which are applied to order number, String orderId = "978593958"; OrderKey orderKey = new OrderKey(new Long(orderId)); PromotionArgumentSessionBeanPersistenceManager promoManager = new PromotionArgumentSessionBeanPersistenceManager(); PromotionArgument promArg = promoManager.load(orderKey); Iterator prmoExeRecds = promArg.getPromotionExecutionRecords(); while(prmoExeRecds.hasNext()) { PromotionExecutionRecord promotionExeecutionRecord = (PromotionExecutionRecord) prmoExeRecds.next(); Promotion promotion = promotionExeecutionRecord.getPromotion(); System.out.println("Name: " + promotion.getName()); System.out.println("Admin description: " + promotion.getDescription(commandContext.getLocale(), com.ibm.commerce.marketing.promotion.Description.SHOPPER_SHORT_DESC)); }

IBM Announces version 9 of WebSphere Commerce!

What’s new in Version 9 includes information about new functionality and changes in existing functionality from previous WebSphere Commerce Version to the modernized WebSphere Commerce Version 9 release: Micro services architecture , with lightweight, self-contained, distributed servers, supports horizontal scaling, parallel development, and utilization of modern, open source tools. Docker containers deliver key benefits for DevOps , including deployment automation, delivery acceleration, and application portability. Flexible deployment options for  Docker containers  gives IT organizations more infrastructure choices for e-commerce workloads, including all cloud options: private, public, or hybrid deployment. Evolution of the technology stacks  makes customization of the brand and business user experience more efficient and cost effective. Key changes include adoption of lightweight IBM WebSphere Liberty, replacement of Enterprise JavaBeans™ (EJBs) with Java™ Pers...

How to do Email Configurations in Web sphere Commerce

Web sphere commerce allows to send email messages to customers by making use of the below mentioned steps. Create the JSP which will be used for generating contents of the email  For e.g.: SendEmail.jsp Create View for the JSP in Struts-Config-Ext.xml Make an Entry in Struts-Config-Ext.xml file for .jsp as below < action path='/SendEmailView' type='com.ibm.commerce.struts.BaseAction'>     < set-property property ='authenticate' value ='10001:1'/>      < set-property property ='https' value ='10001:1'/> < /action> < forward name="SendEmailView /10001/-3" path="/< location of JSP file >/ TestEmail.jsp" className="com.ibm.commerce.struts.ECActionForward">     < set-property property="implClassName"     value="com.ibm.commerce.messaging.viewcommands.MessagingViewCommandImpl"/>     < set-property property="int...