** Please visit our
new Cloud Retailer Help Desk https://helpdesk.cloudretailer.com
This
specific article can be found here **Summary
There are two types of discount buttons (manual discounts):
- Custom discount buttons
- Inline discount buttons
Custom Discount Buttons
- Custom discount buttons are used for more complex discounts defined in the back office (see Discount Engine Types and Options)
- To create a button that applies a custom discount, change button's Command to Discounting: Perform Custom Discount.
- In the text area below Command, you will need to specify parameters.
The parameters are a comma-separated list of name:value pairs enclosed in curly brackets. For example:
{
Range: 'All',
CustomDiscountCode: '10% Off Seniors'
}
In the example above, the entire parameter block starts with an opening curly bracket ({) and ends with a closing curly bracket (}). There are two name:value pairs named Range and CustomDiscountCode which are separated by a comma. The names are joined to their corresponding values with a colon (Range: 'All'). The values are enclosed in single-quotes.
Listed below are the possible name:value pairs with the default value listed in bold type.
- Range: Each (applies to all current line items), All (applies to all current and future line items), CurrentLineItem (only applies to current line item)
- CustomDiscountId: The internal id of the Custom Discount to apply. The screenshot below shows how to find the internal id when you have the Custom Discount open for editing. This id will never change even if the Custom Discount's code changes.
- CustomDiscountCode: The code is simply the name of the Custom Discount. This name can be changed which will break the button, so consider using the CustomDiscountId parameter detailed above.
- PromptOnMissingDiscount: true or false. If this is true and the CustomDiscountId and CustomDiscountCode parameters are missing or invalid, the user will be prompted to select the discount to be used.
- ApplySeparately: true or false. If this is true, adding the discount will remove other manual discounts.
- ReferenceName: If a reference name is defined, all other manual discounts with the same reference name in the current Range will be removed.
- Comment: Adds the defined comment to the discount.
Inline Discount Buttons
|
|