View Full Version : Not sure if this is the right forum for this..

02-22-2008, 07:34 PM
Hey everyone ! First, let me say Im sorry if this is not the proper forum for this question, I am inexperienced and therefore not 100% sure what language to use to create what I need...I think its PHP related, but not sure...anyways..

I am creating a website for my company, part of its function is e-commerce. There is one page for orders because at this time there are only 4 products and 5 size options for each product..anyhow, I have the ordering part working famously..its submits the order to a gateway, the gateway processes and sends two emails..one to the customer and one to us ( as its supposed to )..and I have a add-in for our email that automatically prints the incoming order from our designated mailbox to a specific printer on our network for our production crew..so far so good...
Heres the question though..is there a way to take that incoming order, and instead of have it print as a standard text file, pull the information from it and place that info in a preformatted form and then print it ? Is this something I can accomplish with php ? I was thinking it might be something like putting the info in a database and just passing the database to a preformed template of some kind, but I dont know if thats off the mark or even possible ? If not php, how would I go about this and is there an example someone could point me to ? Sorry for the longwinded, Im just stumped.
Thanks in advance for ANY sort of help anyone can offer on the subject !

02-22-2008, 08:06 PM
I'm thinking of something like this ...

Because the email going to you is automatically going to a printer, you have no
way to put a script in-between that process (to create a new format) ... so I'm
thinking that the email that goes to the customer stays the same, but the email
you get is HTML instead of plain-text. You control how the email looks when you
get it because the script has creating an HTML email before it sends it to you.

Here's the part I'm not sure about ... when it goes from your email to printer, does
an HTML email print out as HTML, or does your routing program only send the

Somehow, send an HTML email to you and see what happens on the printer.

If it does indeed print out the HTML email (like a web page, with graphics, CSS, etc),
then we can work on altering the part that sends out the email to create an HTML
email for you.


Alternative method ....

Your e-commerce program creates a PDF file that is from a template.
That PDF file gets emailed to you. It would be an attachment, so I don't
know how that works with your automatic email router to printer.


02-22-2008, 08:41 PM
ah...i get what youre saying...
our webmail is provided by our hosting company, thats the email address that the orders go to, and its one of those webmail programs where you have three completely different programs to use when you read the mail, so, theres no set way to control which email client the order form comes from ( if that was written in anything resembling sense I dont know, lol )...and none of the three have the option to view or send as HTML, just plain text.
so, no, at the point where the email order is originally recieved its just plain text that gets sent to the printer program. ( using automatic print mail by namtuck for this ).
is there a way to define an html template ? maybe i could forward the inbox from our original email to a email that does have the option of sending html as opposed to just plain text ?

02-22-2008, 09:01 PM
addition to above..
yes, the routing program will print out the html as well, i sent a test email from my yahoo account that i just loaded up with emoticons and they all printed just fine. so, i do have that option, only question now is how to do the html template thingey..( i am new to most of this web design stuff so please forgive my ignorance ..)

02-22-2008, 09:11 PM
In your e-commerce PHP script, there's a script somewhere that handles the
emails that are getting sent. You need to find that script ... yes, I realize you
mentioned you are new to this stuff. If you can find that script, you can copy
it as a .txt file and post it here as an attachment.

The other thing to do is come up with how you want your email to look.

If you have some sort of simple HTML editor (like FrontPage Express), or do it
by hand using Notepad ... you can create a sample of what it should look like.

Later on, that HTML will go into the script and variables will be put into that instead of
the current plain-text email. You just have to create the HTML that displays the email
however you want it to look. You can have images too (like a logo). All images must
be uploaded to your website somewhere, so your email client can access those images
when it receives the email (before it sends it to the printer).

02-22-2008, 09:25 PM
i may have a problem with that, the ecommerce app. we use is not hosted on our server, for the time being i'm using their script and just posting the order to it with a form action tag.
they gave me flexibilty in adding certain tags to the page that will display in the emails, like header and footer options. should i just take the order page and post it so you can see how its laid out ?
by the way, thanks a ton for all the assistance so far...theres no way of telling you how appreciated it is...