...
Parameter name: (optional)
int product.centPrice
Returns the product price in cents (integer)
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.centPrice // => 1995
... |
product.customPath
Returns the customPath field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.customPath // => '/a-custom-path/to-a-product'
...
|
...
Info |
---|
|
This entity is slice aware, which means that to use this facility: - there must be a logged in user in the context of the execution
- this user must be currently within a slice
- this user must have the necessary privileges to edit the entity (IFE → System → Benutzer → Roles → Content-Management)
|
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.delete() // => true
...
|
...
Warning |
---|
This function is deprecated! |
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.deletePermanent()
...
|
...
Returns the deliveryInformation field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.deliveryInformation // => 'some delivery information'
...
|
...
Returns the rendered description field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.description // => 'some product description'
...
|
...
Returns the unprocessed content of the description field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.descriptionUnprocessed // => 'description with renderable content'
...
|
...
Returns a string that you can use in the fragment cache. This string will change whenever the product or one of its files is changed.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.cacheKey # => "12589387317632578294"
... |
...
Returns an array of the flex attributes of the product
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
function getCategoryConfiguratorFilter(product, parameters)
{
var result = {};
var flexAttributes = product.flexAttributes;
for(var i=0;i<flexAttributes.length;i++)
{
var flexAttribute = flexAttributes[i];
if (/^category\./.test(flexAttribute))
{
result[flexAttribute.substring(9)] = product.get(flexAttribute);
}
}
return JSON.stringify(result);
}
...
|
...
Returns the format1 field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.format1 // => 'format1 content'
...
|
...
Returns the format2 field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.format2 // => 'format2 content'
...
|
...
Returns the value of key as string or null if no value is set under the key.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.get(key)
...
|
...
Returns a boolean value depending on whether key is present for a given product
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.has(key)
...
|
...
Returns whether the product has a template associated
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.hasTemplate // => true
...
|
...
Returns the id field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.id
...
|
...
Increments the vale of a given key by one.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.increment(key)
...
|
...
Returns whether product is marked as deleted.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.isDeleted // => false
...
|
...
Returns whether product is a direct delivery product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.isDirectDelivery // => true
...
|
...
Returns whether the product is associated to the current portal.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.isInPortal // => true
...
|
...
Warning |
---|
This function is deprecated! |
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.isOfflineEditable // => false
...
|
...
Warning |
---|
This function is deprecated! |
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.isOnlineEditable // => true
...
|
...
Returns whether product is marked as shop delivery.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.isShopDelivery // => false
...
|
...
Returns the metaDescription field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.metaDescription // => 'some meta description'
...
|
...
Returns the metaKeywords field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.metaKeywords // => 'some keywords'
...
|
...
Returns the metaTitle field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.metaTitle
...
|
...
Returns the name field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.name // => 'the product name'
...
|
...
Returns the name1 field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.name1 // => 'name1 content'
...
|
...
Returns the name1 field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.name2 // => 'name2 content'
...
|
...
int product.
...
originalCentPrice
Returns the originalPrice field of the original product price in cent. cents (Streichpreisinteger)
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.originalPriceoriginalCentPrice // => 2495
...
|
...
float product.
...
originalPrice
Returns the packageId originalPrice field of a the product. (Streichpreis)
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.originalPrice // => 24.95
...
|
int product.packageId
Returns the packageId field of a product
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.packageId // => 1
...
|
string product.path
Returns the merged custom URI for a product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.path // => '/products/some-product'
...
|
...
Returns a list of portal ids.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.portalIds // => [1, 2]
...
|
...
Returns a list of JSMA portal to which the product is associated.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.portals // => [portal0, portal1]
...
|
...
Returns a list of JSMA file uuids.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.previewImageIds // => ['UUID_LIKE0', 'UUID_LIKE1']
...
|
...
Returns a list of the URIs to the associated previewImages. Optionally resized to a desired value.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.previewImagePaths(64, 64) // => ['/media/path0.jpg', '/media/path1.jpg']
...
|
...
Returns a list of JSMA file of the associated previewImages.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.previewImages // => [file0, file1]
...
|
...
float product.price
Returns the product price in cents.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.price // => 9959.95
...
|
string product.printApiId
Returns the printApiId field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.printApiId // => 'UUID_LIKE'
...
|
...
Returns the product image as a JSMA file, if available.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.productImage // => file
anotherProduct.productImage // => null
...
|
...
Returns the uuid of the product image.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.productImageId // => 'UUID_LIKE'
...
|
...
Returns a URI for the product image. Optionally the image may be resized by setting the arguments for max_width and max_height.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.productImagePath(64, 64) // => '/media/some-image-path.jpg'
...
|
...
Removes the key from the flexAttributes of the product
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.remove(key)
...
|
...
Info |
---|
|
This entity is slice aware, which means that to use this facility: - there must be a logged in user in the context of the execution
- this user must be currently within a slice
- this user must have the necessary privileges to edit the entity (IFE → System → Benutzer → Roles → Content-Management)
|
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.removeFromPortal(1);
...
|
...
Info |
---|
|
This entity is slice aware, which means that to use this facility: - there must be a logged in user in the context of the execution
- this user must be currently within a slice
- this user must have the necessary privileges to edit the entity (IFE → System → Benutzer → Roles → Content-Management)
|
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.removePreviewImage('UUID_LIKE');
...
|
...
Warning |
---|
This function is deprecated! Use update-function instead! |
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.set(key, value, [options])
...
|
...
Info |
---|
|
This entity is slice aware, which means that to use this facility: - there must be a logged in user in the context of the execution
- this user must be currently within a slice
- this user must have the necessary privileges to edit the entity (IFE → System → Benutzer → Roles → Content-Management)
|
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.setDescription('new description') // => true
...
|
Parameter value (required)
bool product.setOriginalPrice(price)
Sets the product original price. Returns true or false depending on whether the operation was successful.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.setOriginalPrice(1995) // => Original price will be 24.95
... |
Parameter int price (required)
The new original price in cents
bool product.setPrice(price)
Sets the product price. Returns true or false depending on whether the operation was successful.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.setPrice(1995) // => Price will be 19.95
... |
Parameter int price (required)
The new price in cents
bool product.setProductImage(file)
...
Info |
---|
|
This entity is slice aware, which means that to use this facility: - there must be a logged in user in the context of the execution
- this user must be currently within a slice
- this user must have the necessary privileges to edit the entity (IFE → System → Benutzer → Roles → Content-Management)
|
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.setProductImage(file) // => true
...
|
...
Info |
---|
|
This entity is slice aware, which means that to use this facility: - there must be a logged in user in the context of the execution
- this user must be currently within a slice
- this user must have the necessary privileges to edit the entity (IFE → System → Benutzer → Roles → Content-Management)
|
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.setShortDescription('new short description') // => true
...
|
...
Info |
---|
|
This entity is slice aware, which means that to use this facility: - there must be a logged in user in the context of the execution
- this user must be currently within a slice
- this user must have the necessary privileges to edit the entity (IFE → System → Benutzer → Roles → Content-Management)
|
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.setTags('some, tags'); // => true
...
|
...
Info |
---|
|
This entity is slice aware, which means that to use this facility: - there must be a logged in user in the context of the execution
- this user must be currently within a slice
- this user must have the necessary privileges to edit the entity (IFE → System → Benutzer → Roles → Content-Management)
|
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.setTemplateFile(file) // => true
...
|
...
Warning |
---|
This function is deprecated! Use update-function instead! |
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.shortDescription // => 'some short description'
...
|
...
Warning |
---|
This function is deprecated! Use update-function instead! |
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.shortDescriptionUnprocessed // => 'some unprocessed short description'
...
|
...
Returns the SKU field of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.sku // => 'the SKU'
...
|
...
Returns the list of tags of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.tags // => ['some', 'tags']
...
|
...
Returns the parsed template representation.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.template // => { some: { object: {} } }
...
|
...
Returns the template as a JSMA file if available.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.templateFile // => file
anotherProduct.templateFile // => null
...
|
...
Returns the parsed template representation of an already customized version of the product specified by picedStore UUID.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.templateWithPiced('UUID_LIKE') // => { some: { object: {} } }
...
|
...
Returns the type field from the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.typ // => 'type content'
...
|
...
Warning |
---|
This function is deprecated! |
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.undelete() // => true
...
|
...
Updates the product with new attributes from the options object.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.update({ name: 'some other name' }) // => true
...
|
...
Returns the uuid of the product.
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
var prodUuid = product.uuid;
...
|
product.vat
Returns the vat
Example
Code Block |
---|
language | js |
---|
linenumbers | true |
---|
|
...
product.vat
...
|
...