close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

eCart cart summary

Thread begun 9/18/2011 4:56 pm by david331670 | Last modified 9/20/2011 6:48 am by Jason Byrnes | 1233 views | 3 replies |

david331670

eCart cart summary

I cant figure out the relationship between the database tables 'orders' and 'orderDetails'
However I want to record the first name, last name, email and ItemName in the database, orders table.
// WA eCart Store Cart Summary in Db in the confirm page.
$WA_table = "orders";
In the orders table I have created 4 new fields for 'first name', 'last name', 'email' and 'ItemName'.
I Have opened eCart Store Cart Summary in Db (orders Table) from the Server Behaviours panel
The new fields in the table now appear, I have dynamically linked them to the checkout form details in the ecart checkout form
"<?php echo ((isset($_POST["firstname"]))?$_POST["firstname"]:""); ?>"
And saved. All looks ok.
All the inserted items are available in the session.
Is this correct, Do I need to add any other information elsewhere?
Is there another way of doing this?
Thanks
David

Sign in to reply to this post

Jason ByrnesWebAssist

first lets talk about the orders and order details relationship.

the orders table is where you store customer information.

the orderdetails table is where you store information about the products that where purchased as part of the order.

In the orders table, the primary key column orderID is used to create the relation to the orderdetails.DetailOrderID column


In the Store Oder Summary behavior, Make sure that the Order ID setting is set to the OrderID column, the "Store As" option is the name of a session variable that will contain the ID value of the record that is insert, make note of this.


In the Store Order Details behavior, Set the "Order ID" column to the detailsOrderID and bind that column to the session variable created by the Store Order Summary behavior.


In the store order summary behavior, bind the user columns like first name, last name to the checkout form elements.

In the Store Order details behavior, bind the product columns to the appropriate columns from the eCart object.

the store orders details behavior will create a record for each row in the cart display.

Sign in to reply to this post

david331670

Thanks
That works great.
Last question for this topic. (I hope)

Previously I extracted information from a URL, namely a product ID
From your answer:

if(isset($_GET['job_id'])) $_SESSION['PBksID']=$_GET['job_id'];

this way the session will only get set if the job_id querysting variable exists.
....
once it is set, you should be able to use:
echo "Job identification=". $_SESSION['PBksID'];

How do I add the value/job_id number to a new field/column in my orders data base?
Thanks again
David

Sign in to reply to this post

Jason ByrnesWebAssist

go to the bindings panel and click the plus button, select Session Variable, set the name for the new session binding to "PBksID"

Then in the store order summary behavior, bind the database column to the PBksID session variable.

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