![]() |
Cant add address to the register.php page
Hi I am creating at trade site for a client and the register.php page will not display the address fields.
I am using 4.4.3 gold version I cannot force customers to enter Billing address on Register page. Changing settings in admin have no result on front-page. It looks to me that common_files/customer/main/register_address_info.tpl is old, 'cause it uses variables that do not exist in runtime. Can anyone please confirm that register_address_info.tpl (and address_fields.tpl) are up-to-date with the version 4.4.3 gold? I really need new customers to register with Billing address. http://shop.cliptec.co.uk/register.php |
Re: Cant add address to the register.php page
I am having the same problem!:(
|
Re: Cant add address to the register.php page
Quote:
Looks like you've resolved the issue on your site. How did you get around it? |
Re: Cant add address to the register.php page
Hi, because this is a trade site and I set the customer to not be able to purchase until their account was activated I created the address fields as Additional fields and as such the data is emailed to the client when they register so the client can approve/decline the application, but unfortunately this does not add the address to the customers address book.
So when the customers account is approved and they are ready to make a purchase when they checkout they would need to add their address again. Because my client wont be activating these accounts without prior company checks its not a big issue, but if the client was to be registering and then expecting to checkout instantly then they would be confused at why they then have to add their address again. I submitted a ticket to xcart and it was confirmed that this was not going to be possible with the standard structure. I looked at how I could achieve this and its not a simple procedure. If I needed the address to populate the Address book I would probably write a php script to clone the fields in the database to the required Address book tables so its already present when required. Not a great solution but I dont see many other options. |
Re: Cant add address to the register.php page
In the X-Cart v4.4 the address fields are really unavailable on the registration page, because the Address Book feature is used to store the users addresses. On the registration page it is necessary to enter the general information only (personal info + login and password). After registration the customer will see the "Address Book" tab, where he/she is able to manage his/her addresses.
|
Re: Cant add address to the register.php page
I have the same problem, my new customers are synchronized with my CRM software and need address info to be validated. I just can't rely on customer's willingness to add their address info Аfter they registered.
I think it's really stupid that this is not a feature, especially because it always worked like this in previous versions. How can you just totally erase proper functionality? Don't get me wrong, I think the address book is awesome, but why don't combine it with the registration page, it just doesn't make sense to me. I'm now going to build it myself, if anyone has tips, let me know :) |
Re: Cant add address to the register.php page
I would create a little sql/php and get it to populate the data into the other table with the updated information on a cron every 30 minutes or as required.
|
Re: Cant add address to the register.php page
Has anyone succeeded in modifying the register page to include the address book?
|
Re: Cant add address to the register.php page
I was also looking for this. Need to modify register.php to include addresses. Has anyone done this ?
thanks |
Re: Cant add address to the register.php page
This is possible, but a slight modification is required:
1. alter the "skin/common_files/customer/main/register.tpl" template and replace this code: Code:
{include file="customer/main/register_address_info.tpl"} Code:
{include file="customer/main/register_address_info.tpl" need_address_info='Y'} 2. add corresponding smarty assign statement in "include/register.php" script. PHP Code:
|
Re: Cant add address to the register.php page
Thanks Alex.
Please help in modifying "include/register.php" Where to add the code PHP Code:
Around line 1690 on include/register.php we have PHP Code:
Thanks again for the help. |
Re: Cant add address to the register.php page
Try adding this code at the bottom where the other smarty variables are defined:
PHP Code:
e.g. after this after this one: PHP Code:
|
Re: Cant add address to the register.php page
Thank you Alex. This is exactly what was needed.
|
Re: Cant add address to the register.php page
Alex I implemented this modification but it is not working properly. When a user registers, address fields are there on registration form but address does not appear in address book. User has to fill in address again so it does not make sense.
|
Re: Cant add address to the register.php page
I have the same issue with one of my companies. Has a way been found to tie the registration to the address book so there is no need for double entry of address?
|
Re: Cant add address to the register.php page
This is really helpful. I would also like to add the "additional Feilds" from the user profiles to the register form. Is this possible as we are using it as an internal account application form to approve accounts.
|
Re: Cant add address to the register.php page
Getting the Customer Registered e-mail with Customer's Personal Information along with Address Information is a need for our company as well, since we incorporate the customers onto our system as they register.
I see we can change that with some of the coding provided here, but we would also like it for our customers to not have to enter in their address twice (registration, then address book)! So as they register and enter their personal/address info, that information gets transfered to the address book. |
Re: Cant add address to the register.php page
After adding Alex's code add the below to include/address_book.php
Code:
} elseif ($current_area == 'C' && !empty($address_book)) { Worked for me. |
Re: Cant add address to the register.php page
If you dont mind me asking, where did you put it on the page to make it work for you?
Did you just edit the block around line 76 or did you enter this as a whole new block. Thanks |
Re: Cant add address to the register.php page
Looking at the code it seems to be what they already have
Code:
} elseif ($current_area != 'C' && !empty($address_book)) { |
Re: Cant add address to the register.php page
Ha Ha sorry, I was watching the Arsenal v Reading Capital One match and not paying attention. I see they are different, so still just wondering where to put that code.
Thanks |
Re: Cant add address to the register.php page
My address_book.php file has the below on line 76
Code:
} elseif ($current_area != 'C') { after the closing tag on line 87 I just added Code:
elseif ($current_area == 'C' && !empty($address_book)) { |
Re: Cant add address to the register.php page
Thanks to all for contributing this code.
After hours of trying work through this step on 4.6.3 with no luck, I disabled Email Account Activation. As soon as it was disabled, the code worked perfectly - thanks. As a wholesale only site, I by default have all new registrations set to suspended (waiting for our admin approval before being active). Does anyone know how to work this into the Email Account Activation module? |
Re: Cant add address to the register.php page
1 Attachment(s)
We've added the code to all three required files:
include/register.php include/address_book.php skin/common_files/customer/main/register.tpl It now registers the customer's address with the address book during registration, but while a customer is logged in and they go to view the "My Account" page, the address fields are missing, and it shows this section (see attached photo also): Code:
Billing address We are using X-Cart v4.5.5 |
Re: Cant add address to the register.php page
The missing address fields according my Webmaster mode is from customer/main/register_address_fields.tpl - see Alex's code below (from page 1 of this thread).
Quote:
I don't see this file in your list of modified files. Sounds like you missed this one or you applied to just the common files. If you are using a custom skin (e.g. Ideal Responsive) you need to make the change to Quote:
Any other skin changes in the code mentioned also need to be made to your custom skin files (if they exist), not just common files. I just registered a test customer on my site and can confirm the code does work properly in 4.6.3. Hope it helps. |
Re: Cant add address to the register.php page
Address Book in XC is like a pain in the ass. Over the years I recommended to write a module from scratch to allow add/remove/change in Address Book (field type, position). Also I recommended when creating a new field to select its destination: Contact, Shipping/Billing. Imagine you have two type of customers with different registration fields, how can you do it by default? You simply can't. There are at least 2 shopping carts which allow a true Address Book. If it cannot be implemented someone could create it as a module. Sad to see in year 2014 such of issues. Sorry guys!
|
Re: Cant add address to the register.php page
Did anyone finally get this working properly?
It's amazing that in 2014 such simple things are coming around like a huge problem and needs custom coding 8O What I found out more and more: X-Cart 4.x is programmed more by technical ascpects without thinking too much about usability. That is the main case why leading design and theme pages do not list x-cart. Just think about 5000 lines of css and still write css into tpl files which makes it a pain to edit ;) Sorry, for the off-topic part, but it's frustrating some times. |
Re: Cant add address to the register.php page
How do you hide the Billing/Shipping address fields when a customer has already registered, is logged in and updating their current profile on the 'My Account' tab?
Code:
www.example.com/register.php?mode=update EDIT: I was simply lazy and figured it out, in customer/main/register_address_info.tpl: Change Code:
{if $need_address_info} to Code:
{if $need_address_info and !$login} |
Re: Cant add address to the register.php page
Okay, I feel like I'm a second from getting this right...
I followed the following instructions / suggestions 1) Added the following code to skin/common_files/customer/main/register.tpl Quote:
2) Added the following code to include/register.php Quote:
Quote:
At this point the fields show, but they don't post to the address book, so I added this code as suggested below the code above in include/register.php Quote:
Upon adding that the registration page would not load at all, so I removed it, and continued onto the suggestion of adding that last bit of code to include/address_book.php The page loads, the fields show, but I'm still at the point that the data entered into the address fields does not show up in the address book. I've gone through this thread from top to bottom and back again, and I'm stumped as to what I missed :( Help? Gina x-cart v4.6.5 |
Re: Cant add address to the register.php page
Hello Gina,
I've had the same problem as you had, I added all the code everyone suggested, but alas the addres book didn't get updated. I've solved it now - albeit not perfect - but it works good enough for me. In include/address_book.php, add: Code:
elseif (!empty($address_book)) { After the "elseif ($current_area != 'C')" block. Now it saves the data! The only problem is that the user still has this one 'empty' address book entry... but that's a problem for another day. Too bad X-Cart itself doesn't really solve this problem. With all due respect, this is core functionality in 2015. |
Re: Cant add address to the register.php page
Having same issue.. I want the customer to enter all info needed once (when registering) and not have to enter it again to address book or when checking out. I have login/registration needed to checkout. Would someone please post all procedures needed to solve this issue please :)
|
Re: Cant add address to the register.php page
I guess you are looking for something like this - https://www.cflsystems.com/register.php
This requires changes in numerous files both php and tpl types. It is not a simple 1. 2. 3. list.... |
Re: Cant add address to the register.php page
Quote:
Exactly! And once customers enter this info during registration they wouldn't have to enter it again on checkout right? Can you list the steps to achieving that please :) |
Re: Cant add address to the register.php page
Yes this is one time info enter and it goes directly in the address book as billing/shipping.
Like I said it is not a simple change here or there. I can integrate it for you but can't list all steps required and codes changes. |
Re: Cant add address to the register.php page
Ok how can we do that please?
|
Re: Cant add address to the register.php page
You can open a ticket here https://www.cflsystems.com/support/ with details and I can give you an estimate for the integration.
|
Re: Cant add address to the register.php page
Hi
as for: Quote:
just +1 to what cflsystems say Quote:
meaning if all of the files adjustments done and you are still not getting address book filled then the registration process needs debug.. Maybe you register page's HTML does not have fields like: HTML Code:
PHP Code:
Hope it helps:-) |
All times are GMT -8. The time now is 07:35 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.