Products
This template is WIP
replaceImage(bigImage)
Changing main image after click on graphic variant, or thumbnail
Kind: global function
Param | Type | Description |
---|---|---|
bigImage | String | bigImage = New big image url |
highlightActiveThumbnail(imageName)
Highlight active thumbnail
Kind: global function
Param | Type | Description |
---|---|---|
imageName | String | imageName = Name of active big image |
browseProducts($el)
Browse related/alternative products
Kind: global function
Param | Type | Description |
---|---|---|
$el | Object | $el = HTML element which triggered function |
setThumbnailsDirection()
Set direction of thumbnails in product detail according to template abilities, resolution and layout
This function does not accept any arguments.
Kind: global function
setThumbnails(direction)
Set necessary classes and variables for thumbnails direction in product detail
Kind: global function
Param | Type | Description |
---|---|---|
direction | String | direction = direction of image thumbnails |
checkThumbnailsAction($thumbnailsWrapper, diff, thumbnailsWrapperDimensions, thumbnailsScroll)
This function adds necessary classes to thumbnails wrapper
Kind: global function
Param | Type | Description |
---|---|---|
$thumbnailsWrapper | Object | $thumbnailsWrapper = HTML element which contains thumbnails |
diff | Number | diff = sum of thumbnails inner width/height and thumbnails offset |
thumbnailsWrapperDimensions | Number | thumbnailsWrapperDimensions = dimensions of thumbnails wrapper used for computing |
thumbnailsScroll | Number | thumbnailsScroll = offset of thumbnails |
checkThumbnails(direction, action, reset)
According to "action" parameter only gets informations about thumbnails dimensions or fires checkThumbnailsAction function
Kind: global function
Param | Type | Description |
---|---|---|
direction | String | direction = accepts 'horizontal' or 'vertical' |
action | String | action = accepts 'check' or 'set' |
reset | Boolean | reset = if set to true, resets thumbnails to initial state |
switchThumbnails(direction)
Scrolls thumbnails in defined direction
Kind: global function
Param | Type | Description |
---|---|---|
direction | String | direction = accepts 'prev' or 'next' |
checkDiscountFlag()
Hide empty discount flag
This function does not accept any arguments.
Kind: global function
changeStyle(score)
Update classes in rating tab after user's rate by click
Kind: global function
Param | Type | Description |
---|---|---|
score | String | score is data attr |
setStyle($selector)
Update classes in rating tab after user's rate by mouseover
Kind: global function
Param | Type | Description |
---|---|---|
$selector | String | $selector is selector |
returnStyle($selector)
Return previous classes in rating tab after mouseleave
Kind: global function
Param | Type | Description |
---|---|---|
$selector | String | $selector is selector |
sameHeightOfProductsLoop(target)
Used for setting same height of products in list
Kind: global function
Param | Type | Description |
---|---|---|
target | String | target = CSS selector of targeted element |
setHeightOfBigProduct()
Used for setting height of big product
This function does not accept any arguments.
Kind: global function
sameHeightOfProducts()
Set same height of products in products list
This function does not accept any arguments.
Kind: global function
changeQuantity()
Change quantity of products at cart, with arrows buttons
This function does not accept any arguments.
Kind: global function