Solved

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

Posted on 2003-11-25
3
251 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
  • 2
3 Comments
 
LVL 11

Accepted Solution

by:
hart earned 500 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Most ColdFusion developers get confused between the CFSet, Duplicate, and Structcopy methods of copying a Structure, especially which one to use when. This Article will explain the differences in the approaches with examples; therefore, after readin…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

776 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