I want to show star ratings in a custom phtml file. The product object is available inside that phtml file. How can I achieve the rating star summery there?
Any suggestions please.
custommagento-2.1ratingstemplate
I want to show star ratings in a custom phtml file. The product object is available inside that phtml file. How can I achieve the rating star summery there?
Any suggestions please.
Best Answer
The below worked for me.
Below is the custom
.phtml
file:Now In your custom helper class write the below code to get current store id:
This will return you the exact star rating div as in Magento 2 Luma theme.