-- HikaShop version -- : 4.0.2
I do not found such a category or place to post it. i find a section with sample codes for the v4.x could be cool.
maybe someone have a use for it.
a snippet for the product view to show the TAX_RATE (listing_price.php):
// modification START
// var_dump($this->element->prices[0]->taxes);
if(!empty($this->element->product_id)) {
$myProductTaxRate = reset($this->element->prices[0]->taxes)->tax_rate * 100;
echo '<span class="enter-a-class-to-style-it">';
echo 'incl. ' . $myProductTaxRate . '% TAX';
echo '</span>';
}
// modification END
and to show the TAX_RATE on the checkout at total price per article (checkout/listing_price.php):// modification START
if(empty($this->unit)) {
$myTaxRate = reset($price->taxes)->tax_rate * 100;
echo '<span class="enter-a-class-to-style-it">';
echo 'incl. ' . $myTaxRate . '% TAX';
echo '</span>';
}
// modification ENDE