The following example shows how a group discount promotion is configured.

Note that in the normal course of events you should not have to work directly with the PMDL unless creating new promotions templates (see Adding New Promotions Templates).

This rule describes a group discount promotion where a user, who purchases two specific items, receives 10% off each item.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  <!DOCTYPE pricing-model  SYSTEM
      "dynamosystemresource:/atg/dtds/pmdl/pmdl_1.0.dtd">
    <pricing-model>
      <qualifier/>
      <offer>
        <discount-structure calculator-type="group"
                discount-type="${discount_type_value}"
                adjuster="${discount_value}">
          <target>
            <anded-union>
              <group-iterator name="next" number="1" sort-by="priceInfo.listPrice"
                  sort-order="descending">
                <collection-name>items</collection-name>
                <element-name>item</element-name>
                <aggregator name="quantity" operation="total"/>
                  <equals><value>item.catalogRefId</value>
                    <constant>
                      <data-type>java.lang.String</data-type>
                      <string-value>sku40105</string-value>
                    </constant>
                  </equals>
              </group-iterator>
              <group-iterator name="next" number="1" sort-by="priceInfo.listPrice"
                  sort-order="descending">
                <collection-name>items</collection-name>
                <element-name>item</element-name>
                <aggregator name="quantity" operation="total"/>
                  <equals><value>item.catalogRefId</value>
                    <constant>
                      <data-type>java.lang.String</data-type>
                      <string-value>sku40109</string-value>
                    </constant>
                  </equals>
              </group-iterator>
            </anded-union>
          </target>
        </discount-structure>
      </offer>
    </pricing-model>

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