Posted: November 6, 2014 at 8:57 am
|
Hi – I’m interested in adding an extra address line on the billing page of EE4, can you help me understand what has to be done? I’m using Paypal Pro. What do I need to change in the code after ‘street2’ in the following code? And do I have to do anything in Paypal? Thanks! $BillingAddress = array( to |
|
Hi, The code above does not seem complete, you may wish to use Pastebin to add code. I assume you mean like a third street address e.g. 123 My street If that is the case, I’m not sure it can be done as looking at PayPals API docs, it only recognises Street(1) and Street2. So while you can add an extra line in, that data is not going to be used or saved anywhere. |
|
Hi – I’m actually asking for Street(2). The current billing page only shows Street(1) and not Street(2). Please see attached image. |
|
You’ll also need a corresponding entry in the $reg_page_billing_inputs array. Look down around line 967. |
|
To be clear, I have to to do 2 things: 1) change the $BillingAddress array (line 457) from to ‘street2’ => $billing_info[‘_reg-page-billing-address-‘ . $this->_gateway_name ][‘value’] 2) Add $reg_page_billing_inputs array for street2 (line 966) with the following code: |
|
I think for the first part, you’d want: |
|
oh, and in that second part, I think you have it set to make the address 2 field required. I think you might want to change that to FALSE. |
|
Hi-I did this but it doesn’t seem to show up on the /registration-checkout/?ee=_register page. Is there something else I need to do to show the 2nd address line on the page template? |
|
BTW – I’m referring to “Step 2 – Payment Options” of the /registration-checkout/?ee=_register process |
|
I just tested it out, and you were right, you also need to go into core/db_classes/EE_Onsite_Gateway.class.php to line 32. It needs to have an additional line in there for address2, like the one for address on line 31. I put it in there, and made the other 2 mods from earlier, and the address2 field shows on the reg form. |
The support post ‘Extra Address on Billing Page (EE4)’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.