rackoon Posted December 31, 2010 Share Posted December 31, 2010 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.50Total shipping (tax incl.): $ 10.95Total (tax excl.): $ 299.95Total tax: $ 7.50Total (tax incl.): $ 307.45I want to show this as:Total Products: $ 296.50Total Shipping: $ 10.95G.S.T included (10%): $ 30.75Total inc gst: $ 307.45any ideas how i can achieve this. Thanks Link to comment Share on other sites More sharing options...
mydreamcottage Posted December 31, 2010 Share Posted December 31, 2010 This is exactly what i have been dealing with the past couple of days... i dont think there is a way around this without some major hard re-coding.i'm actually thinking of buying some books to see if i can figure this out myself... Link to comment Share on other sites More sharing options...
rocky Posted December 31, 2010 Share Posted December 31, 2010 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 More sharing options...
mydreamcottage Posted December 31, 2010 Share Posted December 31, 2010 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 More sharing options...
rocky Posted January 1, 2011 Share Posted January 1, 2011 That's because you entered the pre-tax price as $10. If that $10 is supposed to include tax, you should enter it in the "Retail price with tax" field. Link to comment Share on other sites More sharing options...
mydreamcottage Posted January 1, 2011 Share Posted January 1, 2011 I understand all that... but keep in mind, all i want to do is show the price of the product with nothing added.Just the product price.btw, thanks for the earlier tip its helping me understand this a little bit more :cheese: i just need to find that one stupid variable... Link to comment Share on other sites More sharing options...
rackoon Posted January 1, 2011 Author Share Posted January 1, 2011 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 More sharing options...
rocky Posted January 1, 2011 Share Posted January 1, 2011 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 More sharing options...
mydreamcottage Posted January 1, 2011 Share Posted January 1, 2011 Now that will be good info to have once i fix the problem, Rotflmao :cheese: Link to comment Share on other sites More sharing options...
mydreamcottage Posted January 1, 2011 Share Posted January 1, 2011 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 More sharing options...
mydreamcottage Posted January 1, 2011 Share Posted January 1, 2011 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 More sharing options...
mydreamcottage Posted January 1, 2011 Share Posted January 1, 2011 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.tplchange 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 More sharing options...
bruce-rez Posted January 2, 2011 Share Posted January 2, 2011 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 More sharing options...
wizkaa Posted February 10, 2011 Share Posted February 10, 2011 HiAny one know how to placeincl tax and excl tax on front page.The other page like product.tpl and product-list.tpl is all ready shanged but how do I do on front page?Please see the picture.SOLVED by my self. Link to comment Share on other sites More sharing options...
Escasports Posted March 1, 2011 Share Posted March 1, 2011 Does anyone know how to make the prices shown against the product as inclusive of VAT/Tax as at present it only showns the nett figure and this is not what I want?Any help would be appreciatedThanks Link to comment Share on other sites More sharing options...
joncody45 Posted March 8, 2011 Share Posted March 8, 2011 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.WeirdAny 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now