- Posts: 57
- Thank you received: 1
How do i get price value with tax
11 years 10 months ago - 11 years 10 months ago #181549
by 888
How do i get price value with tax was created by 888
-- HikaShop version -- : 2.3.4
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5.14-1
hi
How do i get price value with tax in my custom module
I only get price value (without tax)
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5.14-1
hi
How do i get price value with tax in my custom module
I only get price value (without tax)
Code:
<span class="price"> <?php
if($this->component=="com_hikamarket")
{
$msrpCurrencied = $currencyClass->convertUniquePrice($item->price_value,$mainCurr,$currCurrency);
if($msrpCurrencied == $item->price_value)
$price= $currencyClass->format($item->price_value,$mainCurr);
else
$price= $currencyClass->format($msrpCurrencied,$currCurrency).' ('.$currencyClass->format($item->price_value,$mainCurr).')';
echo $price."<br/><a href='".JRoute::_("index.php?option=com_hikamarket&ctrl=vendor&task=show&cid=" . $item->extra_id."&name=".$item->vendor_name)."'>".$item->vendor_name."</a><br/>";
}
?> </span>
Last edit: 11 years 10 months ago by Jerome. Reason: [code] is nice !
Please Log in or Create an account to join the conversation.
11 years 10 months ago #181564
by Xavier
Replied by Xavier on topic How do i get price value with tax
Hi,
You have to use $item->price_value_with_tax instead of $item->price_value
You have to use $item->price_value_with_tax instead of $item->price_value
Please Log in or Create an account to join the conversation.
11 years 10 months ago - 11 years 10 months ago #181630
by 888
Replied by 888 on topic How do i get price value with tax
hi xavier
I did already try it in my code but then just get 0
thanks in advance
I did already try it in my code but then just get 0
Code:
<span class="price"> <?php
if($this->component=="com_hikamarket") {
$msrpCurrencied = $currencyClass->convertUniquePrice( $item->price_value_with_tax,$mainCurr,$currCurrency);
if($msrpCurrencied == $item->price_value_with_tax)
$price= $currencyClass->format($item->price_value,$mainCurr);
else
$price= $currencyClass->format($msrpCurrencied,$currCurrency).' ('.$currencyClass->format( $item->price_value_with_taxe,$mainCurr).')';
echo $price."<br/><a href='".JRoute::_("index.php?option=com_hikamarket&ctrl=vendor&task=show&cid=" . $item->extra_id."&name=".$item->vendor_name)."'>".$item->vendor_name."</a><br/>";
}
?> </span>
Last edit: 11 years 10 months ago by Jerome. Reason: [code] is nice !
Please Log in or Create an account to join the conversation.
11 years 10 months ago #181659
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic How do i get price value with tax
Hi,
What is your module ?
Where the variables come from ?
What is exactly "$item" ?
What's the exact result you got ?
Regards,
What is your module ?
Where the variables come from ?
What is exactly "$item" ?
What's the exact result you got ?
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
Time to create page: 0.181 seconds