• Decrease Text SizeIncrease Text Size

Ecommerce Discounts

Ecommerce Discounts


Form Discounts This script will create Form Discounts control. This script will only work on the Cart Checkout > Payment Method page and preview on Ecommerce gt; Cart gt; SummaryFooterContent. We support 3 css classes which will let you change display of the discount items. formdiscountsalert - any error/alert message. formdiscounttext - discount text. formdiscountitems - all discount which has been applied.

[cp:literal:scripting key='FormDiscounts' id='FormDiscounts' format='<br/><div>{0} {1}</div><br/>' textBoxFormat='Coupon {0}' buttonText='Apply Discounts' buttonImage='/Integrations/Centralpoint/Resources/CartDefaultImages/Apply_sm.gif' Limit='' AutomaticDiscounts='false' RemoveDiscountButtonImage='' EditDiscountButtonImage='' view='hiddenform' /]
Parameter Description
Id The id of the form element.
TextBoxFormat A format string used to prefix or suffix the return value. Just include '{0}' in the string where you would like the value to be placed.
ButtonText Enter the text you want to display on your button.
ButtonImage Takes image path and an image button will be used instead of a standard button.
Limit Takes numeric value to limit number of discounts to be applied. By removing the value you will remove any restrictions. By default it has no limit.
AutomaticDiscounts This property supports the following values: true, false. Enter true to have to apply dicsounts automaticly(without clicking of the apply button).Those discount can't be removed. By default automatic discounts are disabled.
RemoveDiscountButtonImage Takes image path and will replace a default image.
EditDiscountButtonImage Takes image path and will replace a default image.
SuppressIndividualItemsErrorMessages optional. supported values. true, false. will Suppress Individual Items Error Messages and display only one message instead.
View This property supports the following values: Empty and hiddenform. hiddenform will remove discount text box and apply button.


You can insert a coupon code in a URL and have the system automatically apply that code to the cart. In order to do this you will need to provide user with link to the cart.aspx and passing coupon value in URL query string parameter. http://www.example.com/Main/Cart.aspx?couponCode=save10. We also support an optional query string parameter pageURL. pageURL parameter is used to redirect user to the specific page after applying a coupon code. http://www.example.com/Main/Cart.aspx?couponCode=save10&pageURL=/Main/Home.aspx.

Form Field Types Reference

Centralpoint Forms support 13 different field types. Here's a quick reference for the most commonly used types:

Field Type Purpose Key Parameter
FormTextBox Single-line or multi-line text TextMode='MultiLine', Rows='4'
ExtDatePicker Date picker with calendar sourceFieldId (requires 3 components)
FormListBox Dropdown selection AddListItems (XML format)
FormUpload File upload control defaultValue stores file path
FormSignature Digital signature capture Width, Height (auto-creates 4 metadata fields)
FormEditor Rich text WYSIWYG editor Width='980'

Key Point: All form fields require a group attribute that must be identical across all form components (HTML, Field Map XML, email templates). Mismatched group names cause silent failures.

DataSource Best Practices

DataSources consist of four components that must work together correctly:

Component Purpose
SQL SELECT Retrieves data from database
Template Content Wrapper HTML, runs once at beginning
Item Content Repeating template for each record
Styles (CSS) Visual styling (prefer embedding in Template)

Critical Rules

Rule 1: The Placeholder Requirement

Template Content MUST include: [cp:placeholders key='ItemContent' /]

Without this exact placeholder, rows will NOT render even if SQL returns data.

Rule 2: Attributes vs Standard Fields

Standard fields: name='FieldName'

Attribute fields: name='cpsys_Attributes:FieldName'

They will NOT render if called incorrectly.