Wednesday, October 31, 2012

Setting up Price List Functionality in ATG Consumer Commerce





ATG Consumer Commerce users do not have a price list functionality available by default. To add price list functionality, you should:

1.Add the following code to /atg/userprofiling/userProfile.xml in your localconfig:


<gsa-template>
  <header>
    <name>Commerce Related Profile Changes</name>
    <author>DCS Team</author>
     <version>$Id: userProfile.xml,v 1.1 2012/04/26 </version>
   </header>

  <item-descriptor name="user" default="true"
      sub-type-property="userType">
    <table name="dcs_user" type="auxiliary" id-column-name="user_id">
      <property category-resource="categoryCommerceContract"
         name="priceList"
         item-type="priceList"
         display-name-resource="priceList"
         column-name="price_list"
         repository="/atg/commerce/pricing/priceLists/PriceLists"/>
     </table>
   </item-descriptor>
 </gsa-template>


2.Add a price_list column to dcs_user table.

3.Configure the ItemPricingEngine to use the appropriate precalculator. There are price list-specific versions of each of the precalculators used by the ItemPricingEngine. ItemPriceListCalculator is the precalculator for list pricing. ConfigurableItemPriceListCalculator is the precalculator for configurable item pricing.

The following code example shows how the /atg/commerce/pricing/ItemPricingEngine.properties file should change to use the priceList calculators


preCalculators=\
        calculators/ItemPriceListCalculator,\
        calculators/ConfigurableItemPriceListCalculator


Note: The configurable item calculator is optional. It only needs to be used if your site supports configurable commerce items.

1 comment:

Vemula said...

this is copy from atg documentation :-)

Popular Posts