- Theme Engine
- Design Principles
- Templates
- EVML Reference
- Output
- Comments
- Operators
- Statements and Declarations
- Built-in Functions
- Built-in Objects
- Account
- Address
- Array
- Boolean
- Branch
- Cart
- CartLine
- Category
- CategoryCollection
- CategoryFilter
- CategoryFilterCollection
- CategoryFilterOption
- CategorySearch
- Collection
- Color
- Contact
- Currency
- Date
- Discount
- Dom
- Event
- EventCollection
- EventSlot
- Image
- Layout
- Locale
- Money
- Number
- Object
- Page
- PageCollection
- PageSearch
- PageSharer
- Pagination
- Postage
- Price
- PriceDiscount
- Product
- ProductCollection
- ProductCustomisation
- ProductDownload
- ProductMedia
- ProductMediaFrame
- ProductPrice
- ProductSearch
- ProductSpecification
- ProductSpecificationValue
- ProductVariation
- ProductVariationOption
- RecentlyViewed
- RegExp
- Request
- Review
- ReviewCollection
- Search
- SearchCollection
- SearchResult
- String
- Tag
- Template
- Url
- Website
- EV Tags
- CSS Pre-processor
- Ajax API
ProductCustomisation
Extends Object. Represents a group of options available to customise a product. Retrieving customisation options is always done from a product object:
<body>
<div>
<h1>Customise {{ product.title }}</h1>
<?ev
for(var i in product.customisations){
// the customisation group
var group = product.customisations[i];
?>
<h2>{{ group.title }}</h2>
<p>{{ group.description }}</p>
<ev:select>
<?ev
for(var o in group.options){
var option = '<option />'.toDom();
option.attr('value', group.options[o].value);
option.text(group.options[o].value);
print(option);
}
?>
</ev:select>
<?ev } ?>
</div>
</body>
Note, this is a very simplified view of how to use product customisations.
Properties | |
---|---|
description |
Type String The description for the customisation group. |
id |
Type Number The System ID for the customisation group. |
isSelect |
Type Boolean True if the group widget requires the user to select from a list, else false. |
isText |
Type Boolean True if the user is allowed to enter text into a textfield, else false. |
options |
Type Array When the group requires the user to select from a list. Each option in the Array will have the following properties:
|
title |
Type String The title for the customisation group. |
required |
Type Boolean True if the user must add or select a value for the customisation group, else false. |
type |
Type String The type of widget to use for the customisation option. |