Toogit Social Post

Pratik Bhor

one year ago
Hello All,

I have developed a website using PHP, MySQL. It's having Client Registration, Login, Logout system.

It's closed to the outside world with user name and password protection. Only my agents use my web site.
If my agent needs something like printer paper or cartridge they can give the order from my web site.

If the agent wants to order two different things like printer paper and cartridge he needs to give two orders. ( Mostly to two different suppliers )
I want to create a basket system to solve this problem. The agent should be able to add the products he wants to the basket, after that he can give the order.

First I need to create the basket system, then after I receive the order I need to separate the orders according to their suppliers. ( I need to email the related supplier about the order )

I'm new to basket system. what do you suggest I should do?
4 comments, 0 Followers

I had a look at the link you posted - not a good link in my view. I am not a fan of mixing cart logic with display logic.

If I were building this I would create services to handle the various cart operations.
And then use AJAX against these to perform the various operations.

by Dipali Ambre one year ago

There are a few basic things a cart system needs to do.

1. Add an item to the cart
2. Remove an item from the cart
3. Display the contents of the cart
4. Record purchases of the cart

After you can do those things, you come upon eCommerce issues, including how to accept payment, how to fulfill orders, how to track shipping, how to refund for damaged shipments, how to deal with inventory, etc. I built such a system about a decade ago. It took me months, in large part because of the vendor integration in order fulfillment. So based on my experience in building a cart, I really think a better answer would be to buy a cart and integrate it.

If you decide to buy instead of build (and I sincerely hope you do) consider x-Cart or OpenCart.

Let me know if you would like to work together.


by Swapnil one year ago

I think you are asking how to create basket?

A cart is just a session based store of items. The simplest version is an array you store in the Session.

As you learn more about cart's you will find that there are some issues with using only the Session that are addressed by storing the session data in a database table and using a cookie (or JWT) to access that session data.

When you add an item to the cart you call a script that retrieves the session data (from the SESSION or database) and then adds the specified item to the array of cart items already in the session.

by Dipali Ambre one year ago

Freelancers You May Hire

Related Freelancers You May Like

Related Jobs

Related Services