close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Linking Order Results to Order Details??

Thread began 6/03/2009 8:08 am by Peterson Design Studio - jefferis | Last modified 6/04/2009 8:49 am by Peterson Design Studio - jefferis | 2224 views | 4 replies |

Peterson Design Studio - jefferis

Linking Order Results to Order Details??

Hi Ray et al,
I have created a shopping cart (with Excellent help from Dani and support!!!! thanks guys )

Using the eCart Sample databases as my template I have created the Orders and OrderDetails mysql tables which are populated automatically by the cart...

I created an Admin ability using Data Wizard to search the Orders but I don't want to duplicate all these pages (results, details, updates, etc) in order to link the Orders (which has info on the customer but NO info on the items ordered) to the Order Details (which has the details of the item cart but no details on the customer).

In other words, OrderRefernceID and the DetailsReferenceID are the same number but what is the strategy for linking these results? I expect that when the admin wants to look up an order for a client, e.g., she will want to have the results of the cart contents and the info on the customer on the same page... I don't even see a way of taking the reference id and linking them in DA...

In a similar vein, I think I want customers to be able to view a subset of the information if they type in a reference ID and their email...

So is there a tutorial for this solution? I could use the wizard to create details pages, and although I tried just using the search wizard, it is kicking back mysql errors if I try to add the behavior to the existing Orders pages...

Thanks,
Jeff

Sign in to reply to this post

Ray BorduinWebAssist

I don't know of a direct tutorial.

You can just add a recordset to the current orders details page to return the details for that order. Then use a repeated table on that page to show the order details information.

You could add an INNER Join to the current orders table to join in the users information that you want displayed on that page as well. I don't think you would use DA at this point... the rest can be done with native DW functionality at this point.

Sign in to reply to this post
Did this help? Tips are appreciated...

Peterson Design Studio - jefferis

Would you have to create the sql Join Recordset before you run DA Wizard? I created a joined recordset on the results page, but it is creating a no data...

Well this may not be the most elegant way to work it but it works:

Details Order ID:
<?php $row_join['DetailOrderID'] = $row_WADAorders['OrderReferenceID'];
$newID = $row_join['DetailOrderID'];
echo $newID; ?><?php $query = "Select * From orderdetails where orderdetails.DetailOrderID = '$newID'";
$result = mysql_query($query) or die(mysql_error()); ?>

I can then call all the details from the orderdetails table and not need a repeating table on this page...

Sign in to reply to this post

geordie728

jefferis,
on the order detail page, create an orderdetails rs.

select *
from orderdetails
where detailorderid = colname

I've got colname set to $_GET['OrderID']

then as ray suggests, pull your data onto the page (tables are best here) and then run a repeat region behaviour for all records in the rs.

Sign in to reply to this post

Peterson Design Studio - jefferis

Originally Said By: geordie728
  jefferis,
on the order detail page, create an orderdetails rs.

select *
from orderdetails
where detailorderid = colname

I've got colname set to $_GET['OrderID']

then as ray suggests, pull your data onto the page (tables are best here) and then run a repeat region behaviour for all records in the rs.  



Did you set the variable for colname before or after the query?
I'm not sure if colname here is a variable or how you actually set it...

But, since this is a detail page, there is only one record going to show, the exact record for the order id and I don't need repeating regions on this page...

Thanks
JEff

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