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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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? |
| Sponsored Links | ||
| ||
|
#2
| |||
| |||
| 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;
}
}
|
|
#3
| |||
| |||
| 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 $products[$i]['tax_class_id'] $tax_address['entry_country_id'] $tax_address['entry_zone_id'] |
|
#4
| |||
| |||
| I've added the contribution 'VAT Price Incl and Excl' and set 'Display prices with tax' to true and it now works. |
|
#5
| |||
| |||
| Still not working for Admin | Customers | Orders, tax appears as 0%! |
|
#6
| ||||
| ||||
| 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! |
|
#7
| |||
| |||
| 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. |
| Sponsored Links | ||
| ||
| |
| Thread Tools | |
| |
| ||||
| 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 |