How To Place Shopping Basket Contents Into Orders Table

I am reaching the point in the implementation of my first shopping cart where I need to place all the customer’s products within their shopping basket into an orders table.

I am sure many of you have performed this task before so I wondered if you wouldn’t mind pointing me in the right direction. I am not really sure exactly what is usually stored within the orders table in most shopping carts. My shopping cart contents is stored in a session array like this Code:

View Replies


ADVERTISEMENT

Shopping Basket / Sessions

I'm basically loading the page, checking to see if there's an "addToBasket"
value in the querystring, if there is then I grab the product code (also in
the querystring) - now - here's where it seems to be going wrong...

I figured to keep a multitude of product codes in the session variable I'll
need to store an array...so, I first check to see if the
session("BasketItems") is "" / nothing - if so, I dim in an array, if not
then I set a variable to equal the session("BasketItems")...

I then get the UBound of the array, add 1 to it, and do a ReDim Preserve,
and add the product code from the querstring to the array at that
position...

View Replies View Related

Updating Shopping Basket

I've got a shopping basket that allows a user to enter a quantity into an input field then hit an "Update Quantity" button that calls a function that refreshes the page with the new quantity. Is there a way to have the update function called when the user enters the number in the input field WITHOUT having to hit the "Update Quantity" button? I'm thinking it's a onfocus issue.

View Replies View Related

Shopping Basket Style Thing

Further to a question I posted a few weeks back - i'm devloping a site for our company where visitors can vist product sections, and pick catalogues they want - currently they can only go to one section, pick catalogues, order them, then move onto another section - problem is this. The powers that be want a more 'shopping basket' style - where customers can browse all the sections and pick as they go - and order them all together. In a 'shopping basket' styleee - so does anyone know of any good shopping basket style tutorials?

View Replies View Related

Convert Html Page Or Database Shopping Basket To An Email

OK - I have a shopping basket with data in a database. Once the person
has successfully completed their order I want to be able to send them
an email with the products ordered roughly in the following format:

Product Price Quantity

prod1 £6.99 1
prod2 £5.99 2
Postage £0.50

Total whatever..I'm
lazy

Formatting would be a little different (just spacing out the prod
table a little more.

Any ideas or links to scripts that do this?. I've been looking for a
while now but have had no luck in finding a solution. I just want to
send a text email (and not html).

The other thing is that on the last page but one, this shopping basket
is displayed. Is there anyway I could capture the html data from that
page, store it in a session variable and then generate the email after
the order has been completed (so sort of like sending a mirror of that
page)? In that case having a HTML formatted email would be ok.

View Replies View Related

Creating A Best Sellers List From My Orders Table

I'm creating an online shop which has an area showing the top ten best selling products. I'd like to generate the list of the best selling products from my OrdersDetail table (which is table showing listing purchases made on the site), ordered by the most popular at the top and the least popular at the bottom.

I thought if I could use the SQL DISTINCT command this would create a list of products without duplicates, then if I could COUNT them I'd generate a list of the most popular products in the OrdersDetails table. This nearly works but the list won't ORDER BY the COUNT column (I get an error). This is my code so far:

SELECT DISTINCT ProductDescription, COUNT(ProductDescription) AS bestSellers
FROM OrdersDetail
GROUP BY ProductDescription

View Replies View Related

Shopping Cart Table Issue

I am using ASP on my webpage to pull up data from SQL tables. I am
using a Shopping cart page where the users can place orders.

The problem I have once the user has logged in and placed an order
the shopping cart table is empty (as it should be).

But when the user tries to place another order in the same session by
adding an item to the cart, the table shows the new item along with
the old item that has already been ordered (instead of just the new
item).

The SQL table does flush the old data after the order is placed and
the table is empty. However when a new item is ordered, the table
shows the new as well as the already ordered old item. Where does it
store this old data? Is there some sort of cache and if so, how can I
delete it?

View Replies View Related

Problem With Viewstate Updating Dynamic Table Contents

1) I build a Html Table dynamically (Header Row, and then 2 rows with data
All 2 rows have 2 cells: cell(0) contains a delete button (ASP Button),
cell(1) contains a HTML Text box

2) On Form Load and get some data from a dataset and then from it's contents
build the page

At this point the page is rendered and 2 rows are displayed. There is an Add
button that a user can click to add another row to the table. This works fine
and the row is added.

