- Posts: 431
- Thank you received: 19
Prices do not show with a tax included
7 years 3 months ago - 7 years 3 months ago #307691
by neo191987
Prices do not show with a tax included was created by neo191987
-- HikaShop version -- : 4.1.0
Hi, I want to show the variants in listing_img_title, I managed to do it through the code below but the problem is that I can not take the value price_value_with_tax. How can I show price with tax ?
Hi, I want to show the variants in listing_img_title, I managed to do it through the code below but the problem is that I can not take the value price_value_with_tax. How can I show price with tax ?
Code:
<?php
$productClass = hikashop_get('class.product');
$productClass->getProducts($this->row->product_id);
$products = $productClass->products;
foreach ($products as $product) {
$variants = $product->variants;
foreach ($variants as $variant) {
$vendor_id = $variant->product_vendor_id;
$sales = $variant->product_sales;
$price = $this->currencyHelper->format($variant->prices[0]->price_value, $variant->prices[0]->price_currency_id);
}
}
?>
Last edit: 7 years 3 months ago by nicolas.
Please Log in or Create an account to join the conversation.
7 years 3 months ago #307698
by nicolas
Replied by nicolas on topic Prices do not show with a tax included
Hi,
You can do like that:
You can do like that:
Code:
$taxed_price = $this->currencyHelper->format($this->currencyHelper->getTaxedPrice($variant->prices[0]->price_value, hikashop_getZone(), $this->row->product_tax_id), $variant->prices[0]->price_currency_id);
The following user(s) said Thank You: neo191987
Please Log in or Create an account to join the conversation.
Time to create page: 0.135 seconds