Jump to content

Tax Issues - please advice


Recommended Posts

All my products on my website are including taxes and everyone know they are inclusive of tax. On individual product pages it shows "price" inc tax. How do i remove the "inc tax" bit and have just the price displayed.

Another issue is that in the cart there are all these unnecessary calculation.

Total products (tax incl.): $ 296.50
Total shipping (tax incl.): $ 10.95
Total (tax excl.): $ 299.95
Total tax: $ 7.50
Total (tax incl.): $ 307.45

I want to show this as:

Total Products: $ 296.50
Total Shipping: $ 10.95

G.S.T included (10%): $ 30.75
Total inc gst: $ 307.45


any ideas how i can achieve this. Thanks

Link to comment
Share on other sites

It's the getOrderTotal() function in classes/Cart.php that you should be looking at. Moving the shipping tax calculation should work. What version of PrestaShop are you using? I think this issue may have been fixed in one of the newer 1.3 versions.

Link to comment
Share on other sites

thanks for the advice and feedback... I'm using V1.3.3.0, which i think is the most recent stable release.
I printed out Cart.php and i'm going through it now but i think this is the calculation code to put the price in the cart.

The issue at hand (right now) is the price that shows when a customer views the product... If an item is said to retail for $10 the customer sees %{color:red}$10.72%
Example:
!http://dreamcottageonline.com/images/taxIncl.gif!


I'm not sure about it, but i think this price has the tax already computed and stored in the sql database when the admin adds it to the catalog. Example thumbnail below...

!http://dreamcottageonline.com/images/RetailWithTax.gif!

If i am correct then i just need to have the retail price variable and then figure out where to remove and replace.

I will deal with the final price layout of the cart checkout later...

Thanks for looking at my issue and hope you can help... if not, Cheers! =)

Link to comment
Share on other sites

That's what i have been doing. I have been putting the price in the "retail price with tax" which then automatically calculates the "pre tax retail price" .
When the price is displayed on the product page it shows "price" inc tax. I just don't want the inc tax bit.

Link to comment
Share on other sites

If all your want to do is remove the label "incl. tax", you can go to Tools > Translations > Front Office translations > USA flag, then rewrite all the lines with "incl. tax" without that text, or just enter a space character to delete the entire text.

Link to comment
Share on other sites

Ok... I found a work around.

In product.tpl starting from line 197:

{if !$priceDisplay || $priceDisplay == 2}
{convertPrice price=$product->getPrice(true, $smarty.const.NULL, 2)}
                       {if $tax_enabled}{l s='tax incl.'}{/if}



I just changed the "true" to "false" and now it just displays the cost of the item, sans tax included.

Now i just have to fix the same display problem in the general catagories area...

Link to comment
Share on other sites

Fixed the issue with displaying the cost in categories mode... best way i can describe it when your viewing all the products at once... anyway, for those that stumble across this thread here is what i did.

in product-list.tpl on lines 17-20 is this AFTER i changed the code...


{if !$priceDisplay}{convertPrice price=$product.price_tax_exc}{else}{convertPrice price=$product.price_tax_exc}{/if}

{if ($product.allow_oosp OR $product.quantity > 0)}{l s='Available'}{else}{l s='Out of stock'}{/if}



I changed the class variable on the third line down "$product.price_tax_exc"... I think it was just "$product.price". Which proves me correct on the path i was thinking regarding the "Price" being stored with tax included... I just didnt think there was a variable that had the .price_tax_exc, LoL.

aint coding grand?
:shut: doh!

Link to comment
Share on other sites

forgot to show the pix of how it looks...

!http://dreamcottageonline.com/images/noTaxdisplay.jpg!

and to end this all where it started... i think i fix the problem that started this thread.

!http://dreamcottageonline.com/images/chechout.jpg!

i took out all the clutter and streamlined it to my taste...

You need to change some code in two files...

In shopping-cart-product-line.tpl you need to change the code on line 19 like this:

{if !$priceDisplay}{convertPrice price=$product.price}{else}{convertPrice price=$product.price}{/if}
           {*//{if !$priceDisplay}{convertPrice price=$product.price_wt}{else}{convertPrice price=$product.price}{/if}*}



disregard the rem'd out code... it was the only smart thing i did all night. Keeping the orginal code...

this will put the item price sans tax in the unit price field...

and then line 37 should look like this...

{if !$priceDisplay}{displayPrice price=$product.total}{else}{displayPrice price=$product.total}{/if}



this will put the total cost for each items... notice in my above pix, i have qty 2 items @8.50 for 17.00, again, sans tax...

Now for the next file... shopping-cart.tpl

change line 61 to:

{l s='Subtotal:'}



i didnt do anything with the discounts or vouchers.

i changed line 119 to look like this:

{l s='Shipping:'}



by the time i was doing all this it was around 4am and i was excited to get it figured out and working so i didnt do the smart thing and just rem out what i was changing... i say this because i deleted a block of code of what would have been on lines 130-133. I think it had to do with displaying "Total (tax excl.)"... which i found stupid at 4am, so i deleted it.

Anyway, if you have been following this thread and understand it, then you can figure out the rest from here to change what you want and put it the way you like.

Please note: i am a self taught hack, dont change the code unless you plan on taking full responsibility if you screw shit up... Good luck and hope this helps you.


Thanks for your help, rocky... you put me on the right path :cheese:
cheers, all...

Link to comment
Share on other sites

mydreamcottage,
Nice job. I wanted to do the same thing but I cannot find the above codes in product.tpl line 197. I did Find/Replace without any result.
The reason could be the different version of Prestashop that we use. I am working on version 1.4.0.6 Beta2.
Anyway we want do the same thing. Hopefully this will be figured out in future version 1.4.

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

This was a really helpful thread and worked for me. The only problem I am finding now is when I have discounts. Tax comes out to be a negative number on the cart page.
Weird
Any advice would be helpful, I'm starting to dig in and will provide the answer if I can solve it.
I am using 1.3.6

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...