X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Cant add address to the register.php page (https://forum.x-cart.com/showthread.php?t=60688)

hues 07-25-2012 01:54 AM

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:

$smarty->assign('address_fields'$address_fields); 



Around line 1690 on include/register.php we have

PHP Code:

$smarty->assign('address_fields'$address_fields);
        if (!empty(
$address_book)) {
            
$smarty->assign('address_book'$address_book);
        } 


Thanks again for the help.

qualiteam 07-25-2012 02:15 AM

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:

if (empty($userinfo)) {
  
$smarty->assign('address_fields'$address_fields);



e.g. after this after this one:
PHP Code:

$smarty->assign('is_areas'$is_areas); 


hues 08-04-2012 07:28 PM

Re: Cant add address to the register.php page
 
Thank you Alex. This is exactly what was needed.

hues 08-10-2012 08:51 AM

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.

tagteam 08-29-2012 11:30 AM

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?

paul@dimoda.com.au 09-06-2012 03:37 PM

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.

mcanitano 09-26-2012 07:25 AM

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.

Chrisweb2 10-23-2012 05:24 PM

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)) { 
    $address_book = func_customer_save_address_book_indb($address_book, @$ship2diff, @$existing_address, @$new_address);     
}


Worked for me.

tagteam 10-30-2012 02:28 PM

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

tagteam 10-30-2012 02:29 PM

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)) {
    77        // Update request from admin area
    78        if (!empty($delete_address)) {
    79            $address_book = func_delete_from_address_book($address_book, $delete_address);
    80        }



All times are GMT -8. The time now is 05:23 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.