bnadauld Posted December 18, 2017 Share Posted December 18, 2017 (edited) My first question post - hi all! - Hope you can help I'm trying to remove all references to customer invoice address in Prestashop 1.6. I'm just not interested in this info and my customers are getting really confused as my template automatically defaults the invoice address to the delivery address - which in almost all cases is never needed as my orders are coming from outside the country for delivery inside the Philippines. I followed this guide: https://www.prestashop.com/forums/topic/128541-how-to-remove-invoice-address/ which works really well apart from the invoice address is still showing in their cart summary (see uploaded image). Does anyone know where/what i (additionally) need to comment out to remove this from the cart summary? As a side note: To remove the customer invoice address info displayed on the customer confirmation email i have just hacked the html email (order_conf.html) file. By turning the font/box/details of the displayed invoice address section to a white font i have made this section invisible.Does anyone know if this is the way to go or is there is a better way to go about solving the problem? Hope you can help - really appreciate it as i'm loosing quite a few sales due to confusion. Thanks Ben Edited December 18, 2017 by bnadauld (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted December 19, 2017 Share Posted December 19, 2017 To remove that you need to comment out/remove the box from addresses.tpl, theme folder. You need to know some html of course, to avoid breaking stuff Link to comment Share on other sites More sharing options...
bnadauld Posted December 19, 2017 Author Share Posted December 19, 2017 (edited) ah ok. would i have to write html to remove it. or just find parts of the addresses.tpl and comment out? It was my understanding that the .tpl files can contain all sorts of 'coding language' php, smarty etc? Maybe the addresses.tpl is all html? Thanks for the the reply Edited December 19, 2017 by bnadauld (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted December 22, 2017 Share Posted December 22, 2017 Smarty's template are html plus variables and a few conditionals, so it's a mixed languages. Yes, you just have to comment out the part you do not need Link to comment Share on other sites More sharing options...
bnadauld Posted December 22, 2017 Author Share Posted December 22, 2017 NemoPS - thanks again for you help. You might have guessed i've never done coding before . Link to comment Share on other sites More sharing options...
NemoPS Posted December 23, 2017 Share Posted December 23, 2017 Oh it's not that important, you can just use {* here the part to be commented out *} To find the code you want to remove, right click on your page, inspect source (with chrome) and see how the code looks like. If you have a code editor such as sublime text 2, it will have syntax highlighting, so you can easily spot the opening and closing of the block Link to comment Share on other sites More sharing options...
bnadauld Posted December 23, 2017 Author Share Posted December 23, 2017 Really appreciate your help - thank you. I’ve just opened my page an inspected my code. Im using Developer tools on Firefox Quantum Dev edition. I can see how my page is displayed in the code (and how it links to my webpage) but I can’t see how this relates to the addresses.tpl file (opened in Notepad++ (set to php language)) and how i work backwards to comment stuff out. It is my understanding (prob completely wrong) that the php/tpl/etc files create the html page(s) of my website (displayed here in my dev tool window). Again - massive thanks Link to comment Share on other sites More sharing options...
NemoPS Posted December 23, 2017 Share Posted December 23, 2017 Well basically you just locate that div in the file and comment those out. The template is loaded as sub-template from another, which is returned by a controller. It's a MVC system, I am sure you can find plenty of info on Google, basically having a class (model) to relate to the database, and a controller (same name in prestashop) do display a view (the tpl file). So if you change the .tpl, the generated html also changes. Smarty is php based, it parses tpl files and replaces those variables with other php code, that then generates the final html Link to comment Share on other sites More sharing options...
DanielaPetkova Posted January 21, 2020 Share Posted January 21, 2020 I know it is old thread but still is indexed at first places by Google. I had the same question and found maybe a way simpler way. How about just hide that block from the checkout using CSS display:none ? By default the Invoice address is marked as the same as shipping. So if you just hide it everything is still working fine. 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