473,805 Members | 2,003 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 1449
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
2870
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 im going. Just a couple of hints will do, Im familiar with vb script but not java based code , and im wondering how to store what they select so I can move around different product ranges. Don
2
3319
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 storing the necessary product information. There could be several fields involved... Then there ought to be another javascript method that can create a new document based on the list a user has built selecting product from several
3
2927
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 code what i need. Please please please could someone please provide me with help, or coding on how to add item details into a basket record, once the user clicks the add to basket link. *** Sent via Developersdex http://www.developersdex.com...
1
1823
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
5405
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 transactions. The other database is used to modify product offering. One table in the Product database is typically exported to the shopping cart database to update product offering. I have only ever constructed databases with one user in mind, but...
1
3232
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 in table. All products and cart status pages are on non SSL connection. On checkout to get secure user information I shifted connection to SSL but when shifting to SSL, the SessionID changed (As is this is default behavior of IIS to prevent...
7
2645
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, then I want to remove it. I'm doing the following script: For Each ele In bag Dim qty As Integer = CType(gvBag.Rows.Item(cnt).FindControl("txtQty"),
1
2108
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 for my customer. I found some PayPal ASP.Net controls to be used with .net studio. Basically, I want the user to be able to shop on my website, add items to my shopping cart and at the checkout to be taken to the PayPal website. I would like...
0
1534
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 correctly reflect the number of items in my shopping cart. My website is here: www.kissdvdtemplates.com. The shopping cart system I'm using is Zen Cart. I have managed to self teach myself the basics of flash but this could be a bit tricky! ...
0
10609
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10360
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10366
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9185
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5542
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4323
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 we have to send another system
3
3007
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.