how to add items to basket

H

help

please i need help. 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.
Please please please 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.
 
R

Roland Hall

in message : please i need help. 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.
: Please please please 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'm working on phase two of my shopping cart. It is a lot of work. Since
this is a school project, and thank you for being honest, I cannot write
your code for you but I can point you in the right direction.

First, you need some starter ASP instructions. A good place to start is
www.w3schools.com Another thing that would be helpful is the VBScript
documentation. My tag has a link to get it (WSH 5.6 Documentation).
However, be aware it is targeted at Windows Scripting Host but almost all of
the commands can be used in ASP. The other two links are also helpful
because they take you MSFT's site to get VBScript language reference,
examples, etc.

Ex. Where they put Wscript.Echo you replace with Response.Write.

In a shopping cart, it is better to use method="POST" than method="GET" with
your forms. GET puts the posted named pairs in plain view and thus easier
to manipulate.

Adding items to a basket depends on the method you use for your basket. It
could be a database, a CSV or XML file, or it could be just in session
variables. I get my products from a product file and add them to my cart
when the user selects a buy button. Your cart should allow them to view
their selections, change quantities and change their mind by deleting items.
When they are ready to buy, you need to have a checkout page which takes
their shipping information and online payment, or offer them other ways to
pay, i.e. phone, check, money order. Without taking online payments they
should have a printer friendly receipt, with a transaction ID, and the items
of their purchase, listing product IDs, description, quantities and price,
with a subtotal, shipping costs and a final total.

One thing to keep in mind is ALL items being shipped regulate their costs
according to weight. So, each product should have an assigned weight to it,
which means for each carrier you will have either an online rate calculation
with the carrier or a rate table. The other factor in shipping is distance,
which means zip codes and countries if international. International
shipments bring in another factor when merchants have products of which some
are restricted from export. A restricted item cannot be shipped
internationally and your cart needs to have a field in the product file or
database, for each product (record) that compares against the zip code.

You also have to keep track of each user, so either session variables or
cookies is generally the way it is done because each page your user visits
has to know who they are at least by an ID.

If your project is due soon, and you can build a site with a trial version
of a shopping cart and limit yourself to coding the product pages and
interfacing the shopping cart, you'll probably have a good chance at
completing it. Not knowing the language and taking on this kind of project
has little chance of success otherwise. If you're required to write
everything from scratch, you have a lot of learning ahead of you.

HTH...

--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center - http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation - http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library - http://msdn.microsoft.com/library/default.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top