473,509 Members | 2,457 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to add multi items to shopping cart simutanously?

24 New Member
I am doing a tickets booking system, it requests in one page list all the tickets info includes from city, to city, price and followed a textbox to input the number of tickets want to book. and at the bottom of the page is a 'buy' button, when the customer click on the button, all the routes the customer choose will be added to the shopping cart simutanously.
I can do if just add one item to the shopping cart, but have a problem about more than one item simutanously.
Thank you for your help.
Sep 9 '07 #1
4 1421
lucoin
24 New Member
the tickets list page likes following:
From City | To City | Price | Qty |
-- Sydney -- | London | 700 | [ 0 ] |
-- Sydney -- | Paris -- | 690 | [ 0 ] |

[Buy]
Sep 9 '07 #2
kovik
1,044 Recognized Expert Top Contributor
E-commerce isn't necessarily simple enough that you can give a brief explanation and a simple diagram, and then expect an answer. You'll need to share a bit more code and the classes you use to accomplish this. If you aren't using classes, this would be a good time to start.
Sep 9 '07 #3
Weisbartb
36 New Member
Quick and simple answer is you need to use HTML 4.0 post arrays
Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="payload[fieldname]">
  2.  
To access this after the form was submited
[PHP]
foreach($_POST['payload'] as $key => $value){
//Do your thing here
}
[/php]

As the above poster stated. E-commerce isn't something you just "wing".
Sep 10 '07 #4
lucoin
24 New Member
Quick and simple answer is you need to use HTML 4.0 post arrays
Expand|Select|Wrap|Line Numbers
  1. <input type="text" name="payload[fieldname]">
  2.  
To access this after the form was submited
[PHP]
foreach($_POST['payload'] as $key => $value){
//Do your thing here
}
[/php]

As the above poster stated. E-commerce isn't something you just "wing".
Thank you! I'll try this. what I have done before is to use a loop to get the variables. I list the textfields in order, and in the session when I want to check all the inputs, I just execute a loop.
Sep 13 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2845
by: Don Grover | last post by:
I am retrieving costs and product id's from a sql db. and need to build a shopping cart around it. How do I store the selected items and qty req so I can move into another catalog and total up as...
2
3291
by: Paul Bruneau | last post by:
Hi, I hope someone can help me make a working shopping cart, as a learning tool. If I have a "Product Demo" html page with a "Buy Me" button, there must be a simple javascript method of...
3
2911
by: help | last post by:
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...
1
1795
by: Jia Sun | last post by:
hello , everybody , i need a similar program , just like fancyimport.com if possible, pls contact me ,thank you very much . inchina@gmail.com
3
5389
by: B Love | last post by:
Hello group, this is a repost that received no responses and has since gotten burried:: I have two databases in a ssl folder on a web site. One is a shopping cart database that facilitates all...
1
3201
by: Adil Akram | last post by:
I have created a site shopping cart in ASP.net. I am using ASP session object's SessionID on non SSL connection to track session. While adding products to cart DB I insert product and SessionID...
7
2627
by: David Lozzi | last post by:
Howdy, I have a shopping cart in my arraylist. Works great for adding items but I'm displaying the shopping cart in a gridview and the user can update the qty of the items. If they set it to 0,...
1
2079
by: Vahehoo | last post by:
Hi, I have an ASP .Net e-business site that is built using DNN 2.0. I am having troubles passing my shopping cart items to PayPal. I implemented a total paynow button, but it was not good enough...
0
1507
by: Pratay | last post by:
Hi all, great forum - keep it up. The title of this post pretty much sums it up. I have a flash banner on my website with a button on it which says "view cart (0 items)". I would like this text to...
0
7135
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7410
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5650
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3215
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
774
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
440
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.