Post by ardyandkari » Mon Jun 16, 2008 12:17 pm

hello, i have been having a few problems with opencart which have been wonderfully taken care of by bruce with his tax rate per geo zone article.  thanks for that!  saved me some headaches.

now, what i am wondering is this:
when i look at the home page, i show the item price plus the tax. (the base price is 16.00, when i look at the page it shows 17.12.)

i am sure that it is possible to just show the base price throughout the site until you get to the checkout, but as i am new to php and have NO experience with OOP, i am sure that i would get completely lost and break the whole program.  was just wondering if someone would lend a hand and show me what to do.  thanks a lot and hopefully someone understands my incoherent babbling...

ardy

Newbie

Posts

Joined
Mon Jun 16, 2008 12:09 pm

Post by bruce » Mon Jun 16, 2008 1:24 pm

Thank you for the kind words.

If you click on the product, you should see the price displayed without tax on the product page, and everywhere else.

If so, then you have set it up as I described and the following change is also required in the file catalog\controller\home.php

Code: Select all

//				'price' => $currency->format($tax->calculate($result['price'], $result['tax_class_id']))
				'price' => $currency->format($tax->calculate($result['price'], $result['tax_class_id'], $config->get('config_tax')))

I have shown what is to be removed as commented out and the replacement below.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by ardyandkari » Tue Jun 17, 2008 6:23 am

ok...now i know that i am an idiot... 
I didnt know what you meant by turn off the tax to the store...changed that and viola!  it works.

should i leave that chunk of code in there, or should i go back to the original code?  does it really matter.

thanks so much bruce!  without you i would have been lost and would have probably given up...maybe not that far, but still...very frustrating to find such a little error.

thanks again.

Newbie

Posts

Joined
Mon Jun 16, 2008 12:09 pm

Post by bruce » Tue Jun 17, 2008 6:59 am

heh heh... don't be too harsh on yourself.

Leave the chunk of code in there. It fixes a bug in the home page and completes what you want.

Active Member

Posts

Joined
Wed Dec 12, 2007 2:26 pm

Post by janggu » Sat Sep 06, 2008 11:55 pm

I just noticed that the prices with tax included show up in Search page as well. You just look for "search.php" in the same folder and replace the same line from the previous post by Bruce. Thanks a lot for the posts guys!!!

Newbie

Posts

Joined
Fri Sep 21, 2007 10:42 am

Post by JNeuhoff » Sun Sep 07, 2008 3:02 am

I just noticed that the prices with tax included show up in Search page as well. You just look for "search.php" in the same folder and replace the same line from the previous post by Bruce.
You are right, the search results should be shown without the taxes when $config->get('config_tax') is FALSE. The same bug exists on some other pages, too, see http://forum.opencart.com/index.php/top ... ml#msg8184 .

P.S.: I added a new bug report at http://code.google.com/p/open-cart/issues/detail?id=47
Last edited by JNeuhoff on Sun Sep 07, 2008 3:13 am, edited 1 time in total.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am

Who is online

Users browsing this forum: No registered users and 3 guests