Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

Additional fields for address book

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #11  
Old 01-25-2012, 06:04 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Additional fields for address book

There should be only "id" field in the address book table, no "addressid" one (it is indeed means "addressid", but called "id").

The "addressid" field should be added to the "xcart_register_field_values" table.

Hope it helps.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #12  
Old 01-25-2012, 06:30 AM
  carlisleglass's Avatar 
carlisleglass carlisleglass is offline
 

eXpert
  
Join Date: Aug 2003
Location: Carlisle, UK
Posts: 316
 

Default Re: Additional fields for address book

Quote:
Originally Posted by qualiteam
There should be only "id" field in the address book table, no "addressid" one (it is indeed means "addressid", but called "id").

The "addressid" field should be added to the "xcart_register_field_values" table.

Hope it helps.


For some reason my installation was causing php errors saying addressid was a missing field within address_book - unfortunately i don't have the error messages anymore, but adding addressid to the table stopped the error.
__________________
Darren Kierman
Carlisle Glass (http://www.carlisleglass.co.uk/)
... running X-Cart Gold 4.4.5 [unix]
Reply With Quote
  #13  
Old 01-25-2012, 07:54 AM
  CartOnSteroids.com's Avatar 
CartOnSteroids.com CartOnSteroids.com is offline
 

Senior Member
  
Join Date: Oct 2010
Location: Laboratory of CartOnSteroids.com
Posts: 118
 

Default Re: Additional fields for address book

Brilliant! This is really useful!
Reply With Quote
  #14  
Old 01-25-2012, 11:00 AM
 
alinush alinush is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 88
 

Default Re: Additional fields for address book

I'm getting this:

Code:
SQL query : SELECT COUNT(id) FROM xcart_address_book WHERE userid='0' AND addressid='S' LIMIT 1 Error code : 1054 Description : Unknown column 'addressid' in 'where clause' Request URI: /cart.php?mode=order_message&orderids=11970 Backtrace: /home/user/public_html/xcart/include/func/func.db.php:291 /home/user/public_html/xcart/include/func/func.db.php:191 /home/user/public_html/xcart/include/func/func.db.php:542 /home/user/public_html/xcart/include/func/func.user.php:1210 /home/user/public_html/xcart/include/func/func.user.php:724 /home/user/public_html/xcart/include/checkout_init.php:304 /home/user/public_html/xcart/cart.php:119
__________________
X-Cart 4.1.x to 4.7.x
Reply With Quote
  #15  
Old 01-25-2012, 11:06 AM
 
alinush alinush is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 88
 

Default Re: Additional fields for address book

Actually there's a set of errors on each completed order, from the same URL specified above

Code:
SQL query : SELECT COUNT(id) FROM xcart_address_book WHERE userid='0' AND addressid='0' LIMIT 1 SQL query : SELECT COUNT(id) FROM xcart_address_book WHERE userid=■ AND addressid=■ LIMIT 1 SQL query : SELECT COUNT(id) FROM xcart_address_book WHERE userid='0' AND addressid='B' LIMIT 1 SQL query : SELECT COUNT(id) FROM xcart_address_book WHERE userid='0' AND addressid='S' LIMIT 1
__________________
X-Cart 4.1.x to 4.7.x
Reply With Quote
  #16  
Old 01-25-2012, 10:07 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Additional fields for address book

Oh, sorry. There seem to be an issue with the patch.

Please edit the include/func/func.user.php script and replace this code:
Code:
$_address_exists = func_query_first_cell("SELECT COUNT(id) FROM $sql_tbl[address_book] WHERE userid='$user' AND addressid='$address'") == 0 ? false : true;

with this:
Code:
$_address_exists = func_query_first_cell("SELECT COUNT(id) FROM $sql_tbl[address_book] WHERE userid='$user' AND id='$address'") == 0 ? false : true;
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #17  
Old 01-25-2012, 10:09 PM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Additional fields for address book

I've update the patch. So, it contains the fix provided above.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #18  
Old 01-26-2012, 12:06 AM
 
alinush alinush is offline
 

Advanced Member
  
Join Date: Jul 2007
Posts: 88
 

Default Re: Additional fields for address book

Thank you, this solved the problem.

For some reason though, the extra fields are invisible, even if the HTML code is there. Please see:

http://www.blueneon.ro/alinush/hidden.jpg

Also, how can we insert these fields between the other address book fields? For example, I need Address line 3 after Address line 2, but I can't insert it there:

http://www.blueneon.ro/alinush/fields.jpg
__________________
X-Cart 4.1.x to 4.7.x
Reply With Quote
  #19  
Old 01-26-2012, 02:56 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Additional fields for address book

Repositioning is not supported, unfortunately.

Additional customization will be rquired e.g. in this template -> skin/%skin%/(main/modules)/address_fields.tpl
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
  #20  
Old 01-26-2012, 02:57 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: Additional fields for address book

What browser do you use? Please clarify.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 01:00 AM.

   

 
X-Cart forums © 2001-2020