piernas Posted February 27, 2016 Share Posted February 27, 2016 One of the main features I miss in Oscommere is the ability of identifying what language was used when an order was placed. It is done when a customer adds a review, but not when he places an order, so you must presuume what language to use when answering him. It's also impossible to automate email replies other than using the admin language. This can be fixed with a couple of lines of code and a new field on the orders table. Here you have the code in github: https://github.com/Piernas/Responsive-osCommerce/tree/orders-lang I suppose there are many shopowners that have multilingual shops. Please take a look at it and let us know your opinion about adding this abilty it to the core oscommerce. Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 27, 2016 Share Posted February 27, 2016 I agree it is something that is missing from the core, adding it like this is a start. but still the email sent on order update are generated in the language of the admin interface used at that time ... KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
piernas Posted February 27, 2016 Author Share Posted February 27, 2016 @@bruyndoncx this addition will allow any addon to use the information for anything the shopowner could need it. I think it's necessary, too. I've just added multilingual support to the 29 days of code Order Status Text http://www.29daysofcode.rocks/3.php only by modifying a line of code! If the info is in the database creating an addon or modifying an existing one is a piece of cake! :) Link to comment Share on other sites More sharing options...
piernas Posted February 27, 2016 Author Share Posted February 27, 2016 but still the email sent on order update are generated in the language of the admin interface used at that time ... Oh I see what you mean! but it's a simple task to modify the files to accomplish that labor. Just need to match the order_status table with the new field, so few changes are needed to accomplish. I can do it if @@burt considers it an be added to the code (I've done it in the past for my 2.2 shop). Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 27, 2016 Share Posted February 27, 2016 @@bruyndoncx this addition will allow any addon to use the information for anything the shopowner could need it. I think it's necessary, too. I've just added multilingual support to the 29 days of code Order Status Text http://www.29daysofcode.rocks/3.php only by modifying a line of code! If the info is in the database creating an addon or modifying an existing one is a piece of cake! :) I use the comment bar contribution, a little bit more extensive, but essentially the same principle KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
♥bruyndoncx Posted February 27, 2016 Share Posted February 27, 2016 Oh I see what you mean! but it's a simple task to modify the files to accomplish that labor. Just need to match the order_status table with the new field, so few changes are needed to accomplish. I can do it if @@burt considers it an be added to the code (I've done it in the past for my 2.2 shop).I thought it to be more tricky to load the different language files for the order text based on the orders language field. Could be wrong though, haven't bothered to look into the details of it. KEEP CALM AND CARRY ON I do not use the responsive bootstrap version since i coded my responsive version earlier, but i have bought every 28d of code package to support burts effort and keep this forum alive (albeit more like on life support). So if you are still here ? What are you waiting for ?! Find the most frequent unique errors to fix: grep "PHP" php_error_log.txt | sed "s/^.* PHP/PHP/g" |grep "line" |sort | uniq -c | sort -r > counterrors.txt Link to comment Share on other sites More sharing options...
piernas Posted February 29, 2016 Author Share Posted February 29, 2016 @@bruyndoncx you were right. The email subject and fixed content are in the admin language files: define('EMAIL_SEPARATOR', '------------------------------------------------------'); define('EMAIL_TEXT_SUBJECT', 'Order Update'); define('EMAIL_TEXT_ORDER_NUMBER', 'Order Number:'); define('EMAIL_TEXT_INVOICE_URL', 'Detailed Invoice:'); define('EMAIL_TEXT_DATE_ORDERED', 'Date Ordered:'); define('EMAIL_TEXT_STATUS_UPDATE', 'Your order has been updated to the following status.' . "\n\n" . 'New status: %s' . "\n\n" . 'Please reply to this email if you have any questions.' . "\n"); define('EMAIL_TEXT_COMMENTS_UPDATE', 'The comments for your order are' . "\n\n%s\n\n"); This should be moved to another language file. I've read something about email templates from @@Gergely but I still didn't test it and I'm not sure how this will be handled and if those templates will be integrated into core. Also there is a paypal app version of the orders.php page. I suppose it still uses the same laguage files. Link to comment Share on other sites More sharing options...
piernas Posted February 29, 2016 Author Share Posted February 29, 2016 Did it. There are seven files affected (six changed and one added): https://github.com/Piernas/Responsive-osCommerce/commit/124d49a6505ddc32ff2359a1005d4b54bdd05746 Adds localization for order status emails in the language they wereplaced.- Language id is added to orders table when an order is placed so it canbe identified later.- Moved all email text constants fromadmin/includes/languages/language_x/orders.php to their own file(admin/includes/languages/language_x/email_constants.php).- Language flag added to order comments header to remember admin thelanguage used in the order.- Both order classes modified to store the language in$order->info['language_id'].Tested and working under a dual language setup. Orders.php was the worse file to alter because the way it's written (still don't understand the point on having two files in one). If someone with several languages installed can test it it wold be great. Link to comment Share on other sites More sharing options...
piernas Posted March 21, 2016 Author Share Posted March 21, 2016 Could anybody with a dual language test shop please test it a bit to see if it works? Link to comment Share on other sites More sharing options...
tgely Posted March 22, 2016 Share Posted March 22, 2016 Hi @@piernaswe use this https://github.com/Gergely/oscommerce2-addons/compare/order_languages on 8 language store with email templates. osCommerce based shop owner with minimal design and focused on background works. When the less is more.Email managment with tracking pixel, package managment for shipping, stock management, warehouse managment with bar code reader, parcel shops management on 3000 pickup points without local store. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.