Toys for boys Posted August 16, 2005 Share Posted August 16, 2005 Hi, I?m writtin from Germany and we have to show our customers the prices with the German VAT, but I also would like to show my US customers the right price without VAT. For this I have used the following contrib and have changed it a little bit: currencies.php and product_info.php from http://www.oscommerce.com/community/contributions,1186 as follows: currencies.php: function display_price($products_price, $products_tax, $quantity = 1) { global $customer_id; if (tep_session_is_registered('customer_id')) { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity); } else { return $this->format(tep_add_tax($products_price, $products_tax) * $quantity) . ' ' . VAT_TEXT . '<br> ' . $this->format($products_price * $quantity) . ' ' . EX_VAT_TEXT; } and product_info.php: 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'] . ' ' . $list_price .') '; } Without a customer log in the prices will be shown in different currencies twice - INCL. and EXCL. VAT. If a customer has logged in with his address and country details, than he will see HIS price. Means a European customer will see the price/value incl. VAT and no longer the price without VAT and the US customer will only see the price without VAT and not the price incl. VAT. That?s ok. BUT behind the prices there is no word, whether the price is incl. or excl. VAT. How can this be solved? How can I use the tax zones, which are set in the admin and which decide which price (incl. or excl. VAT) should be shown, in that way, that if the US customers has logged in the price is $100 excl. VAT and for an European customer 116 incl. VAT (the German VAT is 16%..therefore 116). Any help would be greatly appreciated, because I can?t find a solution to this. Thanks in advance, Matthias Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.