For any customization you make to SoftSlate Commerce, at all times try to follow these rules. It will save you work and spare you from issues that may occur when upgrading to a future version.
Custom Java Classes.
Override existing Java classes by subclassing the appropriate class from the
com.softslate.commerce package with your own new class. (Requires application reload.) Then, change the setting under the Settings -> Components screen of the Administrator (
npcSetting database table) to tell the application to use your new class instead of the default one. Do not modify any of the existing classes as they may change with an upgrade.
For more information, refer to SoftSlate Commerce's Java API documentation available at http://www.softslate.com.
Custom SQL Queries.
Override existing SQL queries or create ones in the appropriate
sql-custom.properties file found under the subdirectories of the
/WEB-INF/classes/resources directory. (Requires application reload.) Since the
sql-custom.properties files are the last files read into memory, they will override the queries defined in the other
sql*.properties files. Do not modify any of the other
sql*.properties files as they may change with an upgrade.
Custom Struts Configurations.
Override existing Struts action mappings and form bean definitions, or create new ones, in
/WEB-INF/conf/core/struts-config-custom.xml. (Requires application reload.) Since this is the last file read into memory, it will override the mappings and form beans defined in the other Struts XML files. Do not modify any of the other Struts XML files as they may change with an upgrade.
Custom Tiles Definitions.
Override existing Tiles definitions or create new ones in
/WEB-INF/conf/core/tiles-defs-custom.xml. (Requires application reload.) Since this is the last file read into memory, it will override the definitions defined in the other Tiles XML files. Do not modify any of the other Tiles definition XML files as they may change with an upgrade.
For more information, refer to the section on Working with the Tiles Framework
Custom JSP Templates.
Override existing JSP templates by copying them from the
/WEB-INF/layouts/default directory over to the
/WEB-INF/layouts/custom directory and modifying them there. Create any new JSP templates in the
custom directory as well. Do not modify the templates in the
default directory as they may change with an upgrade. (In a similar way, to customize templates used in the Administrator, copy templates from
For more information, refer to the section on Creating a Custom Layout.
Custom Application Messages.
Create new application messages in
/WEB-INF/classes/resources/core/application-custom.properties. (Access the message using
<bean:message key="[your key]" bundle="/custom"/> in a JSP page. Requires application reload.) Do not modify any of the other
application*.properties files as they may change with an upgrade. (Note: it is not possible to override an existing application message in the
application-custom.properties file, you can only create new messages.)
Custom CSS Styles.
Override existing CSS styles or create new ones in
/css/styles-custom.css. Do not modify
/css/styles.css as it may change with an upgrade.
For more information, refer to the section on Using CSS Stylesheets.
Copyright © 2005 SoftSlate, Inc. All Rights Reserved.