To add a custom property to the site configuration you must:

When you update the database to reflect the new property, you must take the following into account:

The following excerpts from the configuration files for Commerce Reference Store show how to add a table, crs_site_attribute, with a number of new site configuration properties. This example assumes an environment that includes ATG Content Administration and has a switching database, so this table must be added to the publishing, switchingA, and switchingB schemas.

Excerpt from /atg/multisite/siteRepository.xml from Commerce Reference Store

This excerpt defines the crs_site_attribute table with Commerce Reference Store-specific site configuration properties. You can view the source for this table definition in the /atg/multisite/siteRepository.xml file in <ATG10dir>/CommerceReferenceStore/Store/EStore/config/config.jar. Note that all the Commerce Reference Store site configuration properties are assigned to property groupings, using the category-resource attribute.

Note: Commerce Reference Store creates additional internationalization-related properties in the /atg/multisite/siteRepository.xml file located in <ATG10dir>/CommerceReferenceStore/Store/EStore/International/config/config.jar.

<table name="crs_site_attribute" type="auxiliary" id-column-name="id">

  <property name="resourceBundle" data-type="string" column-name="resource_bundle"
            display-name-resource="resourceBundle"
            category-resource="categoryPresentation">
    <attribute name="resourceBundle"
       value="atg.projects.store.multisite.StoreSiteRepositoryTemplateResources"/>
    <attribute name="propertySortPriority" value="20"/>
  </property>

  <property name="newProductThresholdDays" data-type="int"
            column-name="prod_threshold"
            display-name-resource="newProductThreshold"
            category-resource="categoryCommerce">
    <attribute name="resourceBundle"
       value="atg.projects.store.multisite.StoreSiteRepositoryTemplateResources"/>
    <attribute name="propertySortPriority" value="160"/>
  </property>

  <property name="defaultPageSize" data-type="int" column-name="page_size"
            display-name-resource="defaultPageSize"
            category-resource="categoryPresentation">
    <attribute name="resourceBundle"
       value="atg.projects.store.multisite.StoreSiteRepositoryTemplateResources"/>
    <attribute name="propertySortPriority" value="40"/>
  </property>

  <property name="cssFile" data-type="string" column-name="css_file"
            display-name-resource="cssFile"
            category-resource="categoryAppearance">
    <attribute name="resourceBundle"
       value="atg.projects.store.multisite.StoreSiteRepositoryTemplateResources"/>
    <attribute name="propertySortPriority" value="20"/>
  </property>

  <property name="largeSiteIcon" data-type="string" column-name="large_site_icon"
            display-name-resource="largeSiteIcon"
            category-resource="categoryAppearance">
    <attribute name="resourceBundle"
       value="atg.projects.store.multisite.StoreSiteRepositoryTemplateResources"/>
    <attribute name="propertySortPriority" value="40"/>
  </property>

  <property name="defaultCountry" data-type="string"
            column-name="default_country_code"
            display-name-resource="defaultCountry"
            category-resource="categoryLocalization">
    <attribute name="resourceBundle"
       value="atg.projects.store.multisite.StoreSiteRepositoryTemplateResources"/>
    <attribute name="propertySortPriority" value="20"/>
  </property>

  <property name="emailAFriendEnabled" data-type="boolean"
            column-name="emailafriend" display-name-resource="emailAFriendEnabled"
            category-resource="categoryEmail">
    <attribute name="resourceBundle"
       value="atg.projects.store.multisite.StoreSiteRepositoryTemplateResources"/>
    <attribute name="propertySortPriority" value="20"/>
  </property>

  <property name="backInStockFromAddress" data-type="string"
            column-name="backinstock_addr"
            display-name-resource="backInStockFromAddress"
            category-resource="categoryEmail">
    <attribute name="resourceBundle"
       value="atg.projects.store.multisite.StoreSiteRepositoryTemplateResources"/>
    <attribute name="propertySortPriority" value="40"/>
  </property>

  <property name="newPasswordFromAddress" data-type="string"
            column-name="newpass_addr"
            display-name-resource="newPasswordFromAddress"
            category-resource="categoryEmail">
    <attribute name="resourceBundle"
       value="atg.projects.store.multisite.StoreSiteRepositoryTemplateResources"/>
    <attribute name="propertySortPriority" value="60"/>
  </property>

  <property name="changePasswordFromAddress" data-type="string"
            column-name="changepass_addr"
            display-name-resource="changePasswordFromAddress"
            category-resource="categoryEmail">
    <attribute name="resourceBundle"
       value="atg.projects.store.multisite.StoreSiteRepositoryTemplateResources"/>
    <attribute name="propertySortPriority" value="80"/>
  </property>

