Wonder if somebody could help me build a simple and easy 'shopping cart' like function for my software using studio 3.5.
Users will be able to select various mobile phone accessories from my application. I want to make it so that when a user highlights their chosen accessory they are then to click the 'add to cart' button, and for their selection to then be displayed in a 'list'.
Users will be able to add as many accessories as they like but for the life of me cannot work out the best way or best scrypt that tells runrev to add selections to a 'list' when 'add to cart' button is pressed.
It's easy to create the scrypt that adds one but how do you make it so that when another accessory is added that it displays directly under the previous selection? And also how to delete one of the lines?
Could someone guide me in the right direction? I heard the Data grid could be useful for this as long as the coding is simple.
Thanks
Dan
Shopping cart
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi Dan,
I have no clue of what your stack currently looks like, which makes it difficult to help you solve any specific problems. For example, you are you going to use a credit card merchant account or will you use PayPal or a similar solution?
You can provide a list to select items for, by creating a list field. Set the multipleHilite, the nonContiguousHilite and the toggleHilites of the field to true in the property inspector.
You can retrieve a list of selected items with the following line:
Now you can do whatever you need to submit this list to your payment system.
Best,
Mark
I have no clue of what your stack currently looks like, which makes it difficult to help you solve any specific problems. For example, you are you going to use a credit card merchant account or will you use PayPal or a similar solution?
You can provide a list to select items for, by creating a list field. Set the multipleHilite, the nonContiguousHilite and the toggleHilites of the field to true in the property inspector.
You can retrieve a list of selected items with the following line:
Code: Select all
put the selectedText of fld <name of your field>
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode