Modifying the Controller Command

In this post, we will be discussing how to modify the WCS existing Command registry to our own command instead of using the default Command implementation class. When we register our new class, then the new implementation class will be executed for the business logic.

Steps :

  • Open the RAD and start the server.
  • open the hints and tips file present in the installation file of RAD folder.
  • Run the below SQL statement to update the CMDREG to register our newly created implementation class and controller command.
update CMDREG set CLASSNAME='com.ibm.commerce.sample.commands.MyWcsBasicsCmdImpl'
WHERE INTERFACENAME='com.ibm.commerce.orderitems.commands.AlreadyExistingCmd' and storeent_Id=0;
  • Once done the execution of the above SQL statement. check by running the below query to see whether it got updated or not.

NOTE : in the above sql command the storeent_id is pointed to ‘0’ that means the newly inserted class can be used across all the stores, and if we want to use it for a particular store then we need to point the storeent_id to that store value.

 

Leave a Reply