3 Replies Latest reply on Aug 9, 2008 6:38 AM by Newsgroup_User

    Sending ShoppingCart data to a PHP script

    tan1982
      Hello all,
      I am having a flex shopping cart in the form of a datagrid. I am populating the datagrid using the dataprovider property. My question is how can i pass in the details of multiple products in the shopping cart (product name, quantity, price etc) to a PHP script when the user clicks check out, as the datagrid content is an arraycollection object. I am comfortable using HTTPService. Basically i am trying to build an ecommerce site using Flex 3. Please provide me any tutorials or code.
      Hope i am clear about my doubts.

      Please do help me out on this.

      Thanks in advance
        • 1. Re: Sending ShoppingCart data to a PHP script
          Level 7

          "tan1982" <webforumsuser@macromedia.com> wrote in message
          news:g7hlhf$mjs$1@forums.macromedia.com...
          > Hello all,
          > I am having a flex shopping cart in the form of a datagrid. I am
          > populating
          > the datagrid using the dataprovider property. My question is how can i
          > pass in
          > the details of multiple products in the shopping cart (product name,
          > quantity,
          > price etc) to a PHP script when the user clicks check out, as the datagrid
          > content is an arraycollection object. I am comfortable using HTTPService.
          > Basically i am trying to build an ecommerce site using Flex 3. Please
          > provide
          > me any tutorials or code.
          > Hope i am clear about my doubts.
          >
          > Please do help me out on this.
          >
          > Thanks in advance
          >
          > <mx:DataGrid id="cartView" width="100%" height="100%"
          > draggableColumns="false"
          > editable="true" dataProvider="{cart.aItems}" variableRowHeight="true">
          > <mx:columns>
          > <mx:DataGridColumn headerText="Product" dataField="product"
          > editable="false" itemRenderer="itemrenderers.ShoppingCartProduct" />
          > <mx:DataGridColumn headerText="Quantity" dataField="quantity"
          > itemEditor="mx.controls.NumericStepper" editorDataField="value"
          > editable="true"
          > />
          > <mx:DataGridColumn headerText="Amount" dataField="subtotal"
          > labelFunction="renderPriceLabel" editable="false" />
          > </mx:columns>
          > </mx:DataGrid>

          The Flex 3 Training From the Source book walks you through creating a
          shopping cart.

          HTH;

          Amy


          • 2. Re: Sending ShoppingCart data to a PHP script
            tan1982 Level 1
            Thanks for your reply Amy.
            As i said i am using PHP as my server side language. But the book you referred is ColdFusion specific. It will be helpful if u suggest me a good PHP specific resource.

            Thanks again
            • 3. Re: Sending ShoppingCart data to a PHP script
              Level 7

              "tan1982" <webforumsuser@macromedia.com> wrote in message
              news:g7j9j2$gd1$1@forums.macromedia.com...
              > Thanks for your reply Amy.
              > As i said i am using PHP as my server side language. But the book you
              > referred
              > is ColdFusion specific. It will be helpful if u suggest me a good PHP
              > specific
              > resource.

              Oh, I'm sorry. I assumed you already knew PHP. Any good PHP website should
              be able to tell you how to build a PHP script to save the transaction. From
              the Flex side, the communication is pretty much the same.

              HTH;

              Amy