Technote (FAQ)
Question
How do I set up a fixed shipping amount for a category? For example, I have two categories, Category A and Category B. The shipping charge for category A is $10 dollars and the shipping charge for category B is $5.
Answer
Here is an example for Category A. Once Category A is configured, you can also use the methods to set up Category B.
In your store (storeent_id = 10001), you have one category A (catgroup_id = 20001), The shipping charge is $10 US fixed. You want to use Regular Delivery -Item (shipmode_id = 10003) . These instructions assume you already have the SHIPMODE table set up properly with the shipping mode information.
1. Insert an entry in the CALSCALE table:
| CALSCALE_ID | QTYUNIT_ID | CODE | DESCRIPTION | STOREENT_ID | CALUSAGE_ID | SETCURR |
| 10001 | C62 | 'Regular Delivery-Item' | 'Regular Delivery-Item' | 10001 | -2 | 'USD' |
| CALMETHOD | ||||||
| -28 |
The value for QTYUNIT_ID is C62 which is the default unit for the item. The CALMETHOD_ID -28 means the range and rate are quantity-based, such as a $5 shipping charge per item.
For CALSCALE, you also need to add the corresponding description in the CALSCALEDS table with corresponding language_id.
2. Add the data to the CALRANGE table:
| CALRANGE_ID | CALSCALE_ID | CALMETHOD_ID | RANGESTART | CUMULATIVE | FIELD1 | FIELD2 | FIELD3 |
| 20001 | 10001 | -33 | 0.00000 | 0 | NULL | NULL | NULL |
In the table, CALMETHOD_ID = -33 represents a fixed amount, such as a flat $5 charge.
3. Add the data in the CALRLOOKUP table:
| CALRLOOKUP_ID | SETCCURR | CALRANGE_ID | VALUE |
| 30001 | 'USD' | 20001 | 10 |
4. Add the data in the CALCODE table:
| CALCODE_ID | CODE | CALUSAGE_ID | STOREENT_ID | GROUPBY | TXCDCLASS_ID | PUBLISHED |
| 50000 | 'Shipping Code for Category A' | -2 | 10001 | 0 | NULL | 1 |
| SEQUENCE | COMBINATION | LASTUPDATE | CALMETHOD_ID | CALMETHOD_ID_APP | CALMETHOD_ID_QFY | FIELD1 |
| 0 | 0 | NULL | -23 | -24 | -22 | NULL |
| DESCRIPTION | ||||||
| NULL |
CALMETHOD_ID = -22, -23, -24, which are the default methods to calculate the shipping code.
You need to put the corresponding information for this CALCODE in CALCODEDSC, based on the language_id.
5. In the CALRULE table:
| CALRULE_ID | CALCODE_ID | STARTDATE | TAXCGRY_ID | ENDDATE | SEQUENCE | COMBINATION | CALMETHOD_ID |
| 60000 | 50000 | NULL | NULL | NULL | 0.0 | 2 | -27 |
| CALMETHOD_ID_QFY | |||||||
| -26 |
CALMETHOD_ID = -26, -27, which are the default methods to calculate a shipping rule.
6. In the CRULESCALE table:
| CALSCALE_ID | CALRULE_ID | OPTCOUNTER |
| 10001 | 60000 | NULL |
7. In the SHPJCRULE table:
| CALRULE_ID | SHPJCRULE_ID | FFMCENTER_ID | JURSTGROUP_ID | PRECEDENCE |
| 60000 | 10001 | NULL | 10002 | 0.0 |
The above instructions assume you already have the JURST and JURSTGROUP tables set up properly.
8. In the CATGPCALCD table:
| STORE_ID | CATGPCALCD_ID | TRADING_ID | CATGROUP_ID | CALCODE_ID | OPTCOUNTER | CALFLAGS |
| 10001 | 70001 | NULL | 20001 | 50000 | 1 | NULL |
In this table, the catgroup_id 20001, which is category A, is mapped with the calcode_id of 50000. This assumes you already have Category A as catgroup_id = 20001.
These steps are based on the assumption that you have the out-of-the-box CALMETHOD table configured which contains all of the default calculation methods.
For additional information about how to import XML files to load the data and achieve the shipping configuration, see: Advanced shipping configuration with the WebSphere Commerce Calculation Framework.
Rate this page:
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business Machines Corp., registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at www.ibm.com/legal/copytrade.shtml.