Hi,
You could use a content tag:
www.hikashop.com/support/documentation/1...-product-insert.html
That's an easy way to display a product (name, price, add to cart button, etc) anywhere on your website, as long as you have the product_id since it doesn't require any coding.
Now, if you want to get the price of a product programatically and you only have the id of the product, you can do like this:
<?php
// load HikaShop
if(!@include_once(rtrim(JPATH_ADMINISTRATOR,DS).DS.'components'.DS.'com_hikashop'.DS.'helpers'.DS.'helper.php')){ return false; }
// get the product's main data
$productClass = hikashop_get('class.product');
$product = $productClass->get($product_id);
// load the prices
$ids = array($product_id);
$options = array('no_discounts' => false);
$currencyClass = hikashop_get('class.currency');
$currencyClass->getProductPrices($product, $ids, $options);
// a product can potentially have several prices (for different quantities for example)
$prices = $product->prices;
// display the prices
foreach($prices as $price) {
echo $currencyClass->format($price->price_value_with_tax, $price->price_currency_id);
}