close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Order number in email receipt

Thread began 5/23/2010 3:44 pm by Badger | Last modified 5/27/2010 4:21 pm by Eric Mittman | 1618 views | 5 replies |

Badger

Order number in email receipt

How do I put an invoice number in the email receipt. I can see the code might be something like:

<?php
if(!session_id()) session_start();
echo ((isset($_SESSION["eCart1_OrderID"]))?$_SESSION["eCart1_OrderID"]:"");
?>

But can't see where to put the code using UE. Tried various but nothing seems to work without corrupting something.

Sign in to reply to this post

Eric Mittman

This php code will print out the session variable specified. You would need to put this into the email template that you are working with, the php code needs to be within the html of the template. Please post back with the template file and what you have tried, I can show you where you should be placing this. Also, where is the Universal Email server behavior called from? If it is on a page that only loads after emptying the session then there will be a problem displaying the session like this.

Sign in to reply to this post

Badger

Ideally we need the OrderID number in the email generated on the confirm.php page and on the checkout_success.php page to act as an invoice number (that's unless you suggest a better way to create an invoice number).

I've attached these two UE files but I'm not sure if this is the best way to put code into a UE template. I think I should be using the UE in DW display and inserting an ecart binding?

Also I understand when you say one of these originator pages could be closing the session. How do I get around that?

Attached Files
files.zip
Sign in to reply to this post

Eric Mittman

In the email file for the checkout success page you have the order number on line 40 set like this:

php:
<p style="color:#50516B; /* Accent_1 */ margin-bottom:7px; font-size:medium;">Invoice number: ?</p>



You should make sure to set it to the session variable like you have on the confirm page:

php:
<p style="color:#50516B; /* Accent_1 */ margin-bottom:7px; font-size:medium;">Invoice number:<?php echo ((isset($_SESSION["eCart1_OrderID"]))?$_SESSION["eCart1_OrderID"]:"")?></p>



If you are not getting the order id to show after this then there must be resetting of the session occurring somewhere. Since you would normally go from the confirm to the checkout success page the problem would be on one of these two pages. Please give this a try and let us know the result that you get.

Sign in to reply to this post

Badger

That did it.

Thanks

Sign in to reply to this post

Eric Mittman

Nice to hear that, let us know if you have any other questions.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...