Zen Cart Logo
Forums / Basic Configuration / Price including Tax value

Price including Tax value

Locked

Views: 1,813

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
11 Dec 2008, 1:07 PM
#1
cylon avatar

cylon

New Zenner

Join Date:
Sep 2008
Location:
Vaasa, Finland
Posts:
18
Plugin Contributions:
0

Price including Tax value

I would like to ask if it is possible to show the price like it is and under the price also the Tax value?

For example:

Now the desplayed price beside the product with taxes is shown as €59.90. That is ok, but It doesn´t show that this really is a price including the 22% tax value.
Therefor I would like to add also the tax value for people to see it actually.

Something like this:
€59.90 (incl.22%Tax)

Is this possible ? and how? :(

Thanks in advance!

11 Dec 2008, 1:32 PM
#2
fairestcape avatar

fairestcape

Totally Zenned

Join Date:
Mar 2008
Location:
Cape Town & London (depends on the season)
Posts:
2,957
Plugin Contributions:
0

Re: Price including Tax value

You can either use the module at this link:

http://www.zen-cart.com/index.php?main_page=product_contrib_info&products_id=848

that will display prices excluding AND prices including tax,

or you can add a line to tpl_product_info_display.php as follows:

Open this file:

includes/templates/template_default/templates/tpl_product_info_display.php

(If you have an over-ride of this file in your custom template, edit the existing over-ride file)

Find this section:

<!--bof Product Price block -->
<h2 id="productPrices" class="productGeneral">
<?php
// base price
  if ($show_onetime_charges_description == 'true') {
    $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
  } else {
    $one_time = '';
  }
  echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
?></h2>
<!--eof Product Price block -->

ADD IN THIS LINE, JUST ABOVE <!--eof Product Price block -->

<?php echo TEXT_PRICE_INCLUDES_TAX; ?>

So you get:```php

<!--bof Product Price block --> <h2 id="productPrices" class="productGeneral"> <?php // base price if ($show_onetime_charges_description == 'true') { $one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />'; } else { $one_time = ''; } echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']); ?></h2> <?php echo TEXT_PRICE_INCLUDES_TAX; ?> <!--eof Product Price block --> ```

Save the file, and FTP it to:

includes/templates/YOUR_TEMPLATE/templates/tpl_product_info_display.php

Now, you have to DEFINE the text for that new constant, so, open the following file:

includes/languages/english.php

(If you have an over-ride of this file in your custom template, edit the existing over-ride file)

(This can go anywhere, but put it with other TEXT_ defines so you can find it easily later.)

  define('TEXT_PRICE_INCLUDES_TAX', '(incl.22%Tax)');

Save the file, and FTP it to:

includes/languages/YOUR_TEMPLATE/english.php

11 Dec 2008, 1:37 PM
#3
cylon avatar

cylon

New Zenner

Join Date:
Sep 2008
Location:
Vaasa, Finland
Posts:
18
Plugin Contributions:
0

Re: Price including Tax value

Great!! This is what I needed! :clap:

:thumbsup: