![]() |
need help - {$userinfo.b_firstname} not bring written
i've been editing my checkout/registration format and now the customer's first and last name are not being recorded anymore.
when i try to modify profile via the link under the minicart, the first and last name fields do not even show up to be able to edit. :x but, if i use the modify link from the payment details section above the cc info area, the fields do show up and the names then are stored. can anyone help me explain this? :?: i've removed some fields (title, website) and used others (fax, company) as address 2 fields. i've also modified register.php and register.tpl a bit, and the register_billing_address and register_shipping_address thanks http://digiez.com/store/customer/home.php |
I can't seem to access your sites pages right now, they all give a smarty error.
But i think the first and last name of a person are {$userinfo.firstname} {$userinfo.lastname} I checked out the table structure for the version of x-cart that i am running and b_firstname doesn't exist :) Does your form ask for a billing first and last name? if so i am wrong |
thanks - the smarty error is fixed, but still having my problem.
i am only asking for billing address and shipping address at checkout - i am using the billing address name as the main contact. the names are {$userinfo.b_firstname} {$userinfo.b_lastname} {$userinfo.s_firstname} {$userinfo.s_lastname} b for billing, s for shipping i think it's a new feature in 3.5 to have three different name options |
Oh I see where those are stored now
the b_fistname, b_lastname, and the s_ ones are all stored in the orders table But not in the customer info table, so the only way to get that information would be to use the order information. |
how would i accomplish that?
it seems to be storing the rest of the order info ok. |
It depends, where are you trying to display that information?
Which template file? |
customer_details.tpl - 2 pages ahead shows all the billing info but the name
and all the e-mail confirmations it just doesn't seem to be storing it. |
hmm, that is so strange, its getting the address but not those names (i tried checking out on your site)
You can try adding this line to your ./customer/cart.php at around line 559 after: $smarty->assign("userinfo",@$userinfo); Code:
print "<pre>"; It will print out all the information stored in that variable so you can see if its there and a smarty problem, if its not there its a php problem. |
hey, that's a neat trick
it wasn't there, so i'm thinking register.php? again, i was able to have it store only when i use the modify link on the page where the cc info is entered. but, not the "modify profile" link under minicart. |
Yah it must be how its storing the values, because in the confirmation e-mail i received for registering it had the names blank as well.
|
hmmmm, the modify profile link that works points to:
Code:
http://digiez.com/store/customer/register.php?mode=update&action=cart&paymentid=1 the one that doesn't work points to: Code:
http://digiez.com/store/customer/register.php?mode=update would that make a difference? here is my register_biling_info.tpl which has the input form not working Code:
{* $Id: register_billing_address.tpl,v 1.1.2.1 2004/04/09 07:07:28 svowl Exp $ *} |
It doesn't look like there is anything to do with the the template file, the form elements have the correct names.
The &mode=cart may be the issue. In include/register.php, if the action is cart it merges extended user information with the rest of the user information, so that may be the problem. You could make both use the extended user information. But I am not sure if it will cause any other wierd problems but backup ./include/register.php And then edit around line 285. change Code:
if ($mode=="update") { to Code:
if ($mode=="update") { |
unfortunately that didn't help
:cry: |
doh, it must be how it gets the data, i know that the b_ and s_ names are stored in xcart_orders and alot of the other useinfo is in xcart_customers.
It may not be getting any info from the xcart_orders table. |
anyone else have a clue on this one? i hate to go back and lose all my changes.
thank you. this is my register.php Code:
# |
The problem is that your register.php doesn't store the b_names
as you can see by this query Code:
db_query("insert into $sql_tbl[customers] (login,usertype,membership,password,password_hint,password_hint_answer,title,firstname,lastname,company,b_address,b_city,b_state,b_country,b_zipcode,s_address,s_city,s_state,s_country,s_zipcode,phone,email,fax,url,card_name,card_type,card_number,card_expire,card_cvv2,first_login,status,referer,pending_membership,ssn) values ('$uname','$usertype','".@$membership."','$crypted','".@$password_hint."','".@$password_hint_answer."','$title','$firstname','$lastname','$company','$b_address','$b_city','$b_state','$b_country','$b_zipcode','$s_address','$s_city','$s_state','$s_country','$s_zipcode','$phone','$email','$fax','$url','".@$card_name."','".@$card_type."','".text_crypt(@$card_number)."','".@$card_expire."','".@$card_cvv2."','".time()."','Y','".@$RefererCookie."','".@$pending_membership."','".@$ssn."')"); You would need to alter the table to have news rows for those 2 or 4 fields if your using the s_ ones as well. X-cart assumes that the firstname and lastname will be the same for all of them so it only stores them as firstname,lastname You could either have it store them as those, by changing your forms, or alter the table and change the insert query. |
so, this part
Code:
title,firstname,lastname,company,b_address,b_city,b_state,b_country,b_zipcode,s_address,s_city,s_state,s_count should be Code:
title,company,b_firstname,b_lastname,b_address,b_city,b_state,b_country,b_zipcode,s_firstname,s_lastname,s_address,s_city,s_state,s_count and then this: Code:
'$title','$firstname','$lastname','$company','$b_address','$b_city','$b_state','$b_country','$b_zipcode','$s_address','$s_city','$s_state','$s_country' to this? Code:
'$title','$company','$b_firstname','$b_lastname','$b_address','$b_city','$b_state','$b_country','$b_zipcode','$s_firstname','$s_lastname','$s_address','$s_city','$s_state','$s_country' do i need to make changes to the table as well? thanks for your help - it seems we've at least found the problem |
Billing and Shipping names are only used when placing orders, not when a user registers. Take a look at include/func.php, functions: func_place_order, and func_userinfo. You can also validate this within the orders table, the 4 fields exists. Hence the reason your only seeing these fields appear upon checkout and not on the basic register page.
|
hmmm, so it may be best to use the userinfo.firstname and userinfo_lastname as my billing info and scrap the b_firstname and b_lastname?
is there an easier way to do this? i just want the customer to fill out the billing address, and use that name as the main contact name and billing name. they can also have a different shipping name and address if they fill that part out. otherwise, the billing info just carries over. makes for an easier quicker checkout i think. i do want the customer to be able to register if they want to. thank you, i'm happy to donate for an effective solution here. |
Hi
I had this same or a similar problem. With the anonymous checkout registration, the fields for first name and last name appear for billing and shipping info. However the values placed in the fields are not carried through till the end of checkout. If on step 3 of checkout, the user modifies the info, the info is saved. I ended up changing this {if $action eq "cart"} to this {if $smarty.get.mode eq "update"} in the skin1/main/register_billing_address.tpl and skin1/main/register_shipping_address.tpl Now when the user registers during step 1 of the checkout, the last name and first name fields are not shown (since they are not updated anyway). I deleted the ability to modify profile from the minicart since this was also a problem. The user can modify the billing and shipping info from step 3 of checkout. This info is saved just fine. I've made some other changes that help with this process but these were the main ones. I did notify XCart about this, but never heard back from them. Thanks Mike |
|
All times are GMT -8. The time now is 12:20 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.