Full price view at admin panel

  • Posts: 29
  • Thank you received: 0
12 years 4 months ago #33935

Hi, Nikolas!

How I can change the viewing of price column for full price (with VAT included)?

Attachments:

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

  • Posts: 81598
  • Thank you received: 13081
  • MODERATOR
12 years 4 months ago #33995

Hi,

You will have to edit the file "listing" of the view "product" of the back end via the menu Display->Views and change the line:
<?php echo $this->currencyHelper->displayPrices(@$row->prices); ?>

to:
<?php echo $this->currencyHelper->displayPrices(@$row->prices,'price_value_with_tax'); ?>

so that the prices on the products listing of the back end are displayed with the taxes included.

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

  • Posts: 29
  • Thank you received: 0
12 years 4 months ago #34139

Thanks, I found it and replace but not worked.

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

  • Posts: 81598
  • Thank you received: 13081
  • MODERATOR
12 years 4 months ago #34140

Make sure that you do that modification for your back end template.

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

  • Posts: 29
  • Thank you received: 0
12 years 4 months ago #34143

I attach the image of this replacing.

Attachments:
Last edit: 12 years 4 months ago by yaigor.

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

  • Posts: 29
  • Thank you received: 0
12 years 3 months ago #35558

I understand that can be another file - "variant" of the view "product" of the back end via the menu Display->Views.

I add the columns:
...
<th class="title">
<?php echo JText::_('PRODUCT_PRICE'); ?>
</th>
<th class="title">
<?php echo JText::_('PRICE_WITH_TAX'); ?>
</th>

.....
<td>
<?php echo $this->currencyHelper->displayPrices(@$row->prices); ?>
</td>
<td>
<?php echo $this->currencyHelper->displayPrices(@$row->prices,'price_value_with_tax'); ?>
</td>

...

But I see only zero (0,00) for second price column instead real value price_value_with_tax

Attachments:
Last edit: 12 years 3 months ago by yaigor.

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

  • Posts: 81598
  • Thank you received: 13081
  • MODERATOR
12 years 3 months ago #35587

Hi,

I checked the code and the problem is that the price with tax is not loaded. That's why it doesn't work.
You will have to do like that:
$price = reset($row->prices);
echo $this->currencyHelper->format($this->currencyHelper->getTaxedPrice($price->price_value,hikashop_getZone(),$row->product_tax_id,2),1);

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

  • Posts: 29
  • Thank you received: 0
12 years 3 months ago #35619

Hi!

It work!
But currency not the same as I used...

Attachments:

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

  • Posts: 81598
  • Thank you received: 13081
  • MODERATOR
12 years 3 months ago #35660

Yes, I force the currency id to 1 in my example code.

You should do like that to have the price's currency:
$price = reset($row->prices);
echo $this->currencyHelper->format($this->currencyHelper->getTaxedPrice($price->price_value,hikashop_getZone(),$row->product_tax_id,2),$price->price_currency_id);

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

  • Posts: 29
  • Thank you received: 0
12 years 3 months ago #35668

Super!! Work fine!
Thanx you very much Nicolas!

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

  • Posts: 3
  • Thank you received: 0
12 years 1 month ago #42312

Hello

Tried this change in the code - but unfortunately the result is not as expected :( - the column still shows the price without taxes

Greetings from Luxembourg
thilo

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

  • Posts: 79
  • Thank you received: 1
12 years 1 month ago #42388

Trying just the same!
First thing I just discoverd was that I need to change the code in the administrator template. (Joomla 2.5 ->bluestork)

Change the product / listing.php in administrator backend template
Instead of this code <?php echo $this->currencyHelper->displayPrices(@$row->prices); ?>

you should use this one
<?php $price = reset($row->prices);
echo $this->currencyHelper->format($this->currencyHelper->getTaxedPrice($price->price_value,hikashop_getZone(),$row->product_tax_id,2),$price->price_currency_id); ?>

Hope that´ll do it for you
good luck
greetings from bavaria

Last edit: 12 years 1 month ago by Georg.

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

  • Posts: 81598
  • Thank you received: 13081
  • MODERATOR
12 years 1 month ago #42501

Make sure that you change the code for your backend template.
Also, make sure that you configured properly your tax rules so that when you enter the price without taxes in a product, the price with taxes is correct.
Then that code change will definitely work.

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

  • Posts: 23
  • Thank you received: 1
9 years 5 months ago #179862

Hi

I need to view the product with tax in backend , I change the line

<?php echo $this->currencyHelper->displayPrices(@$row->prices); ?>

to:
<?php echo $this->currencyHelper->displayPrices(@$row->prices,'price_value_with_tax'); ?>

but in Hikashop 2.3.3 doesn't work. When I change this line I view all the price to 0,00

What I must change to view the price included tax in backend? Thanks

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

  • Posts: 81598
  • Thank you received: 13081
  • MODERATOR
9 years 5 months ago #179871

Hi,

I cannot reproduce the problem on my end with HikaShop 2.3.4. That solution is still working.
Did you change something else ?
How did you configure the prices of your products ? Could you do a screenshot ?
What tax category did you select for your products ?
How did you configure your tax rules ? Could you do a screenshot ?

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

  • Posts: 23
  • Thank you received: 1
9 years 4 months ago #182309

I updated to Hikashop 2.3.4 and now it works!
Thanks

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

Time to create page: 0.124 seconds
Powered by Kunena Forum