Display Prices inclusive/exclusive based on currency viewed

Modules, Add-ons and custom code that's more than just a quick hack or Mod.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Display Prices inclusive/exclusive based on currency viewed

Post by Martin »

This modification was put together primarily to deal with the issue of a multi-currency site using Google Merchant feed where the display of tax included/excluded price just seemed unnecessarily messy and might potentially confuse customers.

Note: This mod' requires you to have setup your store as follows:
  • AdminCP > Tax Settings:
    • Show Prices on Product Listings: Including and excluding tax
    • Show Prices on Product Pages: Including and excluding tax
  • Edit the currency streams accordingly (This mod assumes EU/UK are VAT inclusive, everything else exclusive)
  • Obviously to have tax setup properly for the appropriate country zones using the appropriate currencies

Open: /lib/pricing.php

Find:

Code: Select all

require_once(ISC_BASE_PATH."/lib/currency.php");
After, Add:

Code: Select all

/*
 * MOD set flag for Price format based on the currency being displayed
 * eg: If VAT set for EU/UK countries it will show inclusive for GBP/EURO
 * and exclusive for any non-VAT currencies
 */

function formatPriceDependentOnCurrency($options=array(), $currencyId=false) {

	if(!key_exists('CurrentCurrency', $GLOBALS) && !$currencyId) {
		return $options;
	}
	
	$toCurrencyId = $currencyId ? $currencyId : $GLOBALS['CurrentCurrency'];
	
	$toCurrency = GetCurrencyById($toCurrencyId);
	
	if(!in_array($toCurrency['currencycode'], array('GBP', 'EUR'))) {
		$options['displayFormat'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
		$options['dropLabel'] = true;
		
		$currency2Country = array(
			'USD'	=> 'US',
			'CAD'	=> 'CA',
			'AUD'	=> 'AU'
		);
		
		if(key_exists($toCurrency['currencycode'], $currency2Country)) {
			$options['countryID'] = GetCountryIdByISO2($currency2Country[$toCurrency['currencycode']]);
/*			$GLOBALS['ISC_CLASS_LOG']->LogSystemDebug('php', "CountryISO {$currency2Country[$toCurrency['currencycode']]} CountryID : {$options['countryID']}" , 
					"New Country set based on currency : {$toCurrency['currencycode']}");
*/
		}
	}
	else {
		$options['displayFormat'] = TAX_PRICES_DISPLAY_INCLUSIVE;
		// Default back to UK to ensure pricing updates back to tax inclusive
		$options['countryID'] = GetCountryIdByISO2('GB');
	}
	return $options;
}
// MOD END
Find:

Code: Select all

function formatProductCatalogPrice($product, array $options = array())
{
	$displayFormat = getConfig('taxDefaultTaxDisplayCatalog');
	$options['displayInclusive'] = $displayFormat;

	if($displayFormat != TAX_PRICES_DISPLAY_BOTH) {
		return formatProductPrice($product, $product['prodcalculatedprice'], $options);
	}

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_INCLUSIVE;
	$priceIncTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
	$priceExTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	$output = '<span class="CatalogPriceIncTax">';
	$output .= $priceIncTax;
	$output .= getLang('CatalogPriceIncTaxLabel', array(
		'label' => getConfig('taxLabel')
	));
	$output .= '</span> ';
	$output .= '<span class="CatalogPriceExTax">';
	$output .= $priceExTax;
	$output .= getLang('CatalogPriceExTaxLabel', array(
		'label' => getConfig('taxLabel')
	));
	$output  .= '</span>';
	return $output;
}
Replace with:

Code: Select all

function formatProductCatalogPrice($product, array $options = array())
{
	$displayFormat = getConfig('taxDefaultTaxDisplayCatalog');
	$options['displayInclusive'] = $displayFormat;

	//MOD override tax display format 
	if(key_exists('displayFormat', $options)) {
		$option_format = $options['displayFormat'];
	}
	//MOD END	
	
	if($displayFormat != TAX_PRICES_DISPLAY_BOTH) {
		return formatProductPrice($product, $product['prodcalculatedprice'], $options);
	}

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_INCLUSIVE;
	$priceIncTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
	$priceExTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	// MOD override tax display format
	if($priceIncTax == $priceExTax) {
		return $priceIncTax;
	}
	
	$output = '';
	
	if(!isset($option_format) || $option_format == TAX_PRICES_DISPLAY_INCLUSIVE) {
		$output = '<span class="CatalogPriceIncTax">';
		$output .= $priceIncTax;
		$output .= getLang('CatalogPriceIncTaxLabel', array(
			'label' => getConfig('taxLabel')
		));
		$output .= '</span> ';
	}
	if(!isset($option_format) || $option_format == TAX_PRICES_DISPLAY_EXCLUSIVE) {

		$output .= '<span class="CatalogPriceExTax">';
		$output .= $priceExTax;
		if(!key_exists('dropLabel', $options)) {
			$output .= getLang('CatalogPriceExTaxLabel', array(
				'label' => getConfig('taxLabel')
			));
		}
		$output  .= '</span>';
	}
	//MOD END
	return $output;
}
Find:

Code: Select all

function formatProductDetailsPrice($product, array $options = array())
{
	$displayFormat = getConfig('taxDefaultTaxDisplayProducts');
	$options['displayInclusive'] = $displayFormat;

	if($displayFormat != TAX_PRICES_DISPLAY_BOTH) {
		return formatProductPrice($product, $product['prodcalculatedprice'], $options);
	}

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_INCLUSIVE;
	$priceIncTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
	$priceExTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	$output = '<span class="ProductDetailsPriceIncTax">';
	$output .= $priceIncTax;
	$output .= getLang('ProductDetailsPriceIncTaxLabel', array(
		'label' => getConfig('taxLabel')
	));
	$output .= '</span> ';
	$output .= '<span class="ProductDetailsPriceExTax">';
	$output .= $priceExTax;
	$output .= getLang('ProductDetailsPriceExTaxLabel', array(
		'label' => getConfig('taxLabel')
	));
	$output  .= '</span>';
	return $output;
}
Replace with:

Code: Select all

function formatProductDetailsPrice($product, array $options = array())
{
	$displayFormat = getConfig('taxDefaultTaxDisplayProducts');
	
	$options['displayInclusive'] = $displayFormat;

	//MOD override tax display format 
	if(key_exists('displayFormat', $options)) {
		$option_format = $options['displayFormat'];
	}
	//MOD END

	if($displayFormat != TAX_PRICES_DISPLAY_BOTH) {
		return formatProductPrice($product, $product['prodcalculatedprice'], $options);
	}

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_INCLUSIVE;
	$priceIncTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
	$priceExTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	// MOD override tax display format
	if($priceIncTax == $priceExTax) {
		return $priceIncTax;
	}

	$output = '';

	if(!isset($option_format) || $option_format == TAX_PRICES_DISPLAY_INCLUSIVE) {
		$output = '<span class="ProductDetailsPriceIncTax">';
		$output .= $priceIncTax;
		$output .= getLang('ProductDetailsPriceIncTaxLabel', array(
			'label' => getConfig('taxLabel')
		));
		$output .= '</span> ';
	}
	if(!isset($option_format) || $option_format == TAX_PRICES_DISPLAY_EXCLUSIVE) {
		$output .= '<span class="ProductDetailsPriceExTax">';
		$output .= $priceExTax;
		if(!key_exists('dropLabel', $options)) {
			$output .= getLang('CatalogPriceExTaxLabel', array(
				'label' => getConfig('taxLabel')
			));
		}		
		$output  .= '</span>';
	}
	//MOD END
	return $output;
}

Open: /includes/display/ProductDetails.php

Find:

Code: Select all

			$GLOBALS['ProductPrice'] = formatProductDetailsPrice($product, $options);
Before, Add:

Code: Select all

			//MOD do not show tax when currency is outside the UK/EU
			$options = formatPriceDependentOnCurrency($options);
			//MOD End
Find:

Code: Select all

			$displayFormat = getConfig('taxDefaultTaxDisplayProducts');
Before, Add:

Code: Select all

			//MOD do not show tax when currency is outside the UK/EU
			$displayFormat = (is_array($options) && key_exists('displayFormat', $options)) ? $options['displayFormat'] : getConfig('taxDefaultTaxDisplayProducts');
			//MOD End


Open: /lib/templates/product_panel.php

Find:

Code: Select all

			$GLOBALS['ProductPrice'] = formatProductCatalogPrice($row);
REPLACE with:

Code: Select all

			//MOD do not show tax when currency is outside the UK/EU
			$options = formatPriceDependentOnCurrency();
			
			// $GLOBALS['ProductPrice'] = formatProductCatalogPrice($row);
			$GLOBALS['ProductPrice'] = formatProductCatalogPrice($row, $options);
			//MOD End
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Display Prices inclusive/exclusive based on currency vie

Post by Martin »

Few minor edits that fix various "undefined()" errors..
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Display Prices inclusive/exclusive based on currency vie

Post by Martin »

In response to this question/problem...
https://www.interspire.com/forum/showpo ... stcount=20

You can use the code above so that the price shows "excluding tax" on the price to meet the GM requirement for B2B listings..

In the /lib/pricing.php changes

Find:

Code: Select all

if(!in_array($toCurrency['currencycode'], array('GBP', 'EUR'))) {
Replace with:

Code: Select all

if(!in_array($toCurrency['currencycode'], array())) {
With the rest of the modification applied this will result in the product details and category view displaying prices with a (excluding VAT) text.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Display Prices inclusive/exclusive based on currency vie

Post by Martin »

Variations weren't covered with this mod' so a small addition covers that..

Open: includes/classes/class.product.php

Find:

Code: Select all

				$variationPrice = formatProductDetailsPrice($this->_product, $priceOptions);
Before, Add:

Code: Select all

				//MOD do not show tax when currency is outside the UK/EU
				$priceOptions = formatPriceDependentOnCurrency($priceOptions);
				//MOD End
				
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Display Prices inclusive/exclusive based on currency vie

Post by Martin »

Amendment to the mod above that deals with Google Merchant requirements for foreign target feeds and tax/pricing rules.

The modification allows the store to set a default country for the shipping quotes based on the most obvious country for their current currency viewed. Obviously this won't work for Euros, but is a boon for dealing with USA (USD$), etc...

The changes in general.php allow the store to setup tax rules and defaults to the target currency/country rather than the store default (again based on currency).

The reason these changes are so utterly vital for anyone using Google Merchant is that anyone scouring your feed will have a field day denying your store complies due to discrepancies as soon as anything is added to the cart, especially if the tax situation is different in your stores country compared to that of the target feed.

For example: UK Store, Australian GM feed...
UK end users like Tax inclusive prices so the default setting is for all prices to be shown VAT inclusive, whether you are visiting from Australia, tim-buck-ruddy-too, or whatever... The fixes earlier in the thread will resolve the product details page but not the cart.. The modifications below resolve the cart display for NEW visitors who enter the store using a currency link (eg: http://www.foostore.co.uk/index.php?setCurrencyId=5 )...

Anyone coming through a search engine will probably lose that currency variable but the Google Merchant feed (mine that is!) exports the variable with the product URLs so any new visitors should arrive correctly and see the ex-VAT pricing.


A Note on Contributions, Re-Use
I must admit to thinking I should not release this publicly as the net amount of stated contributions to any charities for other mods, or indeed contributions to myself have been non-existent. I've released this as is, on the strict understanding it is not to be resold to clients, not to be farmed into Big Commerce (Yes, you folks lurking in the background), or abused in any way... If you find it useful... Pay up, Pay It Forward or [Edit:]"Don't expect any help"... Plain and simple... This code does not write itself and is only happening because I need it for my own store. Nuff said...



Open: includes/classes/class.product.php

Replace the existing function formatPriceDependentOnCurrency() with this:

Code: Select all

/*
 * MOD set flag for Price format based on the currency being displayed
 * eg: If VAT set for EU/UK countries it will show inclusive for GBP/EURO
 * and exclusive for any non-VAT currencies
 */

function formatPriceDependentOnCurrency($options=array(), $currencyId=false) {

	$toCurrencyId = $currencyId ? $currencyId : $GLOBALS['CurrentCurrency'];
	
	$toCurrency = GetCurrencyById($toCurrencyId);
	
	if(!in_array($toCurrency['currencycode'], array('GBP', 'EUR'))) {
		$options['displayFormat'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
		$options['dropLabel'] = true;
		
		$currency2Country = array(
			'USD'	=> 'US',
			'CAD'	=> 'CA',
			'AUD'	=> 'AU'
		);
		
		if(key_exists($toCurrency['currencycode'], $currency2Country)) {
			$options['countryID'] = GetCountryIdByISO2($currency2Country[$toCurrency['currencycode']]);
/*			$GLOBALS['ISC_CLASS_LOG']->LogSystemDebug('php', "CountryISO {$currency2Country[$toCurrency['currencycode']]} CountryID : {$options['countryID']}" , 
					"New Country set based on currency : {$toCurrency['currencycode']}");
*/
		}
	}
	else {
		$options['displayFormat'] = TAX_PRICES_DISPLAY_INCLUSIVE;
		// Default back to UK to ensure pricing updates back to tax inclusive
		$options['countryID'] = GetCountryIdByISO2('GB');
	}
	return $options;
}
// MOD END

Open: /lib/currency.php

Find:

Code: Select all

function SetupCurrency()
{
DELETE (Old Mod Code):

Code: Select all

	if($GLOBALS['CurrentCurrency'] != $_SESSION['CURRENCY']) {
		$_SESSION['ORIGCURRENCY'] = $_SESSION['CURRENCY'];
	}

Find:

Code: Select all

function SaveCurrencyInSession($currencyId)
{
	$currency = GetCurrencyById($currencyId);
	if($currency['currencyid']) {

After, Add:

Code: Select all

		//MOD Set tax display according to viewed currency
		if(key_exists('CURRENCY', $_SESSION)) {
			
			if(!isset($_SESSION['QUOTE'])) {
				$_SESSION['QUOTE'] = new ISC_QUOTE;
			}
			
			$options = formatPriceDependentOnCurrency(array(), $currencyId);
			if(key_exists('countryID', $options)) {
					
				$_SESSION['QUOTE']->getBillingAddress()->setCountryById($options['countryID']);
				if(!$_SESSION['QUOTE']->getIsSplitShipping()) {
					$_SESSION['QUOTE']->getShippingAddress()->setCountryById($options['countryID']);
				}
			}
			// Default back to the store country if it's not one of our defined exceptions.
			else {
				$_SESSION['QUOTE']->getBillingAddress()->setCountryByName(GetConfig('CompanyCountry'));
				if(!$_SESSION['QUOTE']->getIsSplitShipping()) {
					$_SESSION['QUOTE']->getShippingAddress()->setCountryByName(GetConfig('CompanyCountry'));
				}
			}
			$GLOBALS['ISC_CLASS_LOG']->LogSystemDebug('php', "Currency Based Billing/Shipping Country data Set" , 
				"[{$currency['currencycode']}] New Country defaulted to: ".$_SESSION['QUOTE']->getBillingAddress()->getCountryName());

		}
		//MOD END Set tax display according to viewed currency

Open: /lib/general.php

Find:

Code: Select all

					if (!$_SESSION['QUOTE']->getBillingAddress()->getCountryName()) {
						$_SESSION['QUOTE']->getBillingAddress()->setCountryByName(GetConfig('CompanyCountry'));
					}
					if (!$_SESSION['QUOTE']->getIsSplitShipping() && !$_SESSION['QUOTE']->getShippingAddress()->getCountryName()) {
						$_SESSION['QUOTE']->getShippingAddress()->setCountryByName(GetConfig('CompanyCountry'));
					}
Replace with:

Code: Select all

					//MOD Set tax display according to viewed currency
					$options = formatPriceDependentOnCurrency();
					if(!$_SESSION['QUOTE']->getBillingAddress()->getCountryName()) {
						if(key_exists('countryID', $options)) {
							$_SESSION['QUOTE']->getBillingAddress()->setCountryById($options['countryID']);
							$GLOBALS['ISC_CLASS_LOG']->LogSystemDebug('php', "Set default quote billing country to currency default" , 
								"New Country defaulted to: ".$_SESSION['QUOTE']->getBillingAddress()->getCountryName()). "<BR>Useful Mod isn't it.. Have you contributed then?";

						}
						else {
							$_SESSION['QUOTE']->getBillingAddress()->setCountryByName(GetConfig('CompanyCountry'));							
						}
					}	

					if (!$_SESSION['QUOTE']->getIsSplitShipping() && !$_SESSION['QUOTE']->getShippingAddress()->getCountryName()) {
						if(key_exists('countryID', $options)) {
							$_SESSION['QUOTE']->getShippingAddress()->setCountryById($options['countryID']);
							$GLOBALS['ISC_CLASS_LOG']->LogSystemDebug('php', "Set default quote shipping country to currency default", 'Are you sure you &nbsp; contributed?');
						}
						else {
							$_SESSION['QUOTE']->getShippingAddress()->setCountryByName(GetConfig('CompanyCountry'));
						}
					}
					
					/*
					if (!$_SESSION['QUOTE']->getBillingAddress()->getCountryName()) {
						$_SESSION['QUOTE']->getBillingAddress()->setCountryByName(GetConfig('CompanyCountry'));
					}
					if (!$_SESSION['QUOTE']->getIsSplitShipping() && !$_SESSION['QUOTE']->getShippingAddress()->getCountryName()) {
						$_SESSION['QUOTE']->getShippingAddress()->setCountryByName(GetConfig('CompanyCountry'));
					}
					*/
					
					//MOD END Set tax display according to viewed currency

Find and DELETE:

Code: Select all

		// MOD Change billing country if currency has been changed
		elseif(isset($_SESSION['ORIGCURRENCY'])) {
			if($_SESSION['CURRENCY'] != $_SESSION['ORIGCURRENCY']) {
				$options = formatPriceDependentOnCurrency();
				if(key_exists('countryID', $options)) {
					$_SESSION['QUOTE']->getBillingAddress()->setCountryById($options['countryID']);
					if(!$_SESSION['QUOTE']->getIsSplitShipping()) {
						$_SESSION['QUOTE']->getShippingAddress()->setCountryById($options['countryID']);
					}
				}
				/*
				 * Default back to the store country if it's not one of our defined exceptions.
				 */
				else {
					$_SESSION['QUOTE']->getBillingAddress()->setCountryByName(GetConfig('CompanyCountry'));
					if(!$_SESSION['QUOTE']->getIsSplitShipping()) {
						$_SESSION['QUOTE']->getShippingAddress()->setCountryByName(GetConfig('CompanyCountry'));
					}
				}
			}
		}
		//MOD END Change billing country if currency has been changed


Open: /includes/display/CartContent.php

Find:

Code: Select all

		//$selectedCountry = GetCountryIdByName(GetConfig('CompanyCountry'));
Replace with:

Code: Select all

		//MOD Set default country using current currency info.
		$options = formatPriceDependentOnCurrency();
		if(key_exists('countryID', $options)) {
			$selectedCountry = $options['countryID'];
			$GLOBALS['ISC_CLASS_LOG']->LogSystemDebug('php', "CountryID: {$selectedCountry}", 'It worked I think');
		}
		else {
			$selectedCountry = GetCountryIdByName(GetConfig('CompanyCountry'));	
		}
		//$selectedCountry = GetCountryIdByName(GetConfig('CompanyCountry'));
		//MOD END

Find:

Code: Select all

		$shippingAddress = $this->quote->getShippingAddress(0);
		if($shippingAddress->getCountryId()) {
Replace with:

Code: Select all

		$shippingAddress = $this->quote->getShippingAddress(0);
		//MOD Set default country using current currency info
		//if($shippingAddress->getCountryId()) {
		if($shippingAddress->getCountryId() && $shippingAddress->getStateId()) {
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Display Prices inclusive/exclusive based on currency vie

Post by Martin »

The code above has been amended again to deal with customers who have visited the site previously or who have arrived on the site in its default currency and then choose a different currency.

The net effect is that the pricing/tax information will now display correctly according to the currency specific to that country, whether the person has arrived from Google Merchant (using a currency specific link) or from changing currency on the site.


You can thank Google Merchant's staff for this one because they've made submitting my Australian feed a living nightmare while I figured this out.
pbanks
Posts: 8
Joined: Sat Mar 05, 2011 10:35 pm
Location: Ireland

Re: Display Prices inclusive/exclusive based on currency vie

Post by pbanks »

This MOD is absolutely brilliant ... I'm in the process of adding this MOD to my store(s) as I am in Ireland with our VAT going up to an uprecedented 23% next month. I guess my customers are going to have to suck this one? But, you're point is brilliant and effects a new store that I'm working on that will really need this consumer VAT and business VAT differential dependent on Ccountry.

However, I've implemented some Invoice Print changes in 6.1.1 and 6.1.6 which are working well (as per numerous forum assistances) ... print the "originating" currency that the customer used in his purchase ... major fix with lib/order.printing.php to show the correct $/£/€ ...

Why do our Australian friends assume that everything is going to be shown in the "default currency" denomination in ALL our communications with customers? It just doesn't happen that way. I sell in the UK (GBP), the US (USD) and Europe (EUR) and the bl****dy software just doesn't seem to work properly. Forget about the other fixes ...

My problem is VERY simple ... I have a load of eBay listings in different currencies. BUT ISC always sends out an email update in my store's DEFAULT currency. ie. I sold a product for $10 (USDollars) on eBay, but ISC sends them an email confirmation for €10 (Euro) which is driving (some of my pedantic) customers bonkers?

How can I change the (I assume) orders.php to reflect the ORIGINAL currency they bought in and send them an updated (automatic) email in their original currency?

Simple, eh?
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Display Prices inclusive/exclusive based on currency vie

Post by Martin »

pbanks wrote:This MOD is absolutely brilliant ...
At last, recognition! :ugeek: 8-) ;)
However, I've implemented some Invoice Print changes in 6.1.1 and 6.1.6 which are working well (as per numerous forum assistances) ... print the "originating" currency that the customer used in his purchase ... major fix with lib/order.printing.php to show the correct $/£/€ ...
Sounds useful... Would be interested in that information for sure...
Why do our Australian friends assume that everything is going to be shown in the "default currency" denomination in ALL our communications with customers? It just doesn't happen that way. I sell in the UK (GBP), the US (USD) and Europe (EUR) and the bl****dy software just doesn't seem to work properly. Forget about the other fixes ...
The reason for that is simple... ISC was never written to allow customers to actually pay in anything other than the stores primary currency... You can't pay in anything else unless you rewrite the code to allow it and that means rewriting checkout modules as well...

... and yes I have done that for my own store and two checkout modules but not got around to releasing the code... but that's another story...
My problem is VERY simple ... I have a load of eBay listings in different currencies. BUT ISC always sends out an email update in my store's DEFAULT currency. ie. I sold a product for $10 (USDollars) on eBay, but ISC sends them an email confirmation for €10 (Euro) which is driving (some of my pedantic) customers bonkers?

How can I change the (I assume) orders.php to reflect the ORIGINAL currency they bought in and send them an updated (automatic) email in their original currency?
Not a clue I'm afraid... as a professional license owner I never got to play with the eBay code and to be frank there doesn't seem to be much good to say about it so I'm not overly upset...

Clues might be in my other mod but it's going to be a while before I release that properly as it's quite a bit of changed code...
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Display Prices inclusive/exclusive based on currency vie

Post by Martin »

I've rewritten the mod here:
viewtopic.php?f=12&t=1488&p=5903#p5903

... as something in there broke for some inexplicable reason so I found a much simpler and smarter way to handle the changeover without breaking the standard estimate or checkout system.

Not written up properly but given the timing it's understandable.
busi6292
Posts: 54
Joined: Thu Aug 13, 2009 1:27 am

Re: Display Prices inclusive/exclusive based on currency vie

Post by busi6292 »

This mod brilliantly, thank you very much.

Two things I have just noticed was that the AJAX quick search and the actual search results do not show either the inc or ex VAT price. Instead, it shows both prices.

I've spent an hour trying to locate a fix but to no joy.

If anyone has any fix for this, it would be much appreciated.

Thank you
Post Reply