Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Shopping Cart - Access vs a merchant software 1

Status
Not open for further replies.

sbayter

IS-IT--Management
Nov 14, 2002
95
CO
Hi,
I'm trying to create a shopping cart for my site.
I'm not sure what's better. If to do my own shopping cart in access with asp or to get software for it like cart32 ,miva, etc.
Need recommendations.
Thanks,

sbayter
 
It all depends on how much experience you have, and how much time and money.
I always think a bespoke cart is better if at all possible because there's always certain things which apply to your particular company and not to others, so you generally end up with a product which more closely fits your needs. This is obviously a cheaper option as well because you don't have to fork out for the cart software. Obviously charging your customers the right price and not having the site crash on them is paramount, so I wouldn't attempt to build a cart yourself unless you are confident in your abilities. I can't really comment on off-the-shelf carts because I always build my own, but my gut feeling would be that although they would work perfectly and are probably relatively easy to install, they would never fit as smoothly into the design and working of your site as something built specifically for the purpose.

I hope this helps!



Nick (Software Developer)


nick@retrographics.fsnet.co.uk
nick.price@myenable.com
 
Thank you very much,
I think I can handle building my own cart.
Do your have any samples or websites that could help me with this.
Would you give a general idea of how it would work. Like what happens when a user adds something to the cart, does it get stored in temporary table and after the purchase is complete it is move to an order table?
Any merchant account you would recommend to proccess Credit cards?
Thanks,

sbayter
 
Hiya,

The way i approach the problem is to store the contents of the cart within a single, delimited session variable. This avoids the problem of creating and deleting temporary tables, and orders are only written to a database once completed.

e.g. to add an item to the cart would be something like this:

strOrder = "|" & Request.Form("id") & "," & Request.Form("quantity") & "," & strPrice

Session("basket") = Session("basket") & strOrder

Where "," separates properties of that item such as price, id etc., and "|" separates each order item from the next.

To retrieve the basket contents from the variable, use the split() function to create arrays of the items

e.g.

basketArray = Split(Session("basket"),"|")

Then loop through this array, splitting each item into its properties e.g.

For iCount = 1 to uBound(basketArray)
orderArray = Split(basketArray(iCount),",")

response.write "item ID:" & orderArray(0)
response.write "item quantity:" & orderArray(1)
response.write "item price:" & orderArray(2)

Next

Although at first glances this may seem relatively complicated with all these arrays, it is actually pretty simple to work with, and certainly beats uses temporary tables.

I hope this helps you head in the right direction, if you require any further information please do not hesitate to ask.

Best wishes,

Nick

Nick (Software Developer)


nick@retrographics.fsnet.co.uk
nick.price@myenable.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top