If this is your first visit, check our documentation. To post, register or login.
Forums / Zen Cart Code Suggestions / Save order's language in the database

Save order's language in the database

Started by lat9 on 16 Feb 2016, 3:46 PM · Views: 62

Results 1 to 6 of 6
16 Feb 2016, 3:46 PM
#1
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,140
Plugin Contributions:
56

Save order's language in the database

For multi-lingual stores, it would "be nice" if the language used during an order's checkout was captured in the database as part of the order processing. This would be an aid in follow-on communications with the customer and in the re-construction of the order information.

16 Feb 2016, 6:24 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Re: Save order's language in the database

I'd be open to a PR against v160 to add this.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

16 Feb 2016, 10:41 PM
#6
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,880
Plugin Contributions:
7

Re: Save order's language in the database

I did this a very long time ago, I think all I did was add an extra line in classes/order.php (and the table column of course).

                            'ip_address' => $_SESSION['customers_ip_address'] . ' - ' . $_SERVER['REMOTE_ADDR'],
                            'order_language_id' => (int)$_SESSION['languages_id']//steve for order language
                            );


    zen_db_perform(TABLE_ORDERS, $sql_data_array);

Absolutely essential for auto emailing.

Steve
github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...