Skip to main content

How do i get price value with tax

More
11 years 10 months ago - 11 years 10 months ago #181549 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)
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.

More
11 years 10 months ago #181564 by Xavier
Hi,

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.

More
11 years 10 months ago - 11 years 10 months ago #181630 by 888
hi xavier
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>
thanks in advance
Last edit: 11 years 10 months ago by Jerome. Reason: [code] is nice !

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #181659 by Jerome
Hi,

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
Powered by Kunena Forum