Hi,
First, you need to initialize HikaShop if that's not already the case with such code:
include_once(rtrim(JPATH_ADMINISTRATOR,DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR.'components'.DIRECTORY_SEPARATOR.'com_hikashop'.DIRECTORY_SEPARATOR.'helpers'.DIRECTORY_SEPARATOR.'helper.php');
Then, you can base yourself on the code we use in the "show" file of the "product" view in order to display the vote system at the bottom of the product page:
<form action="<?php echo hikashop_currentURL() ?>" method="post" name="adminForm_hikashop_comment_form" id="hikashop_comment_form">
<div id="hikashop_vote_listing" data-votetype="product" class="hikashop_product_vote_listing">
<?php
if($this->params->get('show_vote_product')) {
//LAYOUT listing of the comments for this product
$js = '';
if(isset($this->element->main)) {
$product_id = $this->element->main->product_id;
} else {
$product_id = $this->element->product_id;
}
$this->params->set('product_id',$product_id);
echo hikashop_getLayout('vote', 'listing', $this->params, $js);
?>
</div>
<div id="hikashop_vote_form" data-votetype="product" class="hikashop_product_vote_form">
<?php
//LAYOUT form to send a comment & vote
$js = '';
if(isset($this->element->main)) {
$product_id = $this->element->main->product_id;
} else {
$product_id = $this->element->product_id;
}
$this->params->set('product_id',$product_id);
echo hikashop_getLayout('vote', 'form', $this->params, $js);
}
?>
</div>
<input type="hidden" name="add" value="1"/>
<input type="hidden" name="ctrl" value="product"/>
<input type="hidden" name="task" value="show"/>
<input type="hidden" name="return_url" value="<?php echo urlencode(base64_encode(urldecode($this->redirect_url))); ?>"/>
</form>