Applying a restocking fee for returns
By default, when a customer returns an item a restocking fee is not applied. You can customize WebSphere Commerce to charge customers a restocking fee; the fee can be either a flat rate, or a percentage amount of the order.
Before you begin
- Flat rate adjustment: com.ibm.commerce.returns.commands.CalculateReturnItemAdjustmentFlatPolicyCmdImpl
If the flat amount of the restocking fee is greater than the original credit amount of one of the return items, an exception is thrown indicating that the credit amount of a return item cannot be negative.
- Percentage adjustment: com.ibm.commerce.returns.commands.CalculateReturnItemAdjustmentPercentagePolicyCmdImpl
Procedure
-
Add a ReturnCharge policy, by running the following SQL statements:
Where:insert into policy (policy_id,policyname,policyType_id,storeent_id,properties) values (policy_id,'RestockingFee','ReturnCharge',store_id,properties); insert into termcond (termcond_id,tcsubtype_id,trading_id,sequence) values (termcond_id,'ReturnTCReturnCharge',trading_id,0); insert into policytc values(termcond_id,policy_id,0);
- store_id
- The store ID of the store.
- trading_id
- The trading item ID for the order item in the return merchandise authorization (RMA).
- properties
- The properties specified in the policy. For
example:
days_1=30&flat_1=CAD-5.00&flat_1=USD-3.00&days_2=90&flat_2=CAD-10&default=CAD-20
-
Register the policy command in the CMDREG table.
Where:insert into cmdreg values(0,'com.ibm.commerce.returns.commands.CalculateReturnItemAdjustmentPolicyCmd',null,implementation_name',null,null,'local',null); implementation_name is the name (including package name) of the selected policy command.
- implementation_name
- The full name, including the package name, of the selected policy command:
- com.ibm.commerce.returns.commands.CalculateReturnItemAdjustmentFlatPolicyCmdImpl
- com.ibm.commerce.returns.commands.CalculateReturnItemAdjustmentPercentagePolicyCmdImpl