New Promocodes Usage Sept 2020

ROES Support Knowledgebase

New Promo Code Usage for Per-Item Discounts (include, exclude)

Use this article to configure expanded per-item promo code include/exclude rules using catalog or template group u_id values and descendant controls.

Product: ROES / PromoCode Manager Category: Promo Codes Audience: Lab / Support Article ID: 63
Common need
A lab wants a per-item promo code to apply to all children of a catalog or template group without listing every product or option u_id individually.

Overview

Promo code support using Per Item has been expanded to allow the children of an entire catalog or template group to be included by using the container’s u_id, instead of listing every template and/or option u_id to be discounted.

This is done with special values in the item list: &include;, &exclude;, &includeAndDesc(pos);, and &excludeAndDesc(pos);.

Special Values

Value Purpose
&include; Values after this marker are treated as items to include.
&exclude; Values after this marker are treated as items to exclude.
&includeAndDesc(pos); Includes an item when a listed value appears in that item’s ancestry in the lab catalog.
&excludeAndDesc(pos); Excludes an item when a listed value appears in that item’s ancestry in the lab catalog.

The pos value restricts what includeAndDesc or excludeAndDesc applies to: p for products, o for options, and s for shipping methods. These can be in any order, and only the identified types are included or excluded.

Catalog Include Example

If a catalog has a u_id of Products, and you want to offer a 25% per-item discount on all products and options in that catalog, use:

&includeAndDesc(po);,Products
Promo code includeAndDesc example for Products catalog
Example per-item promo code include value for discounting products and options in a catalog.
If this image does not display, open it directly: Productscode.PNG

Template Group Include Example

To discount only the products for a template group with a u_id of Metal, but not its options, use:

&includeAndDesc(p);,Metal
Promo code includeAndDesc example for Metal template group
Example include value for discounting only products in a template group.
If this image does not display, open it directly: Metalcode.PNG

Combining Includes and Excludes

The functions can exclude specific items that are descendants of a catalog or group. This allows the item list to define both what should be included and what should be excluded from the set of products to which the promo code applies.

When parsing the list, if the item encountered is one of the special values, values after that special value are treated as include or exclude values depending on the marker.

For example, the following discounts everything in the Products catalog, but does not discount anything in the Canvas group inside that catalog:

&includeAndDesc(po);,Products,&excludeAndDesc(po);,Canvas

Default Include / Exclude Mode

The normal include and exclude popup menu selections in PromoCode Manager set the initial default parsing mode.

  • include is the same as preceding the list with &include;.
  • exclude is the same as preceding the list with &exclude;.

Existing promo codes continue to operate as before; no changes are needed for already defined promo codes.

Additional Examples

Discount all products and options in a catalog with u_id Products

&includeAndDesc(po);,Products

Discount only products in a Template Group with u_id Metal

&includeAndDesc(p);,Metal

Discount products and options in Products, but exclude products and options in Canvas

&includeAndDesc(po);,Products,&excludeAndDesc(po);,Canvas

Apply to canvas products and largeformat products, not their options

&includeAndDesc(p);,canvas,largeformat

Include canvas and largeformat products, but exclude a specific 40x60 canvas with u_id -7f8e

&includeAndDesc(p);,canvas,largeformat,&exclude;,-7f8e

Same result with the exclude first

&exclude;,-7f8e,&includeAndDesc(p);,canvas,largeformat

Include canvas products and largeformat products/options, but exclude the 40x60 canvas

&includeAndDesc(p);,canvas,&includeAndDesc(po);,largeformat,&exclude;,-7f8e

Same result with the exclude first

&exclude;,-7f8e,&includeAndDesc(p);,canvas,&includeAndDesc(po);,largeformat

The sequence does not matter. If an item is both included and excluded, the exclude wins.

Strings for Promo Code Messages

The following strings are supported in the templates file on the Configuration element.

PromocodesAlreadyConsumed="Sorry, it looks like you've already used this code." PromocodesAlreadyConsumedByCustomer="Sorry, it looks like you've already used this code." PromocodesExpired="Sorry, this code has expired." PromocodesNotFound="Sorry, we couldn't find a promotion with this code." PromocodesNotThisConfig="Sorry, this promotion is only available on a different setup." PromocodesNotYetValid="Sorry, this code isn't available yet, but please try later!" PromocodesOtherError="Sorry, we couldn't find a promotion with this code." PromocodesOtherItems="Sorry, this code doesn't apply to these products." Promocodes.Accepted="<html><center>You save ${PROMO_DISCOUNT_PERCENT}% (${PROMO_DISCOUNT_AMOUNT}) with ${PROMOCODE}!<br><br>Your total is now ${order_total}" Promocodes.Accepted="&lt;html&gt;&lt;center&gt;You save ${PROMO_DISCOUNT_AMOUNT} (${PROMO_DISCOUNT_PERCENT}%) with ${PROMOCODE}!&lt;br&gt;&lt;br&gt;Your total is now ${ORDER_TOTAL}&lt;/html&gt;" Promocodes.Minimum="<html><center>${PROMOCODE} doesn't apply until your<br>order reaches ${PROMO_MINIMUM}" Promocodes.Minimum="&lt;html&gt;&lt;center&gt;${promocode} doesn't apply until your&lt;br&gt;order reaches ${promo_minimum}&lt;/html&gt;" Promocodes.ExcludesShipping=" (excludes shipping)."

Expected Result

Per-item promo codes can now target entire catalog or template group descendants using container u_id values, with optional include and exclude logic to control products, options, and shipping methods.

Escalation Notes

  • Confirm the promo code is using a Per Item discount setup.
  • Confirm the listed values match the correct catalog, template group, template, option, or shipping method u_id values.
  • Confirm pos includes the intended item types: p, o, and/or s.
  • If a specific product should not receive the discount, add an exclude entry. Remember that exclude wins when an item is both included and excluded.
  • For custom customer-facing messages, configure the supported promo code strings on the Configuration element.
Suggested keywords: promo code, Promocode Manager, Per Item, includeAndDesc, excludeAndDesc, include, exclude, u_id, catalog descendants, template group descendants, promo code messages

Article Details

Article ID:
63
Category:
Views:
1,673