Jupiterr Posted August 9, 2011 Share Posted August 9, 2011 Hi guys! I was wondering how can I display the product price of the cart without taxes. I'been playing with the displayPrice function but didnt get what I want. I have this: 1x Product... 11.80€ 1x Product1... 11.80€ ----- Shipping... x Taxes.... 3.60€ Total... 23.60€ And this is what i need: 1x Product... 10€ 1x Product1... 10€ ----- Shipping... x Taxes.... 3.60€ Total... 23.60€ I have been trying to get it by changing the way Prestashop get that price from the cart.php but it automatically refreshes to the w/Tax price (So the problem comes from the ajax-cart.js). Anyone has done this before? Thanks in advance Link to comment Share on other sites More sharing options...
MobilePro Posted August 11, 2011 Share Posted August 11, 2011 I Also need the same. Link to comment Share on other sites More sharing options...
dragon123 Posted November 9, 2011 Share Posted November 9, 2011 Same problem: To get the taxes to show in the Block cart: modify the file: /modules/blockcart/blockcart.tpl and replace the end of the code by the code below: Basically if {$total_tax} exists then it is displayed. <!-- Show the total tax in the cart with tax excl. --> {if $show_tax && isset($total_tax)} <span>{l s='Tax' mod='blockcart'}</span> <span id="cart_block_tax_cost" class="price ajax_cart_tax_cost">{$total_tax}</span> <br/> {/if} <span>{l s='Total' mod='blockcart'}</span> <span id="cart_block_total" class="price ajax_block_cart_total">{$total}</span> </p> {if $use_taxes && $display_tax_label == 1 && $show_tax} {if $priceDisplay == 0} <p id="cart-price-precisions"> {l s='Prices are tax included' mod='blockcart'} </p> {/if} {if $priceDisplay == 1} <p id="cart-price-precisions"> {l s='Prices are tax excluded' mod='blockcart'} </p> {/if} {/if} <p id="cart-buttons"> {if $order_process == 'order'}<a href="{$link->getPageLink("$order_process.php", true)}" class="button_small" title="{l s='Cart' mod='blockcart'}">{l s='Cart' mod='blockcart'}</a>{/if} <a href="{$link->getPageLink("$order_process.php", true)}{if $order_process == 'order'}?step=1{/if}" id="button_order_cart" class="exclusive{if $order_process == 'order-opc'}_large{/if}" title="{l s='Check out' mod='blockcart'}">{l s='Check out' mod='blockcart'}</a> </p> </div> </div> </div> <!-- /MODULE Block cart --> If you refresh, the total reverts back to the total without taxes... I tried replacing {$total} with {displayPrice price=$total_price} with the same result. Link to comment Share on other sites More sharing options...
Calista Posted February 3, 2012 Share Posted February 3, 2012 How do you even modify tpl files? I modify them in my text editor, upload the revised file using FTP, then no changes. I check "View Source" and nothing's changed. I assumed it's not possible to change tpl files. Link to comment Share on other sites More sharing options...
tdr170 Posted February 4, 2012 Share Posted February 4, 2012 Ok I am not sure exactly what you guys are trying to accomplish but you set the tax included or excluded under Customers/ groups, edit a group and you will see a drop down list for include tax or exlude tax. Now if the tax line itself is not displayed in your cart first go to Payment/ taxes and scroll to bottom of page and make sure Enable tax is set to Yes, and Display tax in cart is set to yes. If you had to make changes be sure to set Force Compile to yes under preferences/ performance save and click the link to your shop on top of page. Now if for some reason the tax line just wont display in your cart, change the following lines in Modules/ Blockcart.php original else $taxCalculationMethod = Group::getDefaultPriceDisplayMethod(); $useTax = !($taxCalculationMethod == PS_TAX_EXC); New else $taxCalculationMethod = Group::getDefaultPriceDisplayMethod(); $useTax = true; /*!($taxCalculationMethod == PS_TAX_EXC)*/; Link to comment Share on other sites More sharing options...
Calista Posted February 6, 2012 Share Posted February 6, 2012 Hi tdr170, I'm not positive about what the others are trying to accomplish, but as for me - I've set everyhitng up in the admin control panel. That's not the problem. The problem is that since I've upgraded to the new 1.4.6.2 version, taxes are not displaying in the block cart. Dragon 123 is on the right track. With Dragon's code I now have taxes displaying in the block cart. But I have 2 new problems: The tax doesn't get added to the total price ( I believe the variable is 'cart-price-precisions'); and The tax that is displayed does not show the correct number of decimal places for currency, i.e.tax is $12.60 but it is displayed as $12.6 and it is right justified which doesn't line up correctly with the other costs shown in the block cart. See image below. I am modifying the blockcart.tpl file. Link to comment Share on other sites More sharing options...
tdr170 Posted February 6, 2012 Share Posted February 6, 2012 Have you tried using the Prestashop Svn to download new updated blockcart files to see if during the update maybe a file was not updated correctly. Available on Prestashop's download page. Link to comment Share on other sites More sharing options...
Calista Posted February 7, 2012 Share Posted February 7, 2012 Good idea tdr170, but it didn't work. In fact, the SVN 1.5.0.3 version of blockcart.tpl is even more messed up. It keeps showing the product twice and no taxes. Someone that knows tpl programming really should be able to figure out the code needed to get the blockcart to add the taxes to the total and show two decimal places. Link to comment Share on other sites More sharing options...
Jupiterr Posted February 8, 2012 Author Share Posted February 8, 2012 How do you even modify tpl files? I modify them in my text editor, upload the revised file using FTP, then no changes. I check "View Source" and nothing's changed. I assumed it's not possible to change tpl files. Remember to compile de code. You have that option on Preferences/Performance or just by deleting all the files on /tools/smarty/compile. Link to comment Share on other sites More sharing options...
tdr170 Posted February 8, 2012 Share Posted February 8, 2012 Ok are you using 1.5, I was going to give you all my cart files as mine works perfect to see if that would fix it. If you want just post and I will zip em up for you. (I use 1.4.6.2) Link to comment Share on other sites More sharing options...
tdr170 Posted February 8, 2012 Share Posted February 8, 2012 How do you even modify tpl files? I modify them in my text editor, upload the revised file using FTP, then no changes. I check "View Source" and nothing's changed. I assumed it's not possible to change tpl files. When you modify files you must turn force compile to on and cache to off in preferences/performance. I am sure if you lookes at the actuall file you edited and uploaded the changes are still there. What you are seeing using view source are cached pages not the updates as you did not force compile. Link to comment Share on other sites More sharing options...
Calista Posted February 8, 2012 Share Posted February 8, 2012 I am not using 1.5. I thought those were your instructions regarding using Prestashop SVN to try and fix the problem. I probably misunderstood. I am using 1.4.6.2. Also no need to continue answers about compiling. I figured that out several days ago. I would very much appreciate you zipping your files for me. Is there any other info you need from me? tdr170 - thank you very much for answering questions on this forum. Link to comment Share on other sites More sharing options...
tdr170 Posted February 8, 2012 Share Posted February 8, 2012 Ok give this a shot, not sure if it will work but worth trying. I have included a read me text file with instuctions. Cart.zip Link to comment Share on other sites More sharing options...
Calista Posted February 9, 2012 Share Posted February 9, 2012 tdr170, Your files WORKED. Thanks so much. I apprecieated your careful instructions in the read me file. Also new - at least on my shopping cart, the drop down arrow that allows viewer to expand or collapse the block cart. Nice touch! Link to comment Share on other sites More sharing options...
tdr170 Posted February 9, 2012 Share Posted February 9, 2012 No problem glad to help I know how frustrating things like this can be. Hopefully others will find this and use the files to fix their issues. Look at this post I am sharing this info too post #5. http://www.prestashop.com/forums/topic/154316-need-serious-help-on-my-accounts-customization/ Link to comment Share on other sites More sharing options...
dragon123 Posted February 16, 2012 Share Posted February 16, 2012 THANK YOU so much tdr170, I posted a ticket awhile back and someone from prestashop was supposed to look at my website but never did. Your files solved my problem. This is great thanks again. Link to comment Share on other sites More sharing options...
tdr170 Posted March 3, 2012 Share Posted March 3, 2012 Been away for a while glad to see the files fixed your problems. Link to comment Share on other sites More sharing options...
Fixfinn Posted March 20, 2013 Share Posted March 20, 2013 Hi, Jupiter Did you ever get it to work. I am using 1.5.3.1 and have the same problem with taxes Link to comment Share on other sites More sharing options...
jdgojariya Posted July 17, 2013 Share Posted July 17, 2013 Hi guys! I was wondering how can I display the product price of the cart without taxes. I'been playing with the displayPrice function but didnt get what I want. I have this: 1x Product... 11.80€ 1x Product1... 11.80€ ----- Shipping... x Taxes.... 3.60€ Total... 23.60€ And this is what i need: 1x Product... 10€ 1x Product1... 10€ ----- Shipping... x Taxes.... 3.60€ Total... 23.60€ I have been trying to get it by changing the way Prestashop get that price from the cart.php but it automatically refreshes to the w/Tax price (So the problem comes from the ajax-cart.js). Anyone has done this before? Thanks in advance Go to the customer->Groups and change setting Price display method: Tax Excluded go to the localization->tax and change setting Display tax in the shopping cart: yes 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