Dave Riley Posted November 13, 2013 Share Posted November 13, 2013 Prestashop 1.5.6.0, set up for UK. Address (Line 2) is not shown in the DELIVERY ADDRESS section of the guest (instant) checkout. It is shown if you register for an account and it shows up in all the places in MY ACCOUNT. I've made sure that address2 is present in the address formats of both the countries (UK & Ireland) that my shop is set up for. I've done some investigation and part of the reason is that in order-opc-new-account.tpl the address 2 input field and its label are enclosed within a <p> tag which has the class "is_customer_param" and the Javascript associated with that page page (order-opc.js) is hiding all fields of that class. Removing the "is_customer_param" class from the <p> tag does indeed make the Address 2 field show up - however, any data entered into it is not saved into the database (neither is the gender setting as it happens). One clue is in controllers\front\OrderOpcController.php, line 423 - there's an array filled with various address fields - address1 is there but address2 is not. So, it looks like this is deliberate, but why? And if so is there any way to change it? I'm reluctant to just add address2 to the list in OrderOpcController.php as there could be other places which are involved too. Should I be logging an issue in the forge? Any info gratefully received. Thanks, Dave Link to comment Share on other sites More sharing options...
HowHard Posted September 18, 2014 Share Posted September 18, 2014 hey, I have the same problem, it's the bloody same in prestashop 1.6. Please please please need a solution to this asap. Link to comment Share on other sites More sharing options...
aliaspt Posted March 18, 2015 Share Posted March 18, 2015 Has anyone figured this out? What a bummer! Link to comment Share on other sites More sharing options...
Rizzzle Posted June 11, 2015 Share Posted June 11, 2015 Has anyone figured this out? What a bummer! Yes. It takes 30 seconds. Here's my guide. #1 First create a new class in global.css. global.css can be found in: /yourtheme/css/ .rizzzle {display:inherit!important;} Save the file. #2 Now open: order-opc-new-account.tpl This can be found in: /yourtheme/ Search for: <div class="text is_customer_param form-group"> <label for="address2">{l s='Address (Line 2)'}</label> <input type="text" class="text form-control validate" name="address2" id="address2" data-validate="isAddress" value="{if isset($guestInformations) && isset($guestInformations.address2) && isset($guestInformations) && isset($guestInformations.address2) && $guestInformations.address2}{$guestInformations.address2}{/if}" /> </div> #3 Add your style onto this line: <div class="text is_customer_param form-group"> Which would make: <div class="text is_customer_param form-group rizzzle"> #4 Save file. Remember to force compile the tpl. DONE. Explanation of how this works The display:inherit!Important tag in your new class overrides the display:none !important prioritises css. 1 Link to comment Share on other sites More sharing options...
Nickless Posted August 19, 2015 Share Posted August 19, 2015 Thanks aliaspt. Worked for me. Except my order-opc-new-account.tpl looked different: </p> {elseif $field_name eq "address2"} <p class="text is_customer_param rizzle"> <label for="address2_invoice">{l s='Address (Line 2)'}</label> <input type="text" class="text" name="address2_invoice" id="address2_invoice" value="" /> Using Prestashop 1.6.0.8 Link to comment Share on other sites More sharing options...
Rizzzle Posted August 19, 2015 Share Posted August 19, 2015 No problem. I'm glad I could help. Link to comment Share on other sites More sharing options...
El zorro Posted September 28, 2017 Share Posted September 28, 2017 Has anyone allready done this in v1.7? Link to comment Share on other sites More sharing options...
Glitter Tattoo Spain Posted April 17, 2018 Share Posted April 17, 2018 I Have the problem that some fields have literaly disapeared overnight from the address field. Line 2 is there but the postcode and province have dissapeared. I have the prestashp version 1.6.1.17 and everything has been fine until now. Any idea what has happened and how to fix it? Thanks Link to comment Share on other sites More sharing options...
tuk66 Posted April 20, 2018 Share Posted April 20, 2018 Look into Address format for Spain (and other countries). Address forms use these formats to show their form fields. 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