close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Sending a custom email with order details - to supplier

Thread began 9/04/2009 2:10 pm by larsentim278054 | Last modified 9/10/2009 7:16 pm by Jason Byrnes | 2147 views | 10 replies |

larsentim278054

Sending a custom email with order details - to supplier

How difficult would it be to add a button to the update order page (where you can send a shipping confirmation to the customer) - that would send an email to your supplier (or whatever email address you want) - with order details and customer address? I do have your email plugin so I know how to create an email to send, but I don't know how to get the order information and customer information in the email, as well as making a button that would send this out. Can you help?

Thanks!

Sign in to reply to this post

Eric Mittman

On this update order page you should already have the order info available to you from the existing recordset. So you could use the bindings from this recordset in the body of your email message to send the details to the address of your choice.

As for the user info for that order you would need to create another recordset on the page that would select the user record for that order. You can do this with a regular recordset that is filtered by the userID from the orders recordset.

Finally getting this to happen when you click on a particular button would require you to create a new form that has a submit button in it, you can use an image for the button. You can then just set the 'trigger' for your emailing script to be when that form is submitted to the page. In Universal Email this would be the 'submit button pressed' trigger.

Sign in to reply to this post

larsentim278054

Thanks for your help. Although I think it's a little too general.

Regarding the user info for that order - I'm not sure I understand. Does it not have the shipping address in that page? (I don't recall if it does - I'm guessing not, if you said I'll need to add that).

I don't quite understand that part. How do I "create another recordset on the page that would select the user record for that order." Is this easily done with Dreamweaver?

Thanks!

Originally Said By: Eric Mittman
  On this update order page you should already have the order info available to you from the existing recordset. So you could use the bindings from this recordset in the body of your email message to send the details to the address of your choice.

As for the user info for that order you would need to create another recordset on the page that would select the user record for that order. You can do this with a regular recordset that is filtered by the userID from the orders recordset.

Finally getting this to happen when you click on a particular button would require you to create a new form that has a submit button in it, you can use an image for the button. You can then just set the 'trigger' for your emailing script to be when that form is submitted to the page. In Universal Email this would be the 'submit button pressed' trigger.  
Sign in to reply to this post

Eric Mittman

I was assuming that you were needing the address that is on file in the users record for that customer. If you are only planning on using the values for that order then you should be fine to just make use of the existing recordset on the page. This should have the bindings that you will need in your email message, you can just drag and drop them where you need them.

Just FYI if you did want to put in any info that is only in the users table it would be a standard Dreamweaver recordset that you would use. You would just need to make sure that you fill out the section for the filter part so that it is filtered for the user that placed the order. You would select the userID column to filter by, then specify an entered value and use the recordset value for the userID from the orders recordset. This new recordset would hold the details of the user that made the order. You could then make use of the values for that user the same as you do for the order by using the bindings that are available.

Please post back if you have any further questions or need any more specific information about any part of this I would be glad to help you.

Sign in to reply to this post

larsentim278054

Okay - I'm a little confused about something here. I will obviously need the Shipping address to send to the supplier (its a drop ship supplier). Is that something I need to add to the page or is it already there?

So once that question gets answered - let's assume it doesn't have it. I don't know how to add it to the page then. If it's already there, then great, but otherwise, I'll need more direction.

So once I have that figured out... I'll have to create a form where all it does is submit the email - all I have to do is make sure the name or id is different then the main form that's already on that page, correct? (the update order page). And then what, I load up universal email, tell it all the stuff I want in the email and to send it on submit of that form, and to filter based on the orderID, and I'm good to go?

Thx

Originally Said By: Eric Mittman
  I was assuming that you were needing the address that is on file in the users record for that customer. If you are only planning on using the values for that order then you should be fine to just make use of the existing recordset on the page. This should have the bindings that you will need in your email message, you can just drag and drop them where you need them.

Just FYI if you did want to put in any info that is only in the users table it would be a standard Dreamweaver recordset that you would use. You would just need to make sure that you fill out the section for the filter part so that it is filtered for the user that placed the order. You would select the userID column to filter by, then specify an entered value and use the recordset value for the userID from the orders recordset. This new recordset would hold the details of the user that made the order. You could then make use of the values for that user the same as you do for the order by using the bindings that are available.

Please post back if you have any further questions or need any more specific information about any part of this I would be glad to help you.  
Sign in to reply to this post

