5 Replies Latest reply on Feb 8, 2010 4:29 PM by kglad

    XML email help......

    baz66 Level 1
      Hi,

       

      I have an XML flash cart for my flash site, but i'm trying to use it as a quoting system instead of purchasing. The customer adds to the quote (cart) where everything adds up like a cart but instead of payment i want it to email me the quote details for a follow up. Similar to an email form.

       

      I'm using PHP to send it and it sends all the details but it isn't legable. Here's an example of what it sends;

       

      amount%5F1=29%2E95&item%5Fname%5F1=%27THE%20BLUES% 27%20CD&quantity%5F1=1&upload=1&cmd=%5Fcart

       

      So the amount, product name and price are all there but it has all the other characters in between.

       

      Is this a ignoreWhite problem?

       


      I'm a flash Newbie, so I'd really appreciate your advise
        • 1. Re: XML email help......
          kglad Adobe Community Professional & MVP

          that's a url-encoded string.

           

          to remedy, you should be using loadvars to send data to call your php.

          1 person found this helpful
          • 2. Re: XML email help......
            baz66 Level 1

            Thanks kglad

             

            Here's my actionscript, i've used the LoadVars, but maybe i've done it wrong?

             

             

            function purchase() {
            quote = new LoadVars();
            quote.cmd = "_cart";
            quote.upload = "1";
            var receiveLoad:LoadVars = new LoadVars();
            var sendLoad:LoadVars = new LoadVars();


            for (n=0; n<cart.length && n<21; n++) {
              quote["quantity_"+(n+1)] = cart[n].qty;
              quote["item_name_"+(n+1)] = cart[n].name;
              quote["amount_"+(n+1)] = cart[n].price;
             
              }
             
               sendLoad.quote = quote;
              sendLoad.sendAndLoad("send.php",receiveLoad);
              trace(quote);
            }

            _root.orderform.submit.onRelease = purchase;

            • 3. Re: XML email help......
              kglad Adobe Community Professional & MVP

              if your php is using POST, try:

               


               

               

              function purchase() {
              quote = new LoadVars();
              quote.cmd = "_cart";
              quote.upload = "1";
              var receiveLoad:LoadVars = new LoadVars();
              var sendLoad:LoadVars = new LoadVars();


              for (n=0; n<cart.length && n<21; n++) {
                quote["quantity_"+(n+1)] = cart[n].qty;
                quote["item_name_"+(n+1)] = cart[n].name;
                quote["amount_"+(n+1)] = cart[n].price;
               
                }
               
                 sendLoad.quote = quote;
                sendLoad.sendAndLoad("send.php",receiveLoad,"POST");  // or use "GET", if expected by your php
                trace(quote);
              }

              _root.orderform.submit.onRelease = purchase;

              • 4. Re: XML email help......
                baz66 Level 1

                Thanks kglad,

                 

                POST didn't work for me, but i ended up solving it by using urldecode in my php.

                 

                 

                Cheers for ur help.

                • 5. Re: XML email help......
                  kglad Adobe Community Professional & MVP

                  you're welcome.