<-- Additional email-related properties comprise the remainder of the CRS
    siteRepository.xml file. -->

</table>
/atg/projects/store/multisite/StoreSiteRepositoryTemplateResources.properties

This code excerpt shows the resource bundle that properties in the crs_site_attribute table rely on. You can find the source for this resource bundle in the /atg/projects/store/multisite/StoreSiteRepositoryTemplateResources.properties file located in <ATG10dir>/CommerceReferenceStore/Store/EStore/lib/classes.jar,

# Resource strings for SiteRepository
#
atg_flags=i18n,l10n

categoryCommerce=Commerce
categoryBasics=Basics
categoryPresentation=Presentation
categoryAppearance=Appearance
categoryEmail=Email
categoryLocalization=Localization

catalogId=Catalog Id
listPricelistId=List price list Id
salePricelistId=Sale price list Id

resourceBundle=Resource Bundle
newProductThreshold=New Product Threshold Days
defaultPageSize=Default Page Size
cssFile=Path to CSS File
largeSiteIcon=Large Site Icon
defaultCountry=Default Country

emailAFriendEnabled=Email a Friend Enabled
backInStockFromAddress=Back in Stock From Address
newPasswordFromAddress=New Password From Address
changePasswordFromAddress=Updated Password From Address
orderConfirmationFromAddress=Order Confirmation From Address
orderShippedFromAddress=Order Shipped From Address
promotionEmailAddress=Promotion From Address
registeredUserFromAddress=Registered User From Address

billableCountries=Billable Country Codes
shippableCountries=Shippable Country Codes

nonBillableCountries=Nonbillable Country Codes
nonShippableCountries=Nonshippable Country Codes
SQL for adding crs_site_attribute to the publishing schema

This example shows the SQL for adding the crs_site_attribute table to the publishing schema.

create table crs_site_attribute (
        asset_version number(19) not null,
        id varchar2(40) not null,
        resource_bundle varchar2(254) null,
        prod_threshold number(10) null,
        page_size number(10) null,
        css_file varchar2(254) null,
        large_site_icon varchar2(254) null,
        default_country_code varchar2(2) null,
        emailafriend number(1) null,
        backinstock_addr varchar2(254) null,
        newpass_addr varchar2(50) null,
        orderconfirm_addr varchar2(50) null,
        ordershipped_addr varchar2(50) null,
        changepass_addr varchar2(50) null,
        registereduser_addr varchar2(50) null,
        promo_addr varchar2(50) null
,constraint crs_site_attr_p primary key (id, asset_version)
);
SQL for adding crs_site_attribute to the switchingA and switchingB schemas

This example shows the SQL for adding the crs_site_attribute table to the switching schemas.

create table crs_site_attribute (
        id varchar2(40) not null,
        resource_bundle varchar2(254) null,
        prod_threshold number(10) null,
        page_size number(10) null,
        css_file varchar2(254) null,
        large_site_icon varchar2(254) null,
        default_country_code varchar2(2) null,
        emailafriend number(1) null,
        backinstock_addr varchar2(254) null,
        newpass_addr varchar2(50) null,
        orderconfirm_addr varchar2(50) null,
        ordershipped_addr varchar2(50) null,
        changepass_addr varchar2(50) null,
        registereduser_addr varchar2(50) null,
        promo_addr varchar2(50) null
,constraint crs_site_attr_p primary key (id)
);

Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved. Legal Notices