Jump to content

Recommended Posts

Hi everyone,

 

I started a topic some days ago about this, but I realised the problem was caused by an Add-On and not the actual OsC. (You can see the Topic here).

 

I created my OsC Store almost 4 years ago and added some add-ons. The one involve with my problem is call HELD ORDERS v2.2 and it's purpose is to send and email as soon as the client click the LAST button of the Order Confirmation process pages, the one that brings you to Paypal Website. So if the order do not complete because the client haven't click the "Return To Merchant" button on paypal and the order doesn't complete properly, this way we still get an order in the admin section in the Held Orders section (created with the contrib) and an email to notify us.

 

The actual issue is :

 

When I receive the email, it looks exactly like this :

 

This Is My Store Name
EMAIL_SEPARATOR
EMAIL_TEXT_ORDER_NUMBER 780962
EMAIL_TEXT_INVOICE_URL http://www.XXXXXXXXX.com/account_history_info.php?order_id=780962
EMAIL_TEXT_DATE_ORDERED Thursday 23 February, 2013
EMAIL_TEXT_PRODUCTS
EMAIL_SEPARATOR
1 x Item #234 = 89.99$
EMAIL_SEPARATOR
EMAIL_TEXT_DELIVERY_ADDRESS
EMAIL_SEPARATOR
Mister Smith
1111,Street
SomeCity
ZipCode - Canada
EMAIL_TEXT_BILLING_ADDRESS
EMAIL_SEPARATOR
Mister Smith
1111,Street
SomeCity
ZipCode - Canada
EMAIL_TEXT_PAYMENT_METHOD
EMAIL_SEPARATOR
PayPal

 

I do have a multi-language store (French and English) and both langues files are uploaded to the server in the admin/includes/languages/french & english. Here's the language file :

 

<?php
/*
$Id: orders.php,v 1.24 2003/02/09 13:15:22 thomasamoulton Exp $
osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com
Copyright (c) 2002 osCommerce
Released under the GNU General Public License
*/
define('HEADING_TITLE', 'Orders');
define('HEADING_TITLE_SEARCH', 'Order ID:');
define('HEADING_TITLE_STATUS', 'Status:');
define('TABLE_HEADING_COMMENTS', 'Comments');
define('TABLE_HEADING_CUSTOMERS', 'Customers');
define('TABLE_HEADING_ORDER_TOTAL', 'Order Total');
define('TABLE_HEADING_DATE_PURCHASED', 'Date Purchased');
define('TABLE_HEADING_STATUS', 'Status');
define('TABLE_HEADING_ACTION', 'Action');
define('TABLE_HEADING_QUANTITY', 'Qty.');
define('TABLE_HEADING_PRODUCTS_MODEL', 'Model');
define('TABLE_HEADING_PRODUCTS', 'Products');
define('TABLE_HEADING_TAX', 'Tax');
define('TABLE_HEADING_TOTAL', 'Total');
define('TABLE_HEADING_STATUS', 'Status');
define('TABLE_HEADING_PRICE_EXCLUDING_TAX', 'Price (ex)');
define('TABLE_HEADING_PRICE_INCLUDING_TAX', 'Price (inc)');
define('TABLE_HEADING_TOTAL_EXCLUDING_TAX', 'Total (ex)');
define('TABLE_HEADING_TOTAL_INCLUDING_TAX', 'Total (inc)');
define('TABLE_HEADING_STATUS', 'Status');
define('TABLE_HEADING_CUSTOMER_NOTIFIED', 'Customer Notified');
define('TABLE_HEADING_DATE_ADDED', 'Date Added');
define('ENTRY_CUSTOMER', 'Customer:');
define('ENTRY_SOLD_TO', 'SOLD TO:');
define('ENTRY_TELEPHONE', 'Telephone:');
define('ENTRY_DELIVERY_TO', 'Delivery To:');
define('ENTRY_SHIP_TO', 'SHIP TO:');
define('ENTRY_SHIPPING_ADDRESS', 'Shipping Address:');
define('ENTRY_BILLING_ADDRESS', 'Billing Address:');
define('ENTRY_PAYMENT_METHOD', 'Payment Method:');
define('ENTRY_CREDIT_CARD_TYPE', 'Credit Card Type:');
define('ENTRY_CREDIT_CARD_OWNER', 'Credit Card Owner:');
define('ENTRY_CREDIT_CARD_NUMBER', 'Credit Card Number:');
define('ENTRY_CREDIT_CARD_EXPIRES', 'Credit Card Expires:');
define('ENTRY_SUB_TOTAL', 'Sub-Total:');
define('ENTRY_TAX', 'Tax:');
define('ENTRY_SHIPPING', 'Shipping:');
define('ENTRY_TOTAL', 'Total:');
define('ENTRY_DATE_PURCHASED', 'Date Purchased:');
define('ENTRY_STATUS', 'Status:');
define('ENTRY_DATE_LAST_UPDATED', 'Date Last Updated:');
define('ENTRY_NOTIFY_CUSTOMER', 'Notify Customer:');
define('ENTRY_NOTIFY_COMMENTS', 'Append Comments:');
define('ENTRY_PRINTABLE', 'Print Invoice');
define('TEXT_INFO_HEADING_DELETE_ORDER', 'Delete Order');
define('TEXT_INFO_DELETE_INTRO', 'Are you sure you want to delete this order?');
define('TEXT_INFO_RESTOCK_PRODUCT_QUANTITY', 'Restock product quantity');
define('TEXT_DATE_ORDER_CREATED', 'Date Created:');
define('TEXT_DATE_ORDER_LAST_MODIFIED', 'Last Modified:');
define('TEXT_INFO_PAYMENT_METHOD', 'Payment Method:');
define('TEXT_ALL_ORDERS', 'All Orders');
define('TEXT_NO_ORDER_HISTORY', 'No Order History Available');
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");
define('ERROR_ORDER_DOES_NOT_EXIST', 'Error: Order does not exist.');
define('SUCCESS_ORDER_UPDATED', 'Success: Order has been successfully updated.');
define('WARNING_ORDER_NOT_UPDATED', 'Warning: Nothing to change. The order was not updated.');
?>

 

