...
Code Block | ||||
---|---|---|---|---|
| ||||
... var attributes = category.flexAttributes; ... |
string category.get(key)
Returns a single flex attribute's value by its the value of key as string or null if no value is set under the key.
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... var url = category.get(rhino.category.url); if (url) { window.location = url; } ... |
Parameter key:string (required)
Use any flex attribute keyThe key to be looked up in the flexAttributes of the order.
category.getCategories(deep, maxDepth)
...
Parameter maxDepth (required)
boolean category.has(key)
Returns a boolean value depending on the existence of the key provided.whether key is present for a given category
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... if (category.has("description") === true) { ... } ... |
Parameter key:string (required)
Use any flex attribute key.
...
The key to be checked in the flexAttributes of the order.
category.highestPrice
Same as category.getHighestPrice(0). Returns the highest price of a category's immediate children.
...
Code Block | ||||
---|---|---|---|---|
| ||||
... category.increment("amount") ... |
Parameter key:string (required)
The key to be incremented in the flexAttributes of the order.
category.isAny
Returns true when the content type of a category is "Any"
...
category.remove(key)
Removes a flex attribute from a category.the key from the flexAttributes of the category
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... category.remove(key) ... |
Parameter key:string (required)
The key to be removed from the flexAttributes of the category.
category.removeChild(child)
Removes a child from a category.
...
category.set(key, value, [options])
Sets a flex attribute to the provided valuevalue of a specified key for a given category.
Example
Code Block | ||||
---|---|---|---|---|
| ||||
... category.set("description", "Anhänger mit Gravur"); ... |
Parameter key:string (required)
The key to be set in the flexAttributes of the category.
Parameter value:string (required)
The value to be set for the key
Parameter options:object (optional)
May have a key 'broadcastEvent':bool which determines whether the log message shows up in the websocket log view.
category.setContentType(type)
...
Code Block | ||||
---|---|---|---|---|
| ||||
... category.setDescription("Anhänger"); ... |
Parameter value (required)
category.setName(value)
Sets a category's name.
...
Code Block | ||||
---|---|---|---|---|
| ||||
... category.setName("Fotobuch"); ... |
Parameter value (required)
category.setNodeType(type)
...
Code Block | ||||
---|---|---|---|---|
| ||||
... category.setShortDescription("Anhänger") ... |
Parameter value (required)
category.shortDescription
...