Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Always display tax?


varnco

Recommended Posts

Posted

Is there a way to activate the sales tax option in OSC so it always displays the tax line, even if it's zero?

 

Example

 

 

Subtotal: $ 24.95

Shipping: $ 3.00

Sales Tax: $ 0.00

----------------------

Total: $27.95

Posted
Is there a way to activate the sales tax option in OSC so it always displays the tax line, even if it's zero?

 

Example

Subtotal: $ 24.95

Shipping: $ 3.00

Sales Tax: $ 0.00

----------------------

Total: $27.95

 

Just in case anyone else wants to do this, this is what I did so the Sales Tax line always displays on orders, invoice, etc., even if the amount is zero:

 

in /includes/modules/order_total/ot_tax.php, at around 31:

 

Change:

 

hile (list($key, $value) = each($order->info['tax_groups'])) {
	if ($value > 0) {

 

To:

hile (list($key, $value) = each($order->info['tax_groups'])) {
	if ($value > 0) {

 

This will result in the tax line always being displayed, even if it's zero. However, this will also result in a default tax description of "unknown tax rate" to display. This needs to be changed to something more generic, so I did this:

 

In

/includes/languages/english.php, at around line 323:

 

Change:

 

define('TEXT_UNKNOWN_TAX_RATE', 'Unknown tax rate');

 

To:

define('TEXT_UNKNOWN_TAX_RATE', 'Sales tax');

Or whatever you want as a default description when sales tax is calculated at zero.

 

 

Now, the sales tax line always displays on orders, even when the sales tax is $0.00. When sales tax is actually calculated (greater than $0), then the actual description for the tax type displays.

 

Not sure if anyone else wanted this, nor if I broke something else, but that's how I did it.

Archived

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

×
×
  • Create New...