Now if the user clicks the delete button in row 2 the form is posted back, I
rebuild the page, and then in the click event for the delete button remove
the row from the table and the dataset. All appears to be fine at this point.

Now if the user clicks the add button again another row is added, but this
time row 2's textbox has the wrong value. It appears to be related to the
view state. I think the view state somehow is not getting cleared when the
row is removed.

View Replies View Related

Where Should I Place My ASP Files

I am using PWS with Windows 2k pro. Is there any specific location that I need to use to place all the asp files. The prob i am stuck with is that all my asp code is getting visible as soon as I submit from a different form.

View Replies View Related

Place The Function

I am trying to convert a VB.Net 2005 progrma tinto an ASP.Net webpage. My initial problem is that while my function appears to be working, it is returning the results above the form instead of below the <HR> that is positioned below the form. I do well in VB.Net but this is my first attempt at ASP.

View Replies View Related

Customer Orders By Fax

I have a small team who are building e commerce sites for different clients .One of our client wants his customer orders to be faxed directly to him.

View Replies View Related

Exporting Of Orders

I have a site where orders are placed, i was just thinking of a good way for customers to keep track of there orders, at the moment they can page through there orders and and find it manually, I was thinking of putting a seach in also. Another one was to export all there orders in to an excel file, and one think thats any good?

View Replies View Related

Printing Multiple Orders In Asp?

I have an orderreport page where it lists all of the orders that have been placed, on each individual order i can click and it brings up a page where it shows the order items shipping info and such. I can print on each of those pages, Is there a way to say pring ordernumbers 1 2 and 3 or to say print all with a certain status.

View Replies View Related

Query Customers With No Orders

I'm trying to pull a listing of customers for which no orders appear in the order table.

table names are "customers" and "orders"
both tables contain a column named "idCustomer"

I thought performing a subquery that would sum up the total of order numbers would give me a means by which I could determine this, but I'm still getting incorrect results.

select customers.idcustomer,customers.customercompany, Orders.idorder,Orders.idcustomer,orders.orderDate from customers inner join orders on customers.idcustomer = orders.idcustomer where customers.idcustomer in(select count(idorder) as totalorders from orders where orders.idcustomer = customers.idcustomer and totalorders = 0)

View Replies View Related

Format A 2 Place Decimal In Asp

What is the easiest and best way to format a form field so the numbers show as a 2 decimal format?

(i.e. 2.50 instead of 2.5). I am developing a client based form that calculates fields but cannot seem to get the number format correctly. Code:

View Replies View Related

Forma Tcurrency () Place In Dollar

Does anyone know how to correct or why formatcurrency() places the dollar sign after the number?

View Replies View Related

Retrieving Foldername And Filename Place Into Database

I want to seach though the drives i.e c or d drives and find for the folders and subfolders and even the files and by that order only it should be inserted into the database.I am using MSACCESS database.

View Replies View Related

How To Add Items To A Basket

I am doing a wed site online shopping system for my school project, which requires some asp coding using vb script. I am new to asp and have no knowledge whatsoever on how to code what i need.
Could someone please provide me with help, or coding on how to add item details into a basket record, once the user clicks the add to basket link.

View Replies View Related

Add Items To Basket

I am doing a wed site online shopping system for my school project, which requires some asp coding using vb script. I am new to asp and have no knowledge whatsoever on how to code what i need.provide me with help, or coding on how to add item details into a basket record, once the user clicks the add to basket link.

View Replies View Related

Add Items To A Basket

I am doing a wed site online shopping system for my school project, which requires some asp coding using vb script. I am new toasp and have no knowledge whatsoever on how to code what i need.

how to add item details into a basket record, once the user clicks the add to basket link.

View Replies View Related

Templates For DB-contents And Non-DB-contents

This thread is not so much a big problem, but more to receive comments on my approach. You may have some other tips or advices of where to go or where absolutely not to go with my attempts. Code:

View Replies View Related

How To Transfer Records From One Table Of A Database To Another Table In Another Data

I have aproblem to transfer a data from table x to table y based on id. Its mean when 2 table have same id all data table x must move to table y. I don't know which command need to use is it insert into or update?

<%
Dim conn
Dim rs
Dim MYSQL,MYSQL2