terry164844

Maybe this might help

Larsentime...

You are probably new to dreamweaver. Here is what happens and what you need to know about getting the data. You are a little confused by a few things.

First, let's start with an order. You will have the customers name, address, ship to address, etc... The proper name for this is call the "Master Record"

Secondly, you have the order record that will contain such things at order id, order date, total amount of order, shipping method, etc... This record would be consider also a "Master Record" because this record will have potentially many sub records for each item ordered. (ie...I place an order on Amazon for 3 books)

Amazon has my customer (Master) record and then it has my order (Master) record for the order I just placed and then it will have the details of each item on the order in another table.

So that is kind of a simplistic view of how an order is put together from a database standpoint.

Now, in order to reference all this information and have access to every piece of the data (Customer, Order, Order Detail) you have to build (if not already done) a recordset that queries the tables and pulls into the page all the data.

When you do this query all the system (php, asp, or whatever) is doing is going out to read the tables, saving the results in an array of variables and now you can do whatever you want with those variables and arrays.

Dreamweaver and Webasssit make is exceedingly easy to output to the page the data that was queried/read/retrieved from the database and display it on a page using html.

So, let's say you want to email your supplier what basically sounds like a duplicate of the order you just received from your customer.

If you are on the order detail page, you already have the customer's information (name, ship to address, and the products of the order.

I"m not sure why Eric was saying you needed to build a recordset to get the customer data, it's already there which means that there has already been a query of the database and all the data you are looking is available to you in an array for you to use.

Anyhow, you could build a simple form that has all the fields for the order and use Universal Email (one awesome product) and send the email to supplier.


Or...another option is to simply add your supplier to the email that gets send from either paypal or paypal pro. You may not want to do this if it has information you don't want to share with your supplier.

I hope this helps and doesn't confuse you more. Please know that once you understand how this all works and is put together, you'll realize just how simple they have made it to get the job done.

If you haven't solved this in the next couple of weeks, let me know as I'm about to implement this for a client and I can share what I did.

Terry

Sign in to reply to this post

larsentim278054

Hi Terry,

Thank you so much for your reply. Although I am not new to Dreamweaver, I am new to getting data from a database, and recordsets, etc, etc... I guess I always created static websites before.

So since I'm using the orders_update page, it already has that form you speak of - meaning, those fields are in a form - all the fields I would essentially put into an email for the supplier. Do you think I need to create another form on that page with basically the same fields in order to get it to send a different email to the supplier?

Yes, the email I want to send the supplier is almost the same thing that gets emailed to the user, it's just that I want it in a different format, er - they require it in a diff. format.

So I guess what I'm asking is what I should add to the orders_update page. Another form? Once that form is created, I just hit universal email, and when I get to the email body section, there will be the fields that I have on the form available to me? To place where I need them in the email?

Sign in to reply to this post

larsentim278054

Actually - I just noticed that the SKU isn't on the customer receipt, so that's definitely something I'd need to add to the supplier email. Hopefully when or if I have to create another form on the update order page - I'll be able to choose that field from somewhere in Dreamweaver? Would it have that information available or would I have to handcode that somehow?

Sign in to reply to this post

Eric Mittman

The SKU is normally something that is associated with the items in the order details table (detail) not the order (master). You should be fine in going about the email setup like you have described, you can use the form field values directly in the email message. When you are on the body tab and choose to edit with DW you will have the form fields available from the bindings tab.

The values that these form elements are set to come from the recordset. You can reference these values directly also from the bindings tab. If you expand the recordset and drag a particular column into the body of the email message you will see that columns value for the current record in the email. If you have not tried this already you should just give it a go, I think it will be much more clear for you when you go through it and see the end result even if it is just a test.

Sign in to reply to this post

larsentim278054

Thanks Eric. That definitely helps (telling me and possibly others exactly what we need to do in Dreamweaver is something that I think you guys overlook even though it's extremely useful. And yeah, I know it's impossible to know the skill level or knowledge of the person you are helping... but I'm in IT and I usually just assume the lowest level of skill and go up from there).

Anyhow - I appreciate that you went into this detail. Thanks! It will help.

One more question - you say that the SKU is not going to be available from the orders update page - than will it be available when I create the email? I mean, in the bindings tab or the recordset?

I'll try out what you have suggested and let you know how it goes.

Sign in to reply to this post
loading

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...