zapmore Posted August 22, 2013 Share Posted August 22, 2013 Hello, I've been looking for hours and searching trough all the prestashop files and can't get the adress2 field in guest checkout to show. When looking at the code in firebug, it gives me: element.style { display: none;} Code: <p class="text is_customer_param" style="display: none;"> <label for="address2">Adress (Rad 2)</label> <input type="text" class="text" name="address2" id="address2" value=""></p> Where do I change this to show? Need this as a Care of (c/o) address field... Link to comment Share on other sites More sharing options...
PascalVG Posted August 24, 2013 Share Posted August 24, 2013 Hi zapmore, Not sure for guests, but normally addresses are country dependent, and this can this be defined there. Go to localization->Countries edit the country you are shipping to, and add the address2 line: - Press Enter at end of Address1 to create an empty line - then click on 'address' on the right of the address block. Some green address parts are shown, one of them being address2. - Click on this to add it to the address for that country. - Save and check. (Maybe empty cache of your browser to make it work) My 2 cents, pascal Link to comment Share on other sites More sharing options...
zapmore Posted August 25, 2013 Author Share Posted August 25, 2013 (edited) Hi zapmore, Not sure for guests, but normally addresses are country dependent, and this can this be defined there. Go to localization->Countries edit the country you are shipping to, and add the address2 line: - Press Enter at end of Address1 to create an empty line - then click on 'address' on the right of the address block. Some green address parts are shown, one of them being address2. - Click on this to add it to the address for that country. - Save and check. (Maybe empty cache of your browser to make it work) My 2 cents, pascal Thank you for your input. I followed your instructions, and everything seems right in that section: firstname lastname company vat_number address1 address2 postcode city Country:name phone I cleared the cache and tried different browsers, still not working... BTW VAT_number is not showing either, and I want to keep it that way. Edited August 25, 2013 by zapmore (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted August 25, 2013 Share Posted August 25, 2013 have you got different countries enabled? if so, make sure that there you've got this additional field (address2) too 1 Link to comment Share on other sites More sharing options...
zapmore Posted August 25, 2013 Author Share Posted August 25, 2013 have you got different countries enabled? if so, make sure that there you've got this additional field (address2) too No, only country activated is Sweden. everything else is disabled, same with languages... Link to comment Share on other sites More sharing options...
PascalVG Posted August 26, 2013 Share Posted August 26, 2013 Hi zap, Can you try out something for me? Can you edit the country United States, and see if that country has an address2 and a vat_number? If so/not, take out the vat_number here, and add the address2 line as needed. Save and check one more time if this has any effect. My 2 (guessing) cents, pascal Link to comment Share on other sites More sharing options...
Dave Riley Posted November 10, 2013 Share Posted November 10, 2013 (edited) Not sure whether this reply is too late but I've noticed the same problem, i.e. that "Address (Line 2)" does not show up in the guest checkout, though it does if you go to create an account. This is Prestashop 1.5.6, set up for UK (and "address2" is definitely in the address format for the country). Part of the reason is that in the tpl files (theme\order-opc-new-account.tpl) the address 2 input field and label are enclosed within a <p> tag which has the class "is_customer_param" and the Javascript associated with the page (theme\js\order-opc.js) is hiding all fields of that class. Removing the "is_customer_param" class from the <p> tag does make the Address 2 input field show up - however, any data entered into it is not saved in the database (and 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, there must be some reason why the designers decided that Address 2 was not wanted for a guest address - I can't imagine why :-(. Dave. Edited November 10, 2013 by Dave Riley (see edit history) Link to comment Share on other sites More sharing options...
andrew Posted March 11, 2014 Share Posted March 11, 2014 Hi Did you manage to solve this problem We are having the same - address is set up and working ok for registered users, but for guests they only get one address line. Regards - Andrew Link to comment Share on other sites More sharing options...
Daaaaad Posted March 20, 2014 Share Posted March 20, 2014 I just created a ticket for this bug : http://forge.prestashop.com/browse/PSCFV-11843 Link to comment Share on other sites More sharing options...
Gregory Roussac Posted March 21, 2014 Share Posted March 21, 2014 So, there must be some reason why the designers decided that Address 2 was not wanted for a guest address - I can't imagine why :-(. Dave. Hi, They wanted this form as short as possible, like just on phone, not repeating lastname for the adress etcetc. They wanted this guest checkout as fast as possible. Removing this is_customer_param class should display the field depending on checkout process, either in authentication.tpl or order-opc-new-account.tpl I believe. Regards Link to comment Share on other sites More sharing options...
Dave Riley Posted March 21, 2014 Share Posted March 21, 2014 Hi Gregory, Removing the is_customer_param class will indeed cause address 2 to be displayed however anything typed into it will still not be saved to the database. To do that it's necessary, I think, to modify the code in controllers\front\OrderOpcController.php. Hopefully the ticket that David Georges has raised (thanks David!) will see this corrected eventually. Regards, Dave 1 Link to comment Share on other sites More sharing options...
Gregory Roussac Posted March 21, 2014 Share Posted March 21, 2014 Hi, Sorry but the error must but elsewhere OrderOpcController does not rule that I believe this must be the object it self. I do not believe this field will be displayed in guest checkout sorry, but the Product Manager of the track will decide it. Best regards Link to comment Share on other sites More sharing options...
Dave Riley Posted March 21, 2014 Share Posted March 21, 2014 Hi again, I did try (some months ago now) removing the is_customer_param class and Address 2 was displayed in the guest checkout but, as I said, anything typed into it wasn't saved. Perhaps I'm wrong but in OrderOpcController.php, line 425 in V1.6, function _getGuestInformations(), there is an array of database fields - it includes address1 but not address2. I didn't try it but I assumed that this was the reason the data was not saved. At the time I decided to give up and leave it as it was, it's an irritation rather than a serious bug. Regards, Dave Link to comment Share on other sites More sharing options...
aliaspt Posted April 9, 2015 Share Posted April 9, 2015 Hi, They wanted this form as short as possible, like just on phone, not repeating lastname for the adress etcetc. They wanted this guest checkout as fast as possible. Removing this is_customer_param class should display the field depending on checkout process, either in authentication.tpl or order-opc-new-account.tpl I believe. Regards The lack of this second address line makes order processing longer, in fact, because you have to contact the customer to ask what their apartment number is when you try to ship their order and USPS says that the delivery address is incomplete. Been there many, many times. Then I have to wait for the customer to reply for days sometimes before I can ship out their order. It takes seconds to enter your apartment number and there must be a field for customers to enter their complete address. Link to comment Share on other sites More sharing options...
Paldru Posted February 20, 2016 Share Posted February 20, 2016 This is still the case in 1.6. For me the solution was to make the address2 field mandatory in the backoffice under Customers > Addresses at the page bottom "Set required fields". Link to comment Share on other sites More sharing options...
akelwood Posted February 24, 2016 Share Posted February 24, 2016 (edited) Prestashop 1.6 Another possibility, if you are using the Guest Checkout, into authencation.tpl the adress2 field contains : {elseif $field_name eq "address2"} <div class="form-group is_customer_param"> And actually into vi js/order-opc.js there's this : else if (isGuest) { $('.is_customer_param').hide(); $('#opc_account_form').show('slow'); $('#is_new_customer').val('0'); $('#opc_account_choice, #opc_invoice_address').hide(); $('#new_account_title').html(txtInstantCheckout); } Then just remove "is_customer_param" from the class of <div> Edited February 24, 2016 by akelwood (see edit history) 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