Contributions
Second Address Line
This contribution adds a second, OPTIONAL Address line for customers to use. (They can use it to put apartment number, company name, whatever.) As far as I know, it is comprehensive, and the second line appears at Billing, Shipping, in the customer's account, in Admin--everywhere.
DIFFICULTY: MODERATE. It is
a pretty long modification to make, but not *difficult*. Just a bit tedious.
There are no files to copy. Run the SQL query to insert the new fields as instructed, then just find and replace where the instructions say to.
Comments are welcome: osc@marjoram.net
Expand All / Collapse All
Instructions to modify the Paypal IPN contribution (http://addons.oscommerce.com/info/2679) to implement the second address line.
Instructions to modify the FedEx Automated Labels contribution (http://addons.oscommerce.com/info/2244) to implement the second address line.
Instructions to modify the Fast Easy Checkout (http://addons.oscommerce.com/info/3469) to implement the second address line.
This is an update to the 12 Feb 2005, ver 1.5, package.
Correction made to the install file:
Changed "in catalog/classes/order.php:" to "in catalog/includes/classes/order.php:"
No other changes made.
Attached is a patch file of the changes so that others don't have to make all the changes manually to get the code working. This patch doesn't include the changes to the SQL database! You'll still need to apply those before running this patch.
Read the file "instructions" in the archive for the full details. To extract:
tar -xzf oscommerce-2.2ms2-patch.tar.gz
To the best of my knowledge, I've entered all the changes specified to add the second address line correctly using the original instructions as well as the correction. If I've missed something or made an incorrect change, please let me know!
This patches an unmodified 2.2ms2 installation. If you've made any other source changes, I can't guarantee this will work for you.
The usual disclaimers apply: this file comes with no guarantees, make backups before doing anything so that when it screws up you can revert, not responsible for loss due to any reason, do not look into laser with remaining eye, etc.
I installed this package properly, and found that the second address line was missing in the invoices, as well as sever other places. If you look at this section of the install package....
---------------------------------------
in catalog/checkout_process.php:
---------------------------------------
FIND (at or around line 57):
'customers_street_address' => $order->customer['street_address'],
REPLACE WITH:
'customers_street_address' => $order->customer['street_address'],
// Second Address Field mod:
'customers_street_address_2' => $order->customer['street_address_2'],
// :Second Address Field mod
FIND (at or around line 74):
'delivery_street_address' => $order->delivery['street_address'],
REPLACE WITH:
'delivery_street_address' => $order->delivery['street_address'],
// Second Address Field mod:
'delivery_street_address_2' => $order->delivery['street_address_2'],
// :Second Address Field mod
FIND (at or around line 86):
'delivery_street_address' => $order->delivery['street_address'],
REPLACE WITH:
'delivery_street_address' => $order->delivery['street_address'],
// Second Address Field mod:
'billing_street_address_2' => $order->billing['street_address_2'],
// :Second Address Field mod
------------------------------
you'lll notice he wrote the last 6 lines improperly for $order->billing
change the last 6 lines of the above code (right after the final REPLACE THIS:) to this:
---------------------------
'billing_street_address' => $order->billing['street_address'],
// Second Address Field mod:
'billing_street_address_2' => $order->billing['street_address_2'],
// :Second Address Field mod
-------------------------------
This contribution adds a second, OPTIONAL Address line for customers to use. (They can use it to put apartment number, company name, whatever.) As far as I know, it is comprehensive, and the second line appears at Billing, Shipping, in the customer's account, in Admin--everywhere.
DIFFICULTY: MODERATE. It is
a pretty long modification to make, but not *difficult*. Just a bit tedious.
There are no files to copy. Run the SQL query to insert the new fields as instructed, then just find and replace where the instructions say to.
Comments are welcome: osc@marjoram.net
Note: Contributions are used at own risk.