Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Very Simple Shopping Cart

$
0
0

Hi. I am trying to understand how to use a very simple shopping cart in Cold Fusion, but am having a hard time. I've tried looking at information on web sites, but they all use a script like this below that fills in the info. into a cart.

 

<cfscript>

CartItems=4;

Cart = ArrayNew(1);

for ( i=1; i LE cartItems; i=i+1)

    Cart[i]=StructNew();

    Cart[i].ID=i;

    Cart[i].Name="Product " & i;

    Cart[i].SKU=i*100+(2*i*10)+(3*i);

    Cart[i].Qty=3*i-2;

}

</cfscript>

 

I would rather use my own form that outputs info. into a table to display to the user and this table could be used as a shopping cart. I've created this very simple form below. Can someone please show me an example of how to make this form into a shopping cart so I can add, update, and delete the items in it? Thank you.

 

Andy


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>