Order list with no vat total column

  • Posts: 171
  • Thank you received: 9
10 years 4 weeks ago #149797

-- HikaShop version -- : 2.3
-- Joomla version -- : 3.2.3.

Hi!

In Hikamarket frontend, when listing the orders on link (/index.php?option=com_hikamarket&ctrl=order), the last column is order full price.

How can I show the order price without tax? Tried a few variables in (/ordermarket/listing.php) but none worked. I think this line should be changed:

<?php echo $this->currencyHelper->format($order->order_full_price, $order->order_currency_id); ?>

Thanks for the help in advance,
PePe

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

  • Posts: 26007
  • Thank you received: 4004
  • MODERATOR
10 years 4 weeks ago #149831

Hi,

The order taxes are serialized in the "tax_info" but the best is to use the function "loadFullOrder" to let HikaShop give you the price without tax.
In the view "ordermarket | listing" please replace

$k = 0;
$i = 0;
foreach($this->orders as $order) {
By
$k = 0;
$i = 0;
$orderClass = hikamarket::get('shop.class.order');
foreach($this->orders as $order) {

And also the targeted code:
<?php echo $this->currencyHelper->format($order->order_full_price, $order->order_currency_id); ?>
By:
<?php
$fullOrder = $orderClass->loadFullOrder($order->order_id,false,false);
echo $this->currencyHelper->format($fullOrder->order_subtotal_no_vat, $order->order_currency_id);
?>
At this moment it will give you the order subtotal without taxes.
Please note that the shipping and the payment price are not included. So if you want them, you will have to add them.

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.
The following user(s) said Thank You: pepecortez

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

Moderators: Obsidev
Time to create page: 0.059 seconds
Powered by Kunena Forum