Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Price with and without taxes ...


Ste73

Recommended Posts

You would need to edit several files for this, but this is quite possible to do.

 

Consider how you want Regular Price Special Price handled.

 

If you want both to show with and without taxes then you can edit the /includes/classes/currencies.php file and change what is being returned in the bottom function display_price ... ie send back both a non-tax and with tax ...

 

This should not mess up your display code on the checkout section as that is using the format function rather than the display function so it will not show the combination.

Link to comment
Share on other sites

You would need to edit several files for this, but this is quite possible to do.

 

Consider how you want Regular Price Special Price handled.

 

If you want both to show with and without taxes then you can edit the /includes/classes/currencies.php file and change what is being returned in the bottom function display_price ... ie send back both a non-tax and with tax ...  

 

This should not mess up your display code on the checkout section as that is using the format function rather than the display function so it will not show the combination.

 

what have i to change?

 

function display_price($products_price, $products_tax, $quantity = 1) {

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

 

Ste

Link to comment
Share on other sites

That function is called for each price you see.

 

If there is a Special, then it is called twice, once for the regular price and once for the Special price.

 

return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

 

Means return whatever price was just sent back as formated for the current currencies setting and tax setting.

 

You want to return back both. Assuming you have the display prices with tax turned on in application_top:

 

        $return_this= $this->format($products_price * $quantity) . ' ' . $this->format(tep_add_tax($products_price, $products_tax) * $quantity) . ' tax';

       return $return_this;

 

NOTE: you will want to shrink the font on various places

 

Another way to do this is to edit the individual locations where prices is called to get a better look to the prices.

 

This is just a quick method of doing this.

Link to comment
Share on other sites

Assuming you have the display prices with tax turned on in application_top:

 

Thanks for your help !!! Last thing:

 

on the order page now i have:

 

SUBTOTAL (with taxes)

TAXES

TOTAL (with taxes ... if the article is only one it's the same of subtotal)

 

Can i change subtotal to be show withot taxes?

 

Tks

 

Stefano

Link to comment
Share on other sites

  • 2 months later...

Hi

I made a contribution that hopefully does this and a little bit more. Here is the description

This contribution is meant to solve the problem of displaying prices including and excluding VAT. It will

1. Affect the display of prices in the following manner

a. If the person is NOT logged in, then the product will display two prices, one including tax and one excluding tax

b. If the person is logged in, then the price will display either a price including tax or a price excluding tax depending on their country of origin.

2. Add a page which displays information explaining what VAT is.

 

It is located here

http://www.oscommerce.com/community/contributions,1186

 

Hope this helps.

Link to comment
Share on other sites

Michelle

 

I am trying your VAT module on my test machine and having a little problem.

 

When the user is not logged in then the price excluding and including VAT is the SAME

 

When the user is logged in then the price is what is in the product database. ie the test database has software/action/unreal tournament at 89.99. Also Admin -> Configuration -> My Store -> Display Prices with Tax is set to True.

 

But the price shown is the same with and without VAT.

 

Any suggestions/pointers? Is there something else I need to do?

Paul Creedy

[email protected]

www.rhonddacynontaff.com

Link to comment
Share on other sites

I think it be too much number in the front page..so i make it so it only show inc.vat and ex.vat when you click into products:) But if you are inn logged it show all correct..

 

:idea:

Link to comment
Share on other sites

Hi Michelle,

 

I tried to install your VAT stuff, but I couldn't find the "filenames.php"

I don't have that file - what can I do?

 

In catalog/includes/filenames.php add the following line

define( 'FILENAME_VAT', 'vat.php');

 

regards

 

Thomas

Link to comment
Share on other sites

Since I installed the VAT contribution I can not login - I receive this message:

 

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/data-dist/includes/languages/english.php:327) in /usr/local/www/data-dist/includes/functions/general.php on line 29

 

Any ideas?

Link to comment
Share on other sites

That is only to define the "VAT" text site with info about VAT.

 

You must always define a new site in application_top.php , if not it will not work.

Link to comment
Share on other sites

If you get this error [Warning: Cannot modify header information - headers already sent by (output started at /usr/local/www/data-dist/includes/languages/english.php:327) in /usr/local/www/data-dist/includes/functions/general.php on line 29 ]

 

This happend when you use a bad editor to insert new text. You can use file tools in admin too insert new text to be define.

 

[/code]

Link to comment
Share on other sites

Hi

 

I installed Michelles mod and everything seemed to be working great but I've come across a problem when I have a drop down list with options associated with a product as when there is a drop down list it shows the options but also the html coding, thus making the drop down box twice the width of the page with a lot of irrelevant coding that the customer doesnt want to see.

 

Has anyone else experienced this? If so has anyone managed to solve the problem :?:

 

If no one else is experiencing this can anybody point me in the right direction as to how to correct the fault.

 

I'm running it on Loaded 5 with further mods also installed but I can't think of any that may be interfering with this particular add on?

 

Alternatively I would be happy to have just the ex Vat and Inc Vat show up in just the product pages and this would also work around the problem as if the currencies page didn't need to be altered it wouldn't effect the drop down boxes. I notice Andre mentioned that he managed to do this, if anybody could help me out with this option I'd be just as happy. :tellme:

 

Thanks all

 

 

Andrew

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

Sorry I didn't respond sooner. I don't seem to be getting notifications when a reply is posted to any of the threads that I have subscribed to.

 

I do have a fix for that error with the options I think. I have to add it to the contribution but here it is...

 

In catalog/product_info.php



Replace  

         if ($products_options['options_values_price'] != '0') {

           $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';

         }





With



       if ($products_options['options_values_price'] != '0') {

        if (tep_session_is_registered('customer_id'))

         {

          	 $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->format(tep_add_tax($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) * 1 ).') ';

         }

      	 else

         {

          	 $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->format(tep_add_tax($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) * 1 ).' inc VAT) (' . $products_options['price_prefix'] . $currencies->format($products_options['options_values_price'] * 1 ).' ex VAT) ';

           }

 

I think that should do the trick. If there is a problem, let me know.

 

Thanks.

Link to comment
Share on other sites

  • 2 months later...

Hi Michelle.

 

We're in Australia and would love to have this contribution working on our site. However prior to login, ex and inclusive is exactly the same.

 

Paul Creedy had the same problem and fixed it by setting up the Tax Class and Rate and Applying it to the United Kingdom.

 

How do we apply this mod to Australia's GST model

 

GST --> 10% --> All customers in Australia

 

Thanks

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...