osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Tax Display

This is a discussion on Tax Display within the osCommerce 2.2 Installation Help forums, part of the osCommerce 2.2 Forums category; With 'Display prices with tax' set to true then the prices displayed correctly include tax (VAT). With 'Display prices with ...


Go Back   osCommerce and osCMax shopping cart software forums > osCommerce 2.2 Forums > osCommerce 2.2 Installation Help

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 01-17-2004, 12:40 AM
Member
 
Join Date: Aug 2003
Location: Southampton UK
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
NickW
Default Tax Display

With 'Display prices with tax' set to true then the prices displayed correctly include tax (VAT). With 'Display prices with tax' set to false the prices correctly exclude tax, but the tax should be identified during the order process and this doesn't work.

In 'Administration | Modules | Order Total' I have checked that 'Tax' is installed.

The entries in my tables are as follows:

products
tax_class_id=2

tax_class:
tax_class_id=2
tax_class_title=VAT
(2 records)

tax_rates:
tax_class_id=2
tax_rate=17.5
tax_description=Value Added Tax
tax_zone_id=1
(2 records)

zones
zone_id=1
zone_country_id=222
zone_name=United Kingdom
(1 record)

zone_to_geo_zones:
zone_id=1
zone_country_id=222
geo_zone_id=1
(239 records - all other zone_id's=0)

geo_zones:
geo_zone_id=1
geo_zone_name=Europe(17.5%)
(2 records)


Therefore:
products.tax_class_id = tax_class.tax_class_id = tax_rates.tax_class_id = 2 (VAT)
tax_rates.tax_rates_id = zone.zones_id = zone_to_geo_zones.zone_id = 1 (UK)
zone_to_geo_zones.geo_zone_id = geo_zones.geo_zone_id = 1 (Europe)

Can anyone advise what else I should check please to get the tax to display at checkout?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 01-17-2004, 02:45 AM
Member
 
Join Date: Aug 2003
Location: Southampton UK
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
NickW
Default

I tried changing the zero rating to 1% just incase it was reading the wrong tax %age, but no tax values showed.

I've had a look in checkout_confirmation.php and I think the product quantity and tax etc are stored in the 'products' array:

$order->products[$i]['tax']

Can someone remind me what C++/Java style syntax '->' means?
I believe it's returning the 'products' array from the 'order' class with the class 'order'.

I've confirmed with some debugging code that the value in products[$i]['tax'] = 0%

and:

$order->products[$i]['tax_description'] = Unknown tax rate %

$order->products[$i]['tax_class_id'] = %


"Unknown tax rate" is returned by the function tep_get_tax_description() in general.php
Code:
  function tep_get_tax_description($class_id, $country_id, $zone_id) {
    $tax_query = tep_db_query("select tax_description from " . TABLE_TAX_RATES . " tr left join " . TABLE_ZONES_TO_GEO_ZONES . " za on (tr.tax_zone_id = za.geo_zone_id) left join " . TABLE_GEO_ZONES . " tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '" . (int)$country_id . "') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '" . (int)$zone_id . "') and tr.tax_class_id = '" . (int)$class_id . "' order by tr.tax_priority");
    if (tep_db_num_rows($tax_query)) {
      $tax_description = '';
      while ($tax = tep_db_fetch_array($tax_query)) {
        $tax_description .= $tax['tax_description'] . ' + ';
      }
      $tax_description = substr($tax_description, 0, -3);

      return $tax_description;
    } else {
      return TEXT_UNKNOWN_TAX_RATE;
    }
  }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 01-17-2004, 04:29 AM
Member
 
Join Date: Aug 2003
Location: Southampton UK
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
NickW
Default

If I copy the following sql to PhpMyadmin then I correctly get 1 record returned which is "Value added tax"
Code:
select tax_description from tax_rates as tr left join zones_to_geo_zones as za on (tr.tax_zone_id = za.geo_zone_id) left join geo_zones as tz on (tz.geo_zone_id = tr.tax_zone_id) where (za.zone_country_id is null or za.zone_country_id = '0' or za.zone_country_id = '222') and (za.zone_id is null or za.zone_id = '0' or za.zone_id = '1') and tr.tax_class_id = '2' order by tr.tax_priority
How can I check that, in building the products array in the orders class, the correct parameters are being used for:
$products[$i]['tax_class_id']
$tax_address['entry_country_id']
$tax_address['entry_zone_id']
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 01-17-2004, 06:13 AM
Member
 
Join Date: Aug 2003
Location: Southampton UK
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
NickW
Default

I've added the contribution 'VAT Price Incl and Excl' and set 'Display prices with tax' to true and it now works.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 01-19-2004, 02:55 PM
Member
 
Join Date: Aug 2003
Location: Southampton UK
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
NickW
Default

Still not working for Admin | Customers | Orders, tax appears as 0%!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 01-20-2004, 08:11 AM
jpf's Avatar
jpf jpf is offline
Moderator

 
Join Date: Sep 2003
Location: Manitoba, Canada
Posts: 1,665
Thanks: 2
Thanked 93 Times in 79 Posts
Rep Power: 12
jpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of lightjpf is a glorious beacon of light
Default

I would reinstall a fresh copy of your version of OSC. It works out of the box just fine. There may have been something you added/changed/modified that BROKE this.
__________________
JPF - osCMax Fourm Moderator
Try out our osCMax at: Live Catalog Demo
Limited access Admin: Live Admin Demo
Feel free to add products they way you want and then purchase them -=+=- Sorry nothing will be billed or shipped!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 02-05-2004, 06:22 AM
Member
 
Join Date: Aug 2003
Location: Southampton UK
Posts: 63
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
NickW
Default

I've solved it!

The prices inc and ex VAT were being calculated correctly before customer login, but once logged in then the inc and ex VAT prices were the same (ie 0% tax). I found that because I had changed the zone details etc after having created an account, the value in the entry_zone_id field in the address_book table was incorrect, and once changed to the correct zone value then it worked ok.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
X-sell display spurs20 osCommerce 2.2 Modification Help 1 08-09-2005 09:44 AM
no display at all after install kellycog61 osCommerce 2.2 Installation Help 1 07-18-2005 07:56 AM
Help! How to display the percentage value? lolamery osCommerce 2.2 Modification Help 0 05-20-2005 02:06 AM
New Products Display warrenthewindmill osCMax v1.7 Discussion 1 11-22-2003 02:45 PM
Tax (U.K. VAT) display both byson osCommerce 2.2 Modification Help 0 03-28-2003 04:36 AM


All times are GMT -8. The time now is 01:05 AM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax