RoutesDiscounts module

Discounts routes

URLs the Discounts module answers, their parameters and the variables each view receives.

View cdna-admin screens of this module.

Admin view

GET /cdna-admin/discounts/add-discount addDiscount

Add a new record. Assigns an empty record to the template.

The admin template receives
VariableTypeDescription
$discount Discount Single (empty) Discount record

Common variables such as $_url, $_request and $_menu are available too. Global template variables

GET /cdna-admin/discounts/discount/{id} editDiscount

Retrieve a single record and display the edit page for the record

Path parameters id matches \d+

The admin template receives
VariableTypeDescription
$discount Discount Retrieved Discount record

Common variables such as $_url, $_request and $_menu are available too. Global template variables

GET /cdna-admin/discounts/discounts manageDiscounts

Retrieve available records and assign them to the template for editing.

The admin template receives
VariableTypeDescription
$discounts Collection<Discount> Collection of Discounts

Common variables such as $_url, $_request and $_menu are available too. Global template variables

GET /cdna-admin/discounts/add-rule/{discount.id} addRule

Add a new record. Assigns an empty record to the template.

Path parameters discount.id matches \d+

The admin template receives
VariableTypeDescription
$rule Rule Single (empty) Rule record

Common variables such as $_url, $_request and $_menu are available too. Global template variables

GET /cdna-admin/discounts/rule/{id} editRule

Retrieve a single record and display the edit page for the record

Path parameters id matches \d+

The admin template receives
VariableTypeDescription
$rule Rule Retrieved Rule record

Common variables such as $_url, $_request and $_menu are available too. Global template variables

GET /cdna-admin/discounts/rules/{discount.id} manageRules

Retrieve available records and assign them to the template for editing.

Path parameters discount.id matches \d+

The admin template receives
VariableTypeDescription
$rules Collection<Rule> Collection of Rules

Common variables such as $_url, $_request and $_menu are available too. Global template variables

GET /cdna-admin/discounts/add-code/{discount.id} addCode

Add a new record. Assigns an empty record to the template.

Path parameters discount.id matches \d+

The admin template receives
VariableTypeDescription
$code Code Single (empty) Code record

Common variables such as $_url, $_request and $_menu are available too. Global template variables

GET /cdna-admin/discounts/code/{id} editCode

Retrieve a single record and display the edit page for the record

Path parameters id matches \d+

The admin template receives
VariableTypeDescription
$code Code Retrieved Code record

Common variables such as $_url, $_request and $_menu are available too. Global template variables

GET /cdna-admin/discounts/codes/{discount.id} manageCodes

Retrieve available records and assign them to the template for editing.

Path parameters discount.id matches \d+

The admin template receives
VariableTypeDescription
$codes Collection<Code> Collection of Codes

Common variables such as $_url, $_request and $_menu are available too. Global template variables

GET /cdna-admin/discounts/add-condition/{type}/{rule.id} addCondition

Add a new record. Assigns an empty record to the template.

Path parameters type matches [a-zA-Z]+rule.id matches \d+

Common variables such as $_url, $_request and $_menu are available too. Global template variables

GET /cdna-admin/discounts/add-action/{type}/{rule.id} addAction

Add a new record. Assigns an empty record to the template.

Path parameters type matches [a-zA-Z]+rule.id matches \d+

Common variables such as $_url, $_request and $_menu are available too. Global template variables

Only GET routes list their variables.