# Shopping Cart

**URL:** <https://forum.kirupa.com/t/shopping-cart/539>\
**Category:** flash\
**Created:** [July 22, 2002, 5:16am UTC](https://forum.kirupa.com/t/shopping-cart/539 "2002-07-22T05:16:53Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![gordian](https://avatars.discourse-cdn.com/v4/letter/g/7ab992/32.png) [@gordian](https://forum.kirupa.com/u/gordian)\
**Post date:** [July 22, 2002, 5:16am UTC](https://forum.kirupa.com/t/shopping-cart/539/1 "2002-07-22T05:16:53Z")

</div>

Hi,

I would like to build a shopping cart in flash Mx, can you guys give me an idea how to go about doing it?

My catalog of the product has already been done and  
now my problem is to allow user to add/del the item to the shopping cart and calculate the total purchase amount.

my catalog details are all dynamically loaded from the database, The description and price are 2 different variable.

what I do now is to send the price into a dynamic text box say “price” and the description to another dynamic text area called “info” when user select the item, I am able to add them correctly but how am I going to know how much to substract from the total “price” when the item is remove from the shopping cart?  
There is already no linkage between the item description and the price!!

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 23, 2002, 3:09am UTC](https://forum.kirupa.com/t/shopping-cart/539/2 "2002-07-23T03:09:12Z")

</div>

no one got any solution? or I did not explain myself clearly?  
Let me know…

Thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2002, 3:35am UTC](https://forum.kirupa.com/t/shopping-cart/539/3 "2002-07-25T03:35:10Z")

</div>

if I were to use array to collect the data…

the data I need are the file ID, the description and the price

I am not very good with array…

Question is

1. how do I create an array that collect the above set of data

2. and how do I make use of the price column to do a total calculation

3. can I simply remove a row of data from the array, so that when the user remove the item… the total will be affected accordingly

All help is greatly appreciated.

🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2002, 12:34pm UTC](https://forum.kirupa.com/t/shopping-cart/539/4 "2002-07-25T12:34:22Z")

</div>

see my post… [http://www.kirupaforum.com/showthread.php?s=&threadid=1187](http://www.kirupaforum.com/showthread.php?s=&threadid=1187)

although they are being used in a completely different way, i think we’re both needing about the same code. maybe the reply i got will help you out too.

matt

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2002, 3:37pm UTC](https://forum.kirupa.com/t/shopping-cart/539/5 "2002-07-25T15:37:42Z")

</div>

thanks…

will try it out…

=)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2002, 7:58pm UTC](https://forum.kirupa.com/t/shopping-cart/539/6 "2002-07-25T19:58:23Z")

</div>

Would the fla for [THIS](http://eyezberg.free.fr/downloads/flashDOWNLOAD.html) help you? (uses text files, no db…)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 25, 2002, 11:09pm UTC](https://forum.kirupa.com/t/shopping-cart/539/7 "2002-07-25T23:09:07Z")

</div>

well i don’t know if it would help gordian out, but the fla for that whole download cart deal would help me out a lot. please upload if you would be so kind.

matt

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2002, 2:44am UTC](https://forum.kirupa.com/t/shopping-cart/539/8 "2002-07-26T02:44:08Z")

</div>

looks like what I want…could you kindly guide me on how you create the cart itself…or provide me with a sample on the cart creation…

:rambo:

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 26, 2002, 10:10pm UTC](https://forum.kirupa.com/t/shopping-cart/539/9 "2002-07-26T22:10:45Z")

</div>

Sorry, hadn’t read this sooner…  
Cart is based on sourcecodes available with the book  
“Flash site workshop” (Sams)  
just added/changed a few things…  
I’ll try and find my fla, else I’ll upload the original piece…  
just gimme a day or two… 😉

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 28, 2002, 7:36am UTC](https://forum.kirupa.com/t/shopping-cart/539/10 "2002-07-28T07:36:35Z")

</div>

ok…thanks…
