Adding extension logic to all store pages
About this task
By default, all store pages for the Aurora starter store include the JSPFExtToInclude.jspf file, which dynamically retrieves custom extension JSP files for the store pages. The JSPFExtToInclude.jspf file is used to retrieve a list of configuration entries in the STORECONF database table that belong to the store ID for the store pages. The store page JSP files then include the file that is specified in the value column for each entry.
If your site uses an extended sites
store model, you can add extension logic to all store pages for any or all stores. You can add
entries into the STORECONF table using the ID for either the storefront asset store or a specific
store. The list of files that are added to the pages for a store, include the value for all entries
for that specific store and for the storefront asset store.
<%@ include file="/Widgets/Common/EnvironmentSetup.jspf"%>
insert into storeconf (storeent_id, name, value, optcounter)values (storeent_id, 'name', 'value', 0);
Where STOREENT_ID
- The store identifier, which identifies the store that is updated to include logic on all pages. For example, 10001
NAME
- The name of the configuration entry. The prefix
'wc.pgl.jspInclude_'
must be declared in the name for a store to include logic within the body of store pages. To include logic within the header section of store pages, use the prefix'wc.pgl.jspIncludeHead_'
in the name.If your site uses logic from multiple vendors, include the vendor name in the name of the configuration entry. For example,
'wc.pgl.jspInclude_vendor_SiteMap'
Where vendor is the name of your company or the company that provides the logic. The value of the name field must be unique for a store in the STORECONF table. VALUE
- The value of the relative path for the configuration entry. This relative path points to the
extension JSP fragment file that you want to include in every store page. For example,
'/Widgets/com.myCompany.commerce.store.widgets.SiteMap/SiteMap.jsp'
insert into storeconf (storeent_id, name, value, optcounter) values (10001, 'wc.pgl.jspInclude_myCompany_SiteMap',
'/Widgets/com.myCompany.commerce.store.widgets.SiteMap/SiteMap.jsp', 0);
insert into storeconf (storeent_id, name, value) values (10152, 'wc.pgl.jspInclude_myCompany_SiteMap',
'/Widgets/com.myCompany.commerce.store.widgets.SiteMap/SiteMap.jsp', 0);
insert into storeconf (storeent_id, name, value) values (10751, 'wc.pgl.jspInclude_myCompany_SiteMap',
'/Widgets/com.myCompany.commerce.store.widgets.SiteMap/SiteMap.jsp', 0);