-- HikaShop version -- : 3.2.0
Hi I recently bought
HikaShop App
, but I have a few problems with it. I know this is not your application but you will help me best. My first problem is that it shows the price without VAT if it's in tax mode: Electronic goods & services.
This is the code for the price:
/**
* Retrieve product price
*
* @since 2.0
* @access public
* @param string
* @return
*/
public function getProductPrice(&$product)
{
$currencyHelper = hikashop_get('class.currency');
$config = hikashop_config();
$discount_before_tax = (int)$config->get('discount_before_tax',0);
$currencyClass = hikashop_get('class.currency');
$currency_id = hikashop_getCurrency();
$main_currency = $currency_id = (int)$config->get('main_currency', 1);
$zone_id = hikashop_getZone(null);
$ids = array($product->product_id);
$currencyClass->getPrices($product,$ids,$currency_id,$main_currency,$zone_id,$discount_before_tax);
$product->price = $currencyHelper->format($product->prices[0]->price_value);
}
Second problem likely to draw the lowest price of the variants and show it as a product price.
Third problem is how can I show just one category and not all. This is the code:
<i class="fa fa-folder"></i>
<?php for ($i=0; $i < count($product->categories); $i++) { ?>
<?php echo $product->categories[$i]->title;?>
<?php if (isset($product->categories[$i+1]->title)) { ?>
<?php echo ','; ?>
<?php } ?>
<?php } ?>
</li>