At least I still receive the email, but this is annoying me.

 

What I've tried since I realized the faulty mail is relate to this contrib ? :

  • Checked the Database to see if everything from Held Orders is there = Everything's OK.
  • Checked all php files related to the installation of this contrib = Everything's OK.
  • Reupload all php files related to the contrib = DONE.
  • Redo all the code modification to be sure nothing was forgotten = DONE.

Still get emails with all the EMAIL_TEXT, EMAIL_SEPARATOR ...etc not defined

 

I can't figure this on out.

 

Any help would be appreciate.

Thanks

Share this post


Link to post
Share on other sites

One simple hack would be to place the language definitions directly in checkout_process.php near or at the top. If you wanted to preserve the ability to switch between french and english you could use a simple if statement. For example:

 

if ($languages_id == '3'){
define('HELLO_CUSTOMER', 'Bonjour');
}else{
define('HELLO_CUSTOMER', 'Hello');
}

 

(note I'm guessing that '3' is the OSCommerce database number for French)

Edited by npn2531

Oscommerce site:

 

 

OSC to CSS, http://addons.oscommerce.com/info/7263 -Mail Manager, http://addons.oscommerce.com/info/8120

Share this post


Link to post
Share on other sites

I tried what you said npn2531 and it doens't seems to work. I changed the "3" for 1 - 2 - 3 ... always the same result and still a faulty email received.

I placed it at the top right under the public licence annotation where all the "include" paramaters are. I tried ordering an item with French and English version of the store.

 

Maybe I've put it at the wrong place ?

 

Thanks for the tip anyway :)

 

catalog/checkout_process.php :

if ($languages_id == '3') {
define('EMAIL_TEXT_SUBJECT', 'Commande Mise-à-jour');
}
else {
define('EMAIL_TEXT_SUBJECT', 'Order Update');
}

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×