Set conn = Server.CreateObject("ADODB.Connection")
Set rs = Server.CreateObject("ADODB.Recordset")
Set cmd = Server.CreateObject("ADODB.Recordset")
conn.ConnectionString = "DSN=prmm;UID=administrator;pwd=sa"
conn.Open

startdate=request("tarikh1")
enddate=request("tarikh2")

MYSQL = "SELECT * FROM table_x where paymentdate between '" & tarikh1 & "' and '" & tarikh2 & "'"
rs.open MYSQL,conn ....

View Replies View Related

How To Open A Recordset For A Table Has Space In The Table NAME?

I am trying to display the content of a Table called

'Order Detail' directly from the database (e.g., Northwind.mdb). I have the following commands:

Set tableSet = Server.CreateObject("ADODB.Recordset")

tableSet.Open table_name, DB_name, adOpenForwardOnly, _
adLockOptimistic, adCmdTable

where, table_name = ''Order Detail" Or
table_name = 'Order Detail' Or different variations.

I always get error on the second command with the following message:
Syntax error in query. Incomplete query clause

which I believe because of space in the Table Name. How can I resolve this issue? (working with file or table name with space)?

View Replies View Related

Using The Contents Of A Var

I have a vars called param1 to param10. I need to iterate through them in a loop to see if theyre empty and set them to spaces if they are. i.e

for a = 1 to 10

newparam = "param" & a
if newparam = "" then
newparam = " "
end if

next

but I want the contents of newparam i.e param1, param2 etc... to be evaluated and not newparam and then param1, param2 etc.. to be set to " " .

View Replies View Related

Getting The Contents Of The A Control

I have a select element in a form on a page with some options. When i submit thet form and the target asp page is executed, i want to find retrieve all the values in that select element on the page...?

thru request.form("sel") i am able to retrieve only the vaue selected by the user.

View Replies View Related

Session.Contents

I have the following code:

for each SesVar in Session.Contents
if( Session.Contents(SesVar) <> "" ) then

The problem is that most of the time this works okay, but sometimes the code
crashes on the compare.

View Replies View Related

Form Contents

I am wanting to do this but am not able to do it.
I have two fields: first name and last name and then submit button.
When i hit submit button ,according to the name entered in the first field ,some results are displayed from database.
Now when i hit submit ,the contents of my fields are cleared and i dont want that...i want the name to be still displayed in the textboxes...
How do i do this?
I dont want to basically clear the form contents on submit.

View Replies View Related

Displaying Of Contents

I am currently working on ASP. Users will input their contents into a textarea. The problem is that when they input and I retrieve them from the database, they will use the textarea space that was allocated to them and display exactly it is.
For example the text area given is 500px and i only give the display part of 250px. Despite that, it will fill up and scrollbars will appear on my bottom of the webpage and have to scroll to the right.
how i can display all text with the break lines in between yet still confined to the space of 250px.

View Replies View Related

Contents On The Server?

I want to read a classic HTML Form using the ASP Request object on the server. This is a common approach. But how can I read all the contents of a listbox (the <select> tag)

View Replies View Related

Return Contents

Does anyone know of any issues interacting with asp pages from within Flash when you use Control>TestMovie ? i.e. When using a send and load, Flash seems to want to open my asp file (and return the contents in Flash) rather than run it and return a name/value pair as I'm expecting.

View Replies View Related

Save Contents

I have successfully been able to load text from an SQL-DB into a <textarea>.Now I need to save the edited text back to the DB But I can't seem to extract the value from the <textarea> into a vbscript-variable.

When the user clicks the submit button under the textarea I need the text to be saved into a variable, how?

Code:

<FORM METHOD=POST ID="Form1">

<TEXTAREA NAME="text1" ID="text2"><%Response.Write(Recordset("text"))%>
</TEXTAREA><br><br>

<P><INPUT TYPE="submit" VALUE="submit2" ID="submit3" NAME="submit4">
</FORM>

View Replies View Related

Protecting Contents

what is the best way to protect a folder of files on an asp site so that only people who have logged into the site are allowed to view the files?

would it be best to put them inside a cgi-bin and then have a page with links to the files, or is there a better option?

View Replies View Related

Contents Of Two Arrays

I'm trying to figure out if there is an easy way to combine the contents of two arrays into one array. Order does not matter, I just want them all together. I'm sort of new to working with arrays, so I don't know if there is a really basic way to do this.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved