| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
2 Address Lines | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
2 Address Lines
We need a second "Address" line in the "Bill To" and "Ship To" info.
I don't understand why this isn't currently in X-cart when the vast majority of etailers provide this second line. Some people have complex addresses and a second line is required. |
|||||||
#2
|
|||||||
|
|||||||
yea, I agree. Thought this would be an easy fix so I got started and now ... well I have questions.
My questions revolve around the order it self. Where does the mail templates get the inf to populate the order_invoice? I.E. Code:
I think I have a fix as soon as I figure this out .. unless it has already been posted before |
|||||||
#3
|
|||||||||
|
|||||||||
check register.tpl
you could re use an un needed field
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#4
|
|||||||
|
|||||||
whew .. what a mess. I hope I have all this right. Use at your own risk and if you try it make sure you BACK EVERYTHING UP!!
My ONLY concern is that I missed a tpl file somewhere that needs to display the new address lines. Here is what I have done if anyone wants to give it a try. If you see ANYTHING wrong please let me know. ``````````````````````````````````````` Using phpMyAdmin you will need to modify your CUSTOMER table in the database. Insert new field AFTER b_address with the name b_address2 Insert new field AFTER s_address with the name s_address2 Using phpMyAdmin you will need to modify your ORDERS table in the database. Insert new field AFTER b_address with the name b_address2 Insert new field AFTER s_address with the name s_address2 PHP FILE: include/register.php REPLACE Code:
WITH Code:
REPLACE Code:
WITH Code:
REPLACE Code:
WITH Code:
PHP FILE: include/func.php REPLACE Code:
WITH Code:
TEMPLATE FILE: skin1/main/register.tpl Add these lines after the first shipping address blocvk of code for BOTH Billing and Shipping BILLING ADDRESS 2: Code:
SHIPPING ADDRESS 2: Code:
TEMPLATE FILES: The following tpl file will need to be modified to include and display the new address lines skin/mail/ -->order_invoice.tpl USE:: {$order.s_address2} {$order.b_address2} -->order_notification_admin.tpl USE:: {$order.s_address2} {$order.b_address2} -->order_notification.tpl USE:: {$order.s_address2} {$order.b_address2} skin/provider/ -->order_printable.tpl USE:: {$customer.s_address2} {$customer.b_address2} skin/main/ -->order_invoice.tpl USE:: {$order.s_address2} {$order.b_address2} -->order_label_print.tpl USE:: {$customer.s_address2} {$customer.b_address2} -->history_order.tpl USE:: {$customer.s_address2} {$customer.b_address2} |
|||||||
#5
|
|||||||||
|
|||||||||
moved to custom templates
__________________
Looking for a reliable X-cart host ? You wont go wrong with either of these. EWD Hosting Hands On Hosting |
|||||||||
#6
|
|||||||
|
|||||||
Rodney, thanks for the legwork!
Hopefully the Xcart people notice this and add it to their next version. |
|||||||
#7
|
|||||||
|
|||||||
great work
Really nice of you to fully document it. Done it many times, but keep forgetting to totally write it down
__________________
ex x-cart guru |
|||||||
#8
|
|||||||
|
|||||||
thank you!!
I'm usually not that organized but I will have to do this to several sites now and didn't want to have to remember each time ... my memory is not what it use to be |
|||||||
#9
|
|||||||||||||
|
|||||||||||||
There has to be happen a similar thing with gift certificate recipient addresses too.
- If you use this module and prefer to have 2 address lines there as well. All the following refers to version x-cart-3.4.7gold. Quote:
Then the following changes to the code: admin/giftcerts.php change: Quote:
to Quote:
change in: Quote:
to: Quote:
in customer/giftcert.php: change: Quote:
to: Quote:
in include/func.php: change: Quote:
to: Quote:
In skin1/modules/Gift_Certificates/giftcert.tpl: shortly after the statement group around line 231 about the address line add the following: Quote:
In skin1/modules/Gift_Certificates/giftcert_static.tpl: shortly after the statement group around line 90 about the address line add the following: Quote:
In skin1/main/history_order.tpl: around line 90 change: Quote:
to: Quote:
I hope I did not oversee something. |
|||||||||||||
#10
|
|||||||||
|
|||||||||
After a bit of work I got this functioning properly in 3.4.10. It should be noted that the additions need to be made to several more .tpl files. Namely those files that call out the shipping address in email notifications.
Essentially, the mod is thus; Add the two columns into the database and then add b_address2 and s_address2 throughout the site. Not a quick task but a good extended search tool will help you find s_address and b_address throughout your code. From there you just copy and add the '2' for address line 2. Thanks much for your work on this and for your detailed explanation rodenyw!
__________________
Site 1 > XCART LIVE 3.4.12 Site 2 > XCART LIVE 4.0.17 |
|||||||||
|
|||
X-Cart forums © 2001-2020
|