close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Showing multiple order details on one page

Thread began 9/13/2012 9:29 am by Justin@AdventDesign | Last modified 9/21/2012 11:48 am by Jason Byrnes | 818 views | 6 replies |

Justin@AdventDesign

Showing multiple order details on one page

I have a shopping cart system that pretty much follows the standard cart & checkout in eCart 5. It uses a users table, order table and order details table. I've generated all the proper backend pages with DataAssist/Data Bridge and am able to view Order Details in the backend one at a time.

My client wants to be able to click a button to load all unprocessed orders onto a single page for printing purposes, then once printed click a single verification that they have been printed OK and have all those orders 'archived'.

I know you can't give me a step by step, but can you give me some general direction on how to (A) pull multiple order/orderdetail records all on one page. The current detail page pulls it with two different queries, but that won't work for multiple orders on one page. Secondly, (B) the general approach to take every order in that result and change one field, like a 0 to a 1, to indicate the order has been processed.

Thanks. Any direction would be appreciated.

Sign in to reply to this post

Jason ByrnesWebAssist

you will still use 2 recordsets for this, the key to making this work is to use a repeat region to show multiple orders and place the details recordset inside the repeat region so that it requires for each order shown on the page

your orders table would need to have a column to mark the orders as processed or.


you would create a recordset to return all orders where the processed column was set to unprocessed.

add the information to the page to show the order on the page and add a repeat region around it.

Next add the order details recordset. The order details recordset will use the OrderID column from the orders recordset as the filter on the detailOrderId column. you will need to manually move the details recordset code so that it is inside the repeat region for the orders recordset



since you are showing all unprocessed orders, you can set the updated behavior to use the processed column as the key column and update all records where processed is equal to unprocessed, to change that column to archived.

Sign in to reply to this post

Justin@AdventDesign

So I can query another recordset within the body, within the repeating region? I never realized that as my queries have always been in the head.

Sign in to reply to this post

Justin@AdventDesign

"since you are showing all unprocessed orders, you can set the updated behavior to use the processed column as the key column and update all records where processed is equal to unprocessed, to change that column to archived."

I don't think we want to simply change all '0's to '1's in the processed column. What if a new order comes in between the time of the original page query and the time they finish processing orders and verify? An order could get tagged even though it wasn't a part of the original query.

Sign in to reply to this post

Jason ByrnesWebAssist

yes, you can move recordset code to be in the repeat region It will get created in the head, so you need to manually it to the repeat region.

for the update, you could create a comma separated list of the product IDS inside the repeat region and as a hidden form element. you would need to hand code the update SQL for this using:

UPDATE yourTable SET processed = 1 WHERE productID IN($_POST['idList'])

Sign in to reply to this post

mrs

Now this looks really interesting, and I think a tutorial about it demoing how one can include record sets within the HTML is beneficial.

I did know this could be done as I have previously built a dynamic menu where it has a recordset within the html of the menu. The benefit of this was to be able to get parent, child and sub-child items within the menu and make sure they appeared in the correct place. It was complex though!

Isn't your powerstore products menu built in a similar manner? Was that built with CSS Menu Writer, or did you manually create it?

Mat

Sign in to reply to this post

Jason ByrnesWebAssist

I'll forward your comment to the documentation team.

Yes, menu writer uses nested recordsets to create dynamic menus

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