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:
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...
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.
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?
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.
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
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?
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.
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.
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.
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?
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.
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)
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.
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.
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.
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.
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:
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
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.
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.
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.
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)
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.
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?
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.