Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Order update E-mail, Not including............?


toolcrazy

Recommended Posts

When I do a order update in Admin, the email arrives like this:

 

EMAIL_TEXT_COMMENTS_UPDATE

 

Your order has been updated to the following status.

 

New status: Processing

 

This isn't the whole email but, it's all you need.

 

I've narrowed the call to this piece of code.

$customer_notified = '0';

       if ($HTTP_POST_VARS['notify'] == 'on') {

         $notify_comments = '';

         if ($HTTP_POST_VARS['notify_comments'] == 'on') {

           $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "nn";

 

What it is not doing is sending the update comments text when you check the include comments checkbox. All it is sending is:

EMAIL_TEXT_COMMENTS_UPDATE. I have no idea where to go from here. Oh, and one more thing. If you uncheck the include comments check box the EMAIL_TEXT_COMMENTS_UPDATE goes away. Well duhhh, I don't think I needed to include that but, I did so sue me. :D :D :D :D

 

I'm using OSC Loaded 4. I also found a couple of other errors in this same area, but I was able to fix them. They were some excluded language defines.

Steve

-------------------------

Link to comment
Share on other sites

$customer_notified = '0';

       if ($HTTP_POST_VARS['notify'] == 'on') {

         $notify_comments = '';

         if ($HTTP_POST_VARS['notify_comments'] == 'on') {

           $notify_comments = sprintf(EMAIL_TEXT_COMMENTS_UPDATE, $comments) . "nn";

 

Try a define('EMAIL_TEXT_COMMENTS_UPDATE', 'Comments:');

before the code.

 

Think it is because the EMAIL_TEXT_COMMENTS is not defined.

Because of that it breaks the functionality of the sprintf().

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

Well, that didn't do it completely. It is still not passing the $comments variable to the email. But, I did fix the problem, it was a typo in admin/orders.php approx line 45

 

      $email = STORE_NAME . "n" . EMAIL_SEPARATOR . "n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "nn" . EMAIL_TEXT_COMMENTS_UPDATE . "nn" . $comments . "nn" . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);

 

Where is says $comments . What it said before was $notify_comments which is a name of a checkbox, not the textfield. So it was trying to send the contents of the checkbox not the textfield. I still need to define the EMAIL_TEXT_COMMETS_UPDATE though and I thank Mattice for that.

Steve

-------------------------

Link to comment
Share on other sites

Steve;

 

Have you seen this?

Finally got rid of the $%@#!& "EMAIL_TEXT_STATUS_UPDATE" that was showing up in customer emails instead of something that made sense. (I can't believe that I didn't find this the FIRST time I went looking for a cause )

 

in admin/includes/languages/english/spg_shipping.php, the define for this string is missing. Add:

Code:

 

define('EMAIL_TEXT_STATUS_UPDATE', 'Your order has been updated to the following status.' . "nn" . 'New status: %s' . "nn" . 'Please reply to this email if you have any questions.' . "n");

 

 

and, of course, amend it to read any way you want.

I realize this is from a different contrib, but perhaps the problem lies somewhere in your admin/includes/languages/english/shipping.php

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Thanks for the heads up. I did fix the problem and it now does send the text that I enter into the textfield. The define was missing the english/orders.php alone with a couple of others and I made the edit I have shown above. I did find out later too that Ian did have a miss edited orders.php that I thought that I did upload the new one, but maybe I didn't after all. After all this I may just use the contrib that birdbrain suggested, so all my hair pulling may be for nothing. Oh, well that programing

Steve

-------------------------

Link to comment
Share on other sites

  • 4 weeks later...

Thank you all very much for that fix, I realy needed it :D

I have onother problem with MS1

Any idea how to get the customer comments back onto the invoice? they used to be there before MS1 and were very handy when it came to pack the orders.

Best wishes

Steve

Link to comment
Share on other sites

  • 2 weeks later...

Mine reads like this:

 

$customer_notified = '0';

       if ($HTTP_POST_VARS['notify'] == 'on') {

         $notify_comments = '';

         if ($HTTP_POST_VARS['notify_comments'] == 'on') {

           $notify_comments = sprintf([b]EMAIL_TEXT_COMMENTS_UPDATE, $comments[/b]) . "nn";

         }

         $email = STORE_NAME . "n" . EMAIL_SEPARATOR . "n" . EMAIL_TEXT_ORDER_NUMBER . ' ' . $oID . "n" . EMAIL_TEXT_INVOICE_URL . ' ' . tep_catalog_href_link(FILENAME_CATALOG_ACCOUNT_HISTORY_INFO, 'order_id=' . $oID, 'SSL') . "n" . EMAIL_TEXT_DATE_ORDERED . ' ' . tep_date_long($check_status['date_purchased']) . "nn" . $notify_comments . sprintf(EMAIL_TEXT_STATUS_UPDATE, $orders_status_array[$status]);

         tep_mail($check_status['customers_name'], $check_status['customers_email_address'], EMAIL_TEXT_SUBJECT, nl2br($email), STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS);

         $customer_notified = '1';

       }

 

 

So it looks like I am ok? But I have MS1 so shouldnt this have the problems?

Link to comment
Share on other sites

Hey Toolcrazy,

 

When you said "It is not a bug, as much as it is an omision. The fix is listed above."

Were you referring to the 'EMAIL_TEXT_STATUS_UPDATE' issue or the posters comment above yours asking about comments on the invoice?

 

With MS1 I am not sure the old hack will work but I would like to find that code again or know how to add the comments to the invoice/packing slip.

 

TIA,

Mr. Ree

How to find answers to OSC Common Questions

1. Look at http://wiki.oscommerce.com

2. Search http://www.oscommerce.com/forums/

3. Post a request in http://www.oscommerce.com/forums/

Link to comment
Share on other sites

Hey Toolcrazy,

 

When you said "It is not a bug, as much as it is an omision. The fix is listed above."

Were you referring to the 'EMAIL_TEXT_STATUS_UPDATE' issue or the posters comment above yours asking about comments on the invoice?

 

With MS1 I am not sure the old hack will work but I would like to find that code again or know how to add the comments to the invoice/packing slip.

 

TIA,

 

The error was in Admin, when you updated satus of an order it would send a email to your customer. Instead of having your comment it said EMAIL_TEXT_STATUS_UPDATE and no comments. A minor code change and add a define it was fine. It also said EMAIL_TEXT_STATUS_UPDATE instead of "Comment"

Steve

-------------------------

Link to comment
Share on other sites

Hey Toolcrazy,

 

When you said "It is not a bug, as much as it is an omision. The fix is listed above."

Were you referring to the 'EMAIL_TEXT_STATUS_UPDATE' issue or the posters comment above yours asking about comments on the invoice?

 

With MS1 I am not sure the old hack will work but I would like to find that code again or know how to add the comments to the invoice/packing slip.

 

TIA,

I'm glad you posted that, I was begining to think it was just me.

 

Does any one know if it is possible to have the customer comments shown on the invoices/packing slip with MS1 ?

 

Is this a bug with MS1 or is just not possible now with the new comments tables?

Best wishes

Steve

Link to comment
Share on other sites

Thanks for the reply Steve (Toolcrazy).

 

So what Steve (Livefood) and I want to know is if the comments on the invoice are possible? With the new method in MS1 of multi comments boxes I would guess that this would be a challenge to implement.

 

Anyone have that feature working?

 

TIA,

Mr. Ree

How to find answers to OSC Common Questions

1. Look at http://wiki.oscommerce.com

2. Search http://www.oscommerce.com/forums/

3. Post a request in http://www.oscommerce.com/forums/

Link to comment
Share on other sites

We have seen the fix for getting the comments back into the customers emails (Thanks it works great :D ) but that does not get the comments back onto the invoices/packing slips, not on mine any way.

 

So is any one getting the comments onto the invoices/packing slips with MS1 or is it just me and Mr Ree that it is not working for ?

Best wishes

Steve

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...