Additional fields for address book
5 Attachment(s)
In order to add this feature you can try the following modification (patches for X-Cart 4.4.4):
1. Apply the attached PATCH.sql 2. Apply the attached DIFF.patch http://help.qtmsoft.com/index.php?title=X-Cart:Applying_Patches See the attached snapshots. Once the patches are applied new options will be available on profile options page in admin back end and customer front end. New "Address book" fields will appear on checkout and address book pages. See the attached snapshots (next posts). Note: Only default build-in fields can be used for shipping calculations. |
Re: Additional fields for address book
4 Attachment(s)
Admin back end snapshots.
|
Re: Additional fields for address book
4 Attachment(s)
Customer front end snapshots.
|
Re: Additional fields for address book
Thanks for that Alex. Maybe you can consider it being included in 4.4.5 by default. Also very very helpful will be to have position for all fields so they can be sorted any way
|
Re: Additional fields for address book
WOW Finally some one did it.
THANK YOU SO SO SO Much for sharing this. |
Re: Additional fields for address book
Did you miss
Code:
ALTER TABLE xcart_address_book ADD `addressid` INT(11) NOT NULL DEFAULT '0'; |
Re: Additional fields for address book
There should be three SQL queries in the patch.
Including the one you mentioned. |
Re: Additional fields for address book
This is the contents of 'PATCH.sql.txt'
Code:
ALTER TABLE xcart_register_field_values ADD `addressid` INT(11) NOT NULL DEFAULT '0'; |
Re: Additional fields for address book
Quote:
Yes, these are the SQL queries that are required. The addressid field is already in the address book table, it is called "id" there. It seems I was wrong when I said your query is required. I missed the table name in your query. Sorry. So, all the required SQL can be found in my first post. |
Re: Additional fields for address book
For some reason my xcart installation didn't have an addressid on the address_book table, and I had to add it.
|
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. |
Re: Additional fields for address book
Quote:
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. |
Re: Additional fields for address book
Brilliant! This is really useful!
|
Re: Additional fields for address book
I'm getting this:
Code:
|
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 |
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; |
Re: Additional fields for address book
I've update the patch. So, it contains the fix provided above.
|
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 |
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 |
Re: Additional fields for address book
What browser do you use? Please clarify.
|
Re: Additional fields for address book
I use Firefox.
I also tried Chrome and IE - same thing, a blank space. The screenshot shows the HTML code in Firebug - the additional field is there, but it's invisible for some reason. I tried clearing the cache with no results. |
Re: Additional fields for address book
1 Attachment(s)
Quote:
Here is a patch adjusted for version 4.4.5: * DIFF.patch.4_4_5.txt |
Re: Additional fields for address book
Quote:
Make sure the modification is applied properly. Also, please try clearing templates and browser cache. http://help.qtmsoft.com/index.php?title=X-Cart:Advanced_Tools#Clear_Templates.2FX-Cart_Cache |
Re: Additional fields for address book
I have tried everything, including clearing the cache. As you can see the HTML code is there, but for some reason it's not displayed. I can't find any way to fix it.
|
Re: Additional fields for address book
You can see this live at http://gentworks.blueneon.ro/ - if you go to checkout, you will see the blank space where this html code is:
Code:
<li class="fields-group last"> |
Re: Additional fields for address book
Please try the follwing: edit the "skin/common_files/modules/One_Page_Checkout/profile/address_fields.tpl" template and add this code
Code:
{if $ex_additional_address_fields ne ''} Code:
{include file="main/additional_address_fields.tpl" ex_additional_address_fields=$ex_additional_address_fields require_aid='Y' ex_list_view='Y'} |
Re: Additional fields for address book
This did the trick! Thank you!
|
Re: Additional fields for address book
Any ideas on how I could insert extra address book fields between the default ones?
|
Re: Additional fields for address book
What more required to make it work with X-cart 4.4.3 ??
Please help.. |
Re: Additional fields for address book
Quote:
This feature is not supported unfortunately. A more complex modification will be required to add it. |
Re: Additional fields for address book
Quote:
The provided patches are for 4.4.4 and 4.4.5 only. But you can try and apply the patch manually. Make sure you work on the development copy not the live store. Since it has not been tested on versions before 4.4.4. |
Re: Additional fields for address book
Hi Alex,
Thanks for your code for Address book but I want to get it for 4.4.2.Will it work? |
Re: Additional fields for address book
Hi,
Will it possible to work on 4.4.2? Kindly reply... Thanks.. |
Re: Additional fields for address book
I cannot say for sure since there were a lot of changes between X-Cart 4.4.2 and 4.4.4.
The DB structure has not been changed much, so most probably it will work (but more hand work is expected). |
Re: Additional fields for address book
For the benefit of others trying this, I went thru the process and was able to add extra field capability to my 4.4.5 store. I had the invisible field problem listed in post above, but stopped before applying the fix in Post 26.
I use the Altered Cart one page checkout addon, and the extra fields were offset to the right of all other fields and also caused a wrapping problem with 'ship to a different address' setup. Then this weekend, I got the email notice that 4.4.6 is coming 'soon'. I'm going to wait and continue to use the fax field as a substitute for 'company'. I'm hoping that the extra fields will be integrated then, or better still, do what should have been done long ago and make the company name a standard part of the address book. It is my opinion that it was stupid to leave it out, and it is stupid to not put it in now. Sorry. I usually don't rant. |
Re: Additional fields for address book
Thank you for the feedback.
In case this feature is not included, I'll update the instructions as soon as the next version is released. |
Re: Additional fields for address book
Do we have one patch for 4.5.0?
By the way, this should be part of XC 4.5.x by default, right? |
Re: Additional fields for address book
I'm working on the one for 4.5.x and upload it soon here.
|
Re: Additional fields for address book
OK, I've created and uploaded the v4.5.0 patch (see the first post).
The instructions and SQL patch are the same as for the previous versions. |
Re: Additional fields for address book
Alex thanks for that but can you please include it in 4.5.1. Makes no sense to have to patch an upcoming version, just make it part of it
|
All times are GMT -8. The time now is 10:11 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.