Tax rate, zone and id on checkout/cart

  • Posts: 57
  • Thank you received: 2
11 years 5 months ago #107246

Hi,

how can I show the tax rate, the tax zone, and the tax id in the checkout/cart?

Cheers,
Ralf

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

  • Posts: 82759
  • Thank you received: 13346
  • MODERATOR
11 years 5 months ago #107292

Hi,

I'm not following you. Why do you want to display that ? Where exactly ? With the tax id ? Are you talking about the id of the tax rule in HikaShop ? Something else ?

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

  • Posts: 57
  • Thank you received: 2
11 years 5 months ago #107703

Hi,
sorry for the incomplete question.
I want to display the the tax rate, the tax zone and the official tax id (TVA intracommunautaire) beside the tax amount:

Tax zone: EU, no Tax ID: 19% Tax: 345,87€
or
Tax zone: EU, Tax ID: DE78664675, no Tax calculated

Cheers
Ralf

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

  • Posts: 57
  • Thank you received: 2
11 years 5 months ago #107704

Hi,

this information is also needed by law on the invoice, at least here in germany.

Cheers,
Ralf

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

  • Posts: 2334
  • Thank you received: 403
11 years 5 months ago #107733

Hi there,

You have to edit the view cart/checkout and add some rows or edit the current to add these informations.
You can find everything you need in $tax (use var_dump() to see what's inside).
If you don't have enough informations, you can make a query like:

$query= 'SELECT * FROM '.hikashop_table('taxation').' WHERE tax_namekey='.$tax->tax_namekey;
to get it form the database.

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

  • Posts: 57
  • Thank you received: 2
11 years 5 months ago #107781

hi,

$this->full_total->prices[0]->taxes
shows this:


but I don't know how to go further.
Can you help me again?

Cheers,
Ralf

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

  • Posts: 2334
  • Thank you received: 403
11 years 5 months ago #107795

I think you forget something in you previous post.
Theoretically you should have what you need. Use it with $this->full_total->prices[0]->taxes or $this->full_total->prices[0]->taxes->data (data is an example).

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

  • Posts: 57
  • Thank you received: 2
11 years 5 months ago #107933


doublette

Last edit: 11 years 5 months ago by Hans987. Reason: doublette

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

  • Posts: 57
  • Thank you received: 2
11 years 5 months ago #107936

Hi,

the picture was lost.
try again.

dumping var_dump($this->full_total->prices[0]); gives this:

object(stdClass)[1022]
public 'price_value' => float 270
public 'price_value_with_tax' => float 321.3
public 'price_currency_id' => int 1
public 'taxes' =>
array
'Steuer 19 %' =>
object(stdClass)[993]
public 'tax_namekey' => string 'Steuer 19 %' (length=11)
public 'tax_rate' => string '0.19000' (length=7)
public 'tax_amount' => float 51.3
public 'price_value_without_payment' => float 270
public 'price_value_without_payment_with_tax' => float 321.3


Solution was this:

$array=$this->full_total->prices[0]->taxes;
foreach($array as $value)
echo $value->tax_rate;

probably php basics. But maybe, there are other "patchers" in this forum :-)

Thanks!
Ralf

Attachments:
The following user(s) said Thank You: nicolas

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

Time to create page: 0.079 seconds
Powered by Kunena Forum