Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. This Developer Center contains the guides for Commerce 6.13.0 through 7.4.1.Visit new site

This version of Elastic Path Commerce is no longer supported or maintained. To upgrade to the latest version, contact your Elastic Path representative.

Condition Rules

Condition Rules

Condition rules are the condition under which promotions are applied. For example, the promotion could be 10% off all items in your cart and the condition could be you have more than 10 items in your cart.

Sample XML: Condition Rules


<condition_rules>
<rule>
    <code>A2386DD3-E146-32EB-8754-0AF2D52ABEF6</code>
    <conditions>
        <and>
            <and>
                <condition>
                    <kind>Condition</kind>
                    <type>cartSubtotalCondition</type>
                    <parameters>
                        <parameter>
                            <key>subtotalAmount</key>
                            <value>50</value>
                        </parameter>
                    </parameters>
                    <exceptions/>
                </condition>
                <condition>
                    <kind>Condition</kind>
                    <type>cartCurrencyCondition</type>
                    <parameters>
                        <parameter>
                            <key>currency</key>
                            <value>USD</value>
                        </parameter>
                    </parameters>
                    <exceptions/>
                </condition>
            </and>
        </and>
    </conditions>
    <actions>
        <action>
            <type>ShoppingCartPromotion</type>
            <code>A2386DD3-E146-32EB-8754-0AF2D52ABEF6</code>
        </action>
    </actions>
</rule>
...
</condition_rules>