Jump to content

Recommended Posts

Hi,

 

1st post here, not sure if I have posted this in the correct section, so feel free to move it if need be.

 

Basically, I am looking to find a half decent shopping cart. What I don't want, is a full eCommerce system. I just want the cart section.

 

I will build the functionality to add products, descriptions, images and create new user accounts etc. But I need something to handle information submitted to the cart (i.e product & quantity) and store it there until the user completes the purchases or leaves the site.

 

For example, on a product there will be an option to add the product (with quantity) to the cart. At this stage, when the user enters say "5" and hits the submit button, this info, along with price etc. is submitted to the cart, which handles the total cost etc. I would also like to be able to offer discounts for large orders. And shipping price dependent on the total cost of the order.

 

So far I have been unsuccessful in finding anything that suits.

 

Any help is much appreciated, or even if you could point me in the right direction.

 

cheers,

 

Ewan

Link to comment
https://forums.phpfreaks.com/topic/75773-phpmysql-shopping-cart/
Share on other sites

Hi guys,

 

@desmond

 

What I can do with re to tables is,

 

Customer info -

id, username, email address, password, shipping address, telephone etc.

 

Product info -

id, title, image, description, quantity, price, stock level etc.

 

The above I will handle using an application I have made which uses the CMS the site will be using. What I am trying to avoid is the need to have two systems.

 

Basically I want something that will handle values that have been input using the CMS. If I state the product is £5.00 and 17.5% has to go on top of that, the cart script will calculate this, and also any delivery info.

 

My knowledge of PHP isn't so great, hence why I am looking for something small, but will do the job, as I have the barebones of the system at present.

 

cheers,

 

Ewan

 

Not shure what you mean by 2 systems. I take it that the CMS is an admin site that adds items to the database for the user to view select and purchase.

 

If you have a table Product info then you will need a table for storing the items selected. You don't need the quantity field if this is for the shopping basket.

 

What I did was each returning customer is given a virtual basket in the baskets table.

 

  `BasketID` int(11) NOT NULL auto_increment,

  `UserID` int(11) default NULL,

  `Date` date default NULL,

  `Completed` char(1) default NULL,

    PRIMARY KEY  (`BasketID`)

 

Then if they add an item to there basket this is recorded in the BasketItems table.

This holds the contents of all basket items but has a field for the ID of each basket.

 

  `ItemID` int(11) NOT NULL auto_increment,

  `BasketID` int(11) default NULL,

  `ProductID` int(11) default NULL,

  `Quantity` smallint(6) default NULL,

  PRIMARY KEY  (`ItemID`)

 

To view the basket you have everything you need in this last table

 

Desmond.

 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.