Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Multiple Order Status Change Emails


jorgemirat

Recommended Posts

These are the errors I am receiving:

 

Warning: include(/home/inmy/public_html/admin//includes/languages/english/inprocess.php) [function.include]: failed to open stream: No such file or directory in /home/inmy/public_html/admin/orders.php on line 73

Warning: include() [function.include]: Failed opening '/home/inmy/public_html/admin//includes/languages/english/inprocess.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/inmy/public_html/admin/orders.php on line 73

Warning: Cannot modify header information - headers already sent by (output started at /home/inmy/public_html/admin/orders.php:73) in /home/inmy/public_html/admin/includes/functions/general.php on line 22 

 

I receive these errors after updating the order status in admin. If I go to line 73 of admin/orders.php it is the code: include ($filename);

 

in:

 

$payment = MODULE_PAYMENT_MONEYORDER_PAYTO;
			include ($filename);
		} else {		

 

I receive an email still but it is empty with only the subject field (which is correct). If I comment out line 73 in admin/orders.php and test again I do not receive the errors when updating the order status but the email I receive is still empty. Any ideas on how I can fix this?

 

Thanks in advance.

Link to comment
Share on other sites

  • Replies 61
  • Created
  • Last Reply

Top Posters In This Topic

I think that all what you need to do is to create the files to generate the actual emails to send. There are some examples in the contribution and an explanation of how to do it.

 

For example one of the files that you are missing is the one mentioned on the error message:

/home/inmy/public_html/admin//includes/languages/english/inprocess.php

 

That is the file to generate the email in english when an order is changed to status "In Process"...

 

you get the idea?

 

Jorge.

 

These are the errors I am receiving:

 

Warning: include(/home/inmy/public_html/admin//includes/languages/english/inprocess.php) [function.include]: failed to open stream: No such file or directory in /home/inmy/public_html/admin/orders.php on line 73

Warning: include() [function.include]: Failed opening '/home/inmy/public_html/admin//includes/languages/english/inprocess.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/inmy/public_html/admin/orders.php on line 73

Warning: Cannot modify header information - headers already sent by (output started at /home/inmy/public_html/admin/orders.php:73) in /home/inmy/public_html/admin/includes/functions/general.php on line 22 

 

I receive these errors after updating the order status in admin. If I go to line 73 of admin/orders.php it is the code: include ($filename);

 

in:

 

$payment = MODULE_PAYMENT_MONEYORDER_PAYTO;
			include ($filename);
		} else {		

 

I receive an email still but it is empty with only the subject field (which is correct). If I comment out line 73 in admin/orders.php and test again I do not receive the errors when updating the order status but the email I receive is still empty. Any ideas on how I can fix this?

 

Thanks in advance.

Jorge

Link to comment
Share on other sites

Hi Jorge,

 

Thanks for the reply. You were absolutley right...I had everything set up except I hadnt uploaded the inprocess.php file. All working fine now. Great contribution! Thanks again.

 

Michael.

Link to comment
Share on other sites

Hi Jorge,

 

I have another quick question for you. For some reason when I receive the change status email there is quite a lot of white empty space before the email starts. I can't see anywhere in the code why this is happening. Do you have any idea why?

 

Also I have tried adding my logo to the email but this wont work either. I tried inserting it using the code: <img src='../../../../images/oscommerce.gif' width='170' height='230'>

 

But this just results in a red 'x' appearing in the email where the image should be. Do you know how to insert it?

 

Thanks in advance.

 

Michael.

Link to comment
Share on other sites

  • 2 weeks later...

Regarding the spaces, please check the posts above. It is a known issue but there is a workaround.

 

Regarding the image, you need to put the fully qualified URL, that is, the URL that you will put in a browser to display your logo. Take into account that when the logo is displayed in the email it needs to access your site from outside your server.

 

Hi Jorge,

 

I have another quick question for you. For some reason when I receive the change status email there is quite a lot of white empty space before the email starts. I can't see anywhere in the code why this is happening. Do you have any idea why?

 

Also I have tried adding my logo to the email but this wont work either. I tried inserting it using the code: <img src='../../../../images/oscommerce.gif' width='170' height='230'>

 

But this just results in a red 'x' appearing in the email where the image should be. Do you know how to insert it?

 

Thanks in advance.

 

Michael.

Jorge

Link to comment
Share on other sites

Regarding the spaces, please check the posts above. It is a known issue but there is a workaround.

 

Regarding the image, you need to put the fully qualified URL, that is, the URL that you will put in a browser to display your logo. Take into account that when the logo is displayed in the email it needs to access your site from outside your server.

 

Hi Jorge,

 

Thanks got it all looking great now. I have one last question....

 

When setting up a new type of order status through admin>localisation>Orders Status I have found that I am not able to edit an existing one but am only able to create a new one as the changes to existing status' don't seem to want save when I try. This isnt too much of a problem however I am also unable to delete old ones no longer in use. I have two that I want to delete that are no longer in use. I receive two different types of error messages for each one I want to delete:

 

'Error: This order status is currently used in the order status history.'

 

and:

 

'Error: This order status is currently used in orders.'

 

Is there a way I can go ahead and delete these anyway? Its just that I have multiple users in the admin of my store and think it is inevitable that someone will accidently use one of the old status' to update an order thus sending out the old standard emails.

 

Any ideas?

 

Cheers,

Michael.

Link to comment
Share on other sites

  • 4 weeks later...

Hello. I might be expecting this contribution to be doing something it wasn't meant to do so I'd just like clarification I guess, if possible.

 

I'm looking for this to send out different emails depending on what type of checkout process a customer uses. I have set up the contribution and it does send out the proper emails when I manual change their Status. However I'd like OCS to send those emails out upon checkout. My customers are getting the generic email notification regardless of how I have each payment module "Set Order Status" after complete set to.

 

For example: Customer checkouts and pay via Mail in Check which I have the Status to Appear as "Mailing in Payment", linked to a mailin.php email file. After checkout the customer recieves the generic Email Notification that states thank you for your order and payment, which they haven't mail yet. If I change the status and then Change it back with notify customer turned on then they get the mailin.php email file. I don't want that first generic email going out and I don't want to have to manually change each order.

 

Is it possible to have OCS send the status email upon checkout, not only after its manually changed? Thanks.

Link to comment
Share on other sites

  • 2 weeks later...
Hi Jorge,

 

Thanks got it all looking great now. I have one last question....

 

When setting up a new type of order status through admin>localisation>Orders Status I have found that I am not able to edit an existing one but am only able to create a new one as the changes to existing status' don't seem to want save when I try. This isnt too much of a problem however I am also unable to delete old ones no longer in use. I have two that I want to delete that are no longer in use. I receive two different types of error messages for each one I want to delete:

 

'Error: This order status is currently used in the order status history.'

 

and:

 

'Error: This order status is currently used in orders.'

 

Is there a way I can go ahead and delete these anyway? Its just that I have multiple users in the admin of my store and think it is inevitable that someone will accidently use one of the old status' to update an order thus sending out the old standard emails.

 

Any ideas?

 

Cheers,

Michael.

 

That is not related directly to my contribution, it must be something standard in OSC.

 

My understanding is that OSC is preventing you to delete an order status that has been already assigned to an order (that is, in use). The reason to prevent this is that if you delete that status the order will have an unknown status and can cause in the system (not listing, etc). In other words, the referential integrity of the DB will be broken if OSC let you delete an order status that is in use.

 

There are a couple of work arounds though that I can think of. One is to list all the orders with the status that you want to delete and change them the status to some other. Once no order have that status you will be able to delete it. The other is to delete the orders that have that status... in case you can/want to do that.

Link to comment
Share on other sites

Hello. I might be expecting this contribution to be doing something it wasn't meant to do so I'd just like clarification I guess, if possible.

 

I'm looking for this to send out different emails depending on what type of checkout process a customer uses. I have set up the contribution and it does send out the proper emails when I manual change their Status. However I'd like OCS to send those emails out upon checkout. My customers are getting the generic email notification regardless of how I have each payment module "Set Order Status" after complete set to.

 

For example: Customer checkouts and pay via Mail in Check which I have the Status to Appear as "Mailing in Payment", linked to a mailin.php email file. After checkout the customer recieves the generic Email Notification that states thank you for your order and payment, which they haven't mail yet. If I change the status and then Change it back with notify customer turned on then they get the mailin.php email file. I don't want that first generic email going out and I don't want to have to manually change each order.

 

Is it possible to have OCS send the status email upon checkout, not only after its manually changed? Thanks.

 

Unfortunately this contribution does not do what you want as it works in a different area of the OSC code.

 

This contribution works on the admin side, whilst the sending of the initial (default) order status email is done from the shop side (not admin). To do what you want someone will need to implement a variation of my contribution in the shop side.

 

The workaround is obviously to have a default email saying something generic like "thank you for ordering" or something similar, and then, in admin, changing the order status depending on the payment method selected. That is actually what I do, if someone select "Bank Wire" I then change the status to "Waiting for Bank Wire" that sends an email providing the details to complete the wire. When I receive the wire I change to status "Bank Wire Received" and an email is sent saying "thank you for the wire"...

Link to comment
Share on other sites

  • 4 weeks later...

hello,

I'm a noob in this category and I can't manage to get it installed. the only line I don't understand is "Execute the following sql to create the a new field in table order_status"

How do I use SQL? I've tried finding a solution for so long but I'm currently completely stuck...

 

Thanks a lot

Link to comment
Share on other sites

  • 1 year later...

This is a great contribution but I was wondering if anyone knows how to make it work with the order controller contribution? After installing this contribution, my order status emails go back to the default and aren't using the ones I created for the order controller contribution. Thanks!

Link to comment
Share on other sites

  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...