Available Custom Behavior

The following user and product variables you can call in your twig.

User

Method
Description

getWaitingToReviewItems()

Get list of pending review for certain user.

getReviewHistory()

Get list of all reviews for certain user.

Product

Method
Description

getReviews()

Get the reviews for this product.

getRatingCountInList()

Get list of rating count for this product.

getReviews()

Arguments:

  • rating: Optional, int. Default null.

  • sort: Optional, string. By default dateCreated DESC.

Returns:

Array of Review Object.

getRatingCountInList()

Returns:

Array of rating count.

Example

[
    [ 'total' => 20, 'rating' => 5 ],
    [ 'total' => 27, 'rating' => 4 ],
    [ 'total' => 29, 'rating' => 3 ],
    [ 'total' => 1, 'rating' => 2 ],
     
]

Last updated