X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Registration Non-US Customers? (https://forum.x-cart.com/showthread.php?t=6764)

RecordAwards 03-18-2004 09:33 PM

Registration Non-US Customers?
 
Well, I've looked for hours and no real answer.

How does everyone have international users checkout?
Shouldn't there be 2 Address fields, province, town etc? I'm using 3.5 and I don't want to have to edit all the files, but it's looking like I'm going to have to.

Any ideas? If not does anyone know all the files that will need to be modified?


Thanks,

All Best.

PHPdev 03-19-2004 06:35 AM

We modified the registration form under version 3.4.11 and added an address 2 line for billing, and for shipping. We also added a first name, last name, company for the shipping address too.

We are now in the process of upgrading to 3.5.4, and re processing the changes we made to 3.4.X.

Let me know if you need more information on which files to edit.

Thanks

RecordAwards 03-19-2004 02:37 PM

Info
 
Yes Thanks.

Glad to see that I'm not the only one.

So which files did you edit?

The info is much appreciated!

PHPdev 03-22-2004 06:31 AM

I had to edit...

Database:
xcart_customers:
Add b_address2
Add s_address2

xcart_orders:
Add b_address2
Add s_address2

Templates:
register_billing_address
register_shipping_address

PHP files
func.php specifically the func_place_order function had to edit the insert, and update for orders adding the to added fields to the query
register.php

I beleive both php files are in the ./include directory

Let me know if you need more detailed information

belgirl 03-26-2004 01:25 PM

Hi---I would like to be able to add some fields as well...could you be a little more specific on what you changed in the php files?

Thanks!
B--

PHPdev 03-29-2004 08:00 AM

This is one example of what needs to be changed

Code:

#
# Insert into orders
#
        db_query("insert into $sql_tbl[orders] (login, total, giftcert_discount, giftcert_ids, subtotal, shipping_cost, shippingid, tax, tax_gst, tax_pst, total_vat, taxes_applyed, discount, coupon, coupon_discount, date, status, payment_method, flag, notes, details, title, firstname, lastname, company, b_address, b_address2, b_city, b_state, b_country, b_zipcode, s_firstname, s_lastname, s_company, s_address, s_address2, s_city, s_state, s_country, s_zipcode, phone, fax, email, url, reg_numbers) values ('".addslashes($userinfo["login"])."', '$current_order[total_cost]', '$giftcert_discount', '$giftcert_str', '$current_order[sub_total]','$current_order[shipping_cost]', '$cart[shippingid]', '$current_order[tax_cost]', '$current_order[tax_gst]', '$current_order[tax_pst]', '$current_order[total_vat]', '$taxes_applyed', '$current_order[discount]', '".addslashes($current_order[coupon])."', '$current_order[coupon_discount]', '".time()."', '$order_status', '".addslashes($payment_method)."', 'N', '".addslashes($order_notes)."','".addslashes(text_crypt($order_details))."', '".addslashes($userinfo["title"])."', '".addslashes($userinfo["firstname"])."', '".addslashes($userinfo["lastname"])."', '".addslashes($userinfo["company"])."', '".addslashes($userinfo["b_address"])."', '".addslashes($userinfo["b_address2"])."','".addslashes($userinfo["b_city"])."', '".addslashes($userinfo["b_state"])."', '".addslashes($userinfo["b_country"])."', '".addslashes($userinfo["b_zipcode"])."', '".addslashes($userinfo["s_firstname"])."', '".addslashes($userinfo["s_lastname"])."', '".addslashes($userinfo["s_company"])."', '".addslashes($userinfo["s_address"])."', '".addslashes($userinfo["s_address2"])."', '".addslashes($userinfo["s_city"])."', '".addslashes($userinfo["s_state"])."', '".addslashes($userinfo["s_country"])."', '".addslashes($userinfo["s_zipcode"])."', '".addslashes($userinfo["phone"])."', '".addslashes($userinfo["fax"])."', '$userinfo[email]', '".addslashes($userinfo["url"])."', '$reg_numbers')");


This section used to look like

Code:

#
# Insert into orders
#
        db_query("insert into $sql_tbl[orders] (login, total, giftcert_discount, giftcert_ids, subtotal, shipping_cost, shippingid, tax, tax_gst, tax_pst, total_vat, taxes_applyed, discount, coupon, coupon_discount, date, status, payment_method, flag, notes, details, 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, fax, email, url, reg_numbers) values ('".addslashes($userinfo["login"])."', '$current_order[total_cost]', '$giftcert_discount', '$giftcert_str', '$current_order[sub_total]','$current_order[shipping_cost]', '$cart[shippingid]', '$current_order[tax_cost]', '$current_order[tax_gst]', '$current_order[tax_pst]', '$current_order[total_vat]', '$taxes_applyed', '$current_order[discount]', '".addslashes($current_order[coupon])."', '$current_order[coupon_discount]', '".time()."', '$order_status', '".addslashes($payment_method)."', 'N', '".addslashes($order_notes)."','".addslashes(text_crypt($order_details))."', '".addslashes($userinfo["title"])."', '".addslashes($userinfo["firstname"])."', '".addslashes($userinfo["lastname"])."', '".addslashes($userinfo["company"])."', '".addslashes($userinfo["b_address"])."', '".addslashes($userinfo["b_city"])."', '".addslashes($userinfo["b_state"])."', '".addslashes($userinfo["b_country"])."', '".addslashes($userinfo["b_zipcode"])."', '".addslashes($userinfo["s_firstname"])."', '".addslashes($userinfo["s_address"])."', '"..addslashes($userinfo["s_city"])."', '".addslashes($userinfo["s_state"])."', '".addslashes($userinfo["s_country"])."', '".addslashes($userinfo["s_zipcode"])."', '".addslashes($userinfo["phone"])."', '".addslashes($userinfo["fax"])."', '$userinfo[email]', '".addslashes($userinfo["url"])."', '$reg_numbers')");


NOTE the addition of the s_firstname, s_lastname, s_address2, b_address2 fields. This may not be 100% accurate becasue I dont have the oritional file to compare to.

Also you will need to edit the "update" and "insert" statements for the customers table in includes/register.php

Hope this helps...

belgirl 03-29-2004 10:08 AM

Thank you...but in your previous post you had mentioned "database" files to edit...I can't find those files in my version...3.54 Suggestions?

Thanks! :)

belgirl 03-29-2004 10:11 AM

P.S. I am just trying to add the first and last name to the shipping information, so they can enter that instead of having to modify it later...I believe you made this customization as well?

PHPdev 03-29-2004 10:16 AM

Y you will have to edit the xcart_orders, and xcart_customers tables adding s_firstname, and s_lastname to each of these tables. Too you will have to edit the file where the b_firstname or firstname is assigned to s_firstname. This is incase the user does not enter the shipping information. I can not seem to find that file right now, it could be part of the "func_place_order" or cart.php under customers folder.

Ill keep looking, and sorry I dont have full directions typed up as of yet.

Thanks

belgirl 04-04-2004 06:11 AM

Yes, if you could post that for V. 3.54 that would be great, because I am not finding the files you are referring to....

Thanks!


All times are GMT -8. The time now is 07:15 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.