Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

VAT Display


parma

Recommended Posts

Hello,

 

I am using the VAT Display contribution, which is just what I wanted on my site. The link is shown below.

 

http://www.oscommerce.com/community/contri.../search,exc+vat

 

However, I am having one problem which is due to the fact that I am using Price break. This creates the problem of creating to many prices on the product categories and I think it would be quite confusing for a customer. To give you an idea of what it looks like I have linked a picture below;

 

prices5hy.jpg

 

Does anyone know how I could get the contribution to just show excluding prices? rather than including VAT prices aswell?

 

I have tried to play around with the code which I have pasted below but with no luck.

Thanks again, your help will be much appreciated.

 

Kind regards

 

M Parmar

 

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) ';
		}
	  }

 

&

 

In catalog/includes/classes/currencies.php
replace
	return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);

with
	global $customer_id;
  if (tep_session_is_registered('customer_id'))
  { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity);
	} else {
	$return_this=  $this->format(tep_add_tax($products_price, $products_tax) * $quantity) . ' (inc <a href="' . tep_href_link(FILENAME_VAT, '', 'NONSSL') . '">VAT</a>)<br /> ' . $this->format($products_price * $quantity) . '(ex <a href="' . tep_href_link(FILENAME_VAT, '', 'NONSSL') . '">VAT</a>)';
		return $return_this;
  }

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...