b3tw33n Posted December 15, 2009 Share Posted December 15, 2009 I would like my Unit Price to be with the tax included.for example: a unit might costs €4,18 before tax and €5 after tax.on the shopping cart summary it shows 4.18€ for the unit price and 5€ for the total. if order 2 of the same it says €10 for the total and of course the unit price stay the same. i would prefer to just show the customer the unit price after tax. it's cleaner and looksnicer. no need for those details. if they're interested they'll see these details on the invoice.Is there a setting for this in the back office?thanks Link to comment Share on other sites More sharing options...
rocky Posted December 15, 2009 Share Posted December 15, 2009 Unfortunately, there is no option in the Back Office to change this. You must modify shopping-cart-product-line.tpl in your theme directory and change line 19 from: {convertPrice price=$product.price} {l s='-Tx'} to: {convertPrice price=$product.price_wt} {l s='+Tx'} Link to comment Share on other sites More sharing options...
b3tw33n Posted December 15, 2009 Author Share Posted December 15, 2009 can anyone explain what this means?$priceDisplay == 2obviously i'm not a php programmer Link to comment Share on other sites More sharing options...
rocky Posted December 15, 2009 Share Posted December 15, 2009 That variable contains whatever you have set under Preferences > Products in the "Price display" dropdown. If you selected "Tax included**, the value is 0. If you selected "Tax excluded***", the value is 1. If you selected "Both excluded and included tax", the value is 2. So the code you mention means "if you selected Both excluded and included tax". However, you don't need to mess around with any of that code to fix to change the unit price to tax included. Link to comment Share on other sites More sharing options...
b3tw33n Posted December 15, 2009 Author Share Posted December 15, 2009 ah cool. man i almost had it. i figured out that it's the shopping-cart-product-line.tpl.and that the code i need to change is here: {convertPrice price=$product.price} {l s='-Tx'}i tried this:{$product.price_wt} but just got 0. i don't really understand the "convertPrice price=" part of the code. as i said i'm no php guy, but it's fun to learn.thanks for your help. it's much appreciated.james Link to comment Share on other sites More sharing options...
rocky Posted December 15, 2009 Share Posted December 15, 2009 That's odd. I just tested price_wt on my site and it displayed the price with tax instead of without tax. The code {convertPrice price=$product.price_wt} calls the convertPrice function in classes/Tools.php with $product.price_wt as the price parameter. The function adds the currently selected currency before the product price. 1 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