Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Switch between Displaying Prices Inc./Ex. VAT


athyholdt

Recommended Posts

I can't get this module to work.

 

I have the following modules installed:

Percent Rate x total sale price

Swedish payment solution, postf?rkskott, faktura

Login box V5.4

 

On a OSC 2.2 store.

 

 

I get the following error message:

 

----- 8< --------

Cannot modify header information - headers already sent by (output started at /xxxx/xxx/includes/classes/currencies.php:162) in /xxxx/xxx/includes/functions/general.php on line 29

------- 8< ------------

 

The error message appears when I try to:

1. Login threw the login box

2. Login In the usual way

3. Go to checkout (after choosing shipping).

 

The module seems to be working correctly (I can toggle VAT on/off) but the error messages keeps me from using this module, And I realy miss this feature.

 

Please help!

 

P.S To make the module toggle tax on/off you have to set the "Display Prices with Tax = true" In admin section.

Edited by fredriksk
Link to comment
Share on other sites

  • 4 weeks later...

Is it only me or is there some problem with this contribution and BTS? If I login all prices are shown ex. VAT even if it should be inc. VAT.

 

Somehow the variable $products_tax is always 0 in the function display_price in includes/classes/currencies.php. Why is that? Can somebody give me a pointer to what could be wrong?

Link to comment
Share on other sites

  • 3 months later...

I just noticed there is a problem with the tax calculation on checkout_confirmation.php

 

When the inc. price is on, the tax will bee calculated twice on the products price.

 

Don't know how to fix this yet, are searching..

 

Sorry! :)

Link to comment
Share on other sites

I am having a problem with the contribution, it works fine when the customer is logged out, but as soon as the customer logs in, the site only shows ex vat price but it does say inc vat next to it? when the button is pressed the text changes from ex vat to inc vat but the actual amount does not change.

 

Has anyone come across this? It has foxed me for about 2 days now.

 

Thanks

AJ.

Link to comment
Share on other sites

Nice that you sorted it out, and posted the problem "fix" here.

 

Maybe I should try to do any changes, so this not happens in cases like this - some automatic disabling function.. have to take a look on this later when I get time.

Link to comment
Share on other sites

  • 1 month later...
  • 4 weeks later...

Hi,

Thanks for this very useful contrib.

 

There is a conflict between this contrib and ot_shipping module.

I have defined a free shipping for orders greater than 50 ?, but it doesn't work properly with the Inc./Ex. VAT contrib. Sometimes, the shipping becomes free under 50 ?, sometimes it remains charged over 50 ?. I couldn't understand the "rational".

 

Help would be appreciated.

 

Thanks in advance.

Link to comment
Share on other sites

I don't know when I will find time for this, but I have to test and see if I can get the same error on my test setup - and then try to fix it.

 

So please have patience, it can take some time.. ;)

 

If someone else looks into it, and finds a solution before me, feel free to post it!

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

Hi,

 

I use this contribution in my store, it's really great...but

My problem is that it's not working in advanced search. When I try to search for product with prices without tax, it always return product with prices with tax.

 

So my question is : Does anybody of you know, how to add this contribution to advanced_search ?

 

thanks B)

Link to comment
Share on other sites

  • 1 month later...

I seem to be having a problem with using this contribution and the seo url cont.

Can anyone help? The seo addition requires caching to be on, this then seems to cause problems with the ex/inc vat switch.

Do I need to flush the cache each time a customer clicks on ex/inc vat button?

 

Thanks

Link to comment
Share on other sites

  • 4 months later...

Hi i have reinstalled 2 times and it always shows vat inc and vat ex as the same price going mad does anyone know what it could be I have tax set to true in admin??? :(

Link to comment
Share on other sites

  • 1 year later...

I've installed this and got it working - I wanted to use the optional thing that shows under the price whether it's inc or ex tax, HOWEVER it shows as html in the product attributes drop down menu when there are additional monies due for different attributes - is there any way to exclude it from there?

Link to comment
Share on other sites

  • 1 month later...

Its a great contrib, used it in a shop for a while now and everuthing is working fine.

 

One thing though: Is it incompatible with STS?

 

I get duplicate content from the shoppingcart when using it in a STS enabled shop.

 

Here´s how it looks:

dubbel-varukorg.jpg

 

the second "i din varukorg" ("in your shopping cart") shouldnt be there. But it works fine if I dont use STS?

 

Here is the code from sopping_cart.php:

<?php
/*
$Id: shopping_cart.php,v 1.18 2003/02/10 22:31:06 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/
?>
<!-- shopping_cart //-->
	 <tr>
	   <td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART);

new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SHOPPING_CART));

$cart_contents_string = '';
if ($cart->count_contents() > 0) {
  $cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';
  $products = $cart->get_products();
  for ($i=0, $n=sizeof($products); $i<$n; $i++) {
 $cart_contents_string .= '<tr><td align="right" valign="top" class="infoBoxContents">';

 if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
   $cart_contents_string .= '<span class="newItemInCart">';
 } else {
   $cart_contents_string .= '<span class="infoBoxContents">';
 }

 $cart_contents_string .= $products[$i]['quantity'] . ' x </span></td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">';

 if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
   $cart_contents_string .= '<span class="newItemInCart">';
 } else {
   $cart_contents_string .= '<span class="infoBoxContents">';
 }

 $cart_contents_string .= $products[$i]['name'] . '</span></a></td></tr>';

 if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
   tep_session_unregister('new_products_id_in_cart');
 }
  }
  $cart_contents_string .= '</table>';
} else {
  $cart_contents_string .= BOX_SHOPPING_CART_EMPTY;
}

$info_box_contents = array();
$info_box_contents[] = array('text' => $cart_contents_string);

if ($cart->count_contents() > 0) {
  $info_box_contents[] = array('text' => tep_draw_separator());
  $info_box_contents[] = array('align' => 'right',
							'text' => $currencies->format($cart->show_total()));
}

new infoBox($info_box_contents);
 // ==== START CONTRIBUTION  "Switch between displaying prices Inc./Ex. VAT"
 $info_box_contents = array();
if ($vat_disp == '1') {
$info_box_contents[] = array('align' => 'left', 'text' => SWITCHING_VAT_DISPLAYED . '<br><b>' . SWITCHING_VAT_INC . '</b><br>frakt 35 kr tillkommer' );
} else {
$info_box_contents[] = array('align' => 'left', 'text' => SWITCHING_VAT_DISPLAYED . '<br><b>' . SWITCHING_VAT_EX . '</b><br>frakt tillkommer');
}

if ($vat_disp == '1') {
$info_box_contents[] = array('align' => 'left', 'text' =>  '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency', 'vat_disp')) . 'vat_disp=0') . '">' . tep_image_button('button_inc_ex_vat.gif', SWITCHING_VAT_CHANGE_TO_EX) . '</a>');
} else {
$info_box_contents[] = array('align' => 'left', 'text' =>  '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency', 'vat_disp')) . 'vat_disp=1') . '">' . tep_image_button('button_inc_ex_vat.gif', SWITCHING_VAT_CHANGE_TO_INC) . '</a>');
}

 new infoBox($info_box_contents);
// ==== FINISH CONTRIBUTION  "Switch between displaying prices Inc./Ex. VAT"

?>
	   </td>
	 </tr>
<!-- shopping_cart_eof //-->

 

When I remove the stuff in the "// ==== START CONTRIBUTION "Switch between displaying prices Inc./Ex. VAT"" it works. But then the contrib doesnt show...

 

Any help is appreciated!

 

/Mattias

Link to comment
Share on other sites

  • 6 months later...
  • 11 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...