Hi ,

Im developing a shopping cart system.There I need to check whether the customer's cart is empty/not before going to the checkout page.If the cart is empty I need to give a message .How should I do that??

Can someone tell me..Thanks in advance...:)

Recommended Answers

All 2 Replies

When the user adds something to that chart, add 1 to a session values, if they remove something from the chart, subtract 1 from the same session values. If the session value is empty, 0 or hasn't been set then they have nothing in the shopping chart.

Seems you didn't get what I need ..:(

adding and removing is working fine..What I need is to print a message something like validation message when a customer clicks on the order button with an empty cart...How to check it n print..

If you don't mind please give me a code .Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.