Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Select Multiple Items Tables, Add to Cart, View Cart Later, Email Cart Contents

Posted on 2003-11-25
3
Medium Priority
?
266 Views
Last Modified: 2013-12-24
I've developed a webpage that displays the contents of my database. The user has 4 different views to look at, (View 1, View 2, View 3 and View All). In each of these views the user can select some rows, add the rows to a cart and continue browsing.

I know how to get what the user selected , but i don't know how to get what they selected, store their selection, allow them to continue surfing, store more rows, and then finally email the administrator their selections.

This is what i don't know how to do:

1. I do not know how to allow users to Sort Columns by clicking a Column Header.

2. I do not know how to allow user to select rows (via checkbox) and send the selections to a cart (structure i am assuming), continue browsing and add more items to cart.

3. I do not know how to have all the pages display how many items they have the the cart.

4. I do not know how to have user view cart and delete selections.

5. I do not know how to have user email their selections over to an email address that is stored in the same database (different table).

6. I do not know how to send html email to administrator.

To get a more concise picture of what i am attempting, please view the following

1. My previous post: http://www.experts-exchange.com/Web/WebDevSoftware/ColdFusion/Q_20807809.html#9816347
0
Comment
Question by:zakirdavis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
hart earned 2000 total points
ID: 9822797
you are asking for a whole site to be created....

1. for sorting of columns..

by default say u have a query
<cfparam name="orderbyfield" value="id"><!--- i am assuming u have unique field called id --->
<cfquery name="Qry_GetDetails" datasource="dsn name">
   select  details from table order by #orderbyfield#
</cfquery>

now after u have shown the complete table details in a tabular format..
give an image that shows asc [a arrow key that points downwards]. now on click of this image u will have a hidden field called orderbyfield in the form..

say if he clicks on first name then assign FirstName desc / asc in the hidden field using javascript...
and submit the form to the same page .

now when the query gets executed the orderbyfield varable will be found defined and ur FirstName desc / ascwill be fired..

thats it about sorting...


now the second part of adding items to cart

u will have an unique id for each row in the table.
so assign that id as the value for the check box..

now create a table that will store the id's selected by the user.
so ur table will have the logged in users id and then the selected id's in the table...

so anytime the user logs in you can query this database and show the details of his cart,
then whe he confirms the order delete that record from the this table and add it to the confirmorder table.

and using the details from the confirmorder table mail it to the administrator..


Regards
Hart
0
 

Author Comment

by:zakirdavis
ID: 9833672
I think i want to use sessions for storing the information the user selected. Creating a new table could get big. Also, i want to stray away from users having to log in.
0
 
LVL 11

Expert Comment

by:hart
ID: 9855878
no the tables won't become big because, once the order is confirmed, delete the particular record from the table and so the table size will remain small..

Regards
Hart
0

Featured Post

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
What You Need to Know when Searching for a Webhost Provider
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question