RoutesDiscounts module
Discounts routes
URLs the Discounts module answers, their parameters and the variables each view receives.
Admin view
/cdna-admin/discounts/add-discount
addDiscount
Add a new record. Assigns an empty record to the template.
| Variable | Type | Description |
|---|---|---|
$discount |
Discount |
Single (empty) Discount record |
Common variables such as $_url, $_request and $_menu are available too. Global template variables
/cdna-admin/discounts/discount/{id}
editDiscount
Retrieve a single record and display the edit page for the record
Path parameters
id matches \d+
| Variable | Type | Description |
|---|---|---|
$discount |
Discount |
Retrieved Discount record |
Common variables such as $_url, $_request and $_menu are available too. Global template variables
/cdna-admin/discounts/discounts
manageDiscounts
Retrieve available records and assign them to the template for editing.
| Variable | Type | Description |
|---|---|---|
$discounts |
Collection<Discount> |
Collection of Discounts |
Common variables such as $_url, $_request and $_menu are available too. Global template variables
/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+
| Variable | Type | Description |
|---|---|---|
$rule |
Rule |
Single (empty) Rule record |
Common variables such as $_url, $_request and $_menu are available too. Global template variables
/cdna-admin/discounts/rule/{id}
editRule
Retrieve a single record and display the edit page for the record
Path parameters
id matches \d+
| Variable | Type | Description |
|---|---|---|
$rule |
Rule |
Retrieved Rule record |
Common variables such as $_url, $_request and $_menu are available too. Global template variables
/cdna-admin/discounts/rules/{discount.id}
manageRules
Retrieve available records and assign them to the template for editing.
Path parameters
discount.id matches \d+
| Variable | Type | Description |
|---|---|---|
$rules |
Collection<Rule> |
Collection of Rules |
Common variables such as $_url, $_request and $_menu are available too. Global template variables
/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+
| Variable | Type | Description |
|---|---|---|
$code |
Code |
Single (empty) Code record |
Common variables such as $_url, $_request and $_menu are available too. Global template variables
/cdna-admin/discounts/code/{id}
editCode
Retrieve a single record and display the edit page for the record
Path parameters
id matches \d+
| Variable | Type | Description |
|---|---|---|
$code |
Code |
Retrieved Code record |
Common variables such as $_url, $_request and $_menu are available too. Global template variables
/cdna-admin/discounts/codes/{discount.id}
manageCodes
Retrieve available records and assign them to the template for editing.
Path parameters
discount.id matches \d+
| Variable | Type | Description |
|---|---|---|
$codes |
Collection<Code> |
Collection of Codes |
Common variables such as $_url, $_request and $_menu are available too. Global template variables
/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
/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.