Oct 21 2009

Using PHP Data Services in Flex 4 with Shopping Cart

Published by at 11:25 am under Flex,Work Examples

I was at Adobe Max this year and Using PHP Data services with Flex was one of the sessions i attended. It was a very informative one and showed how one needs to do very little work to use remoting with PHP.

Flex 4 has some powerful wizards to use data services and it makes it lot easier to get data into Flash. The value objects are created for you and all the heavy lifting is done by Flex.

It uses Zend Framework for remoting but the best part is you don’t have to write any php code, only some MySQL queries to get the required data.


This is not a tutorial but a working example of how i was able to connect a Zen Cart database with my Flex Application and it took me less than a day to get this working, the main part was spent of learning the zen cart db structure and then writing the MySQL query to get the products list. I am sure any shopping cart can be easily connected.


To have little more fun with it, i also threw in the layout managers which come with Flex 4 and demonstrated how easy it is to change the look and feel of your application. I am not a designer but using Flash Catalyst one can easily make this application very visually appealing too.

http://nayansavla.com/zen/flex-output/zen.html This is the Flex application which pulls in the products from the zen cart.

http://nayansavla.com/zen/ This is the HTML default version which comes with the Zen Cart.

http://nayansavla.com/zen/admin admin/admin if you want to change the products and then see them update in the Flex application.

This was very easy to accomplish, i am not going to share the code sorry. The Flex 4 data services makes it so easy todevelop a CRUD system.

Edit: I have rebuilt my server so the html version of zen cart doesn’t work need to update it. But the flex works.

5 responses so far

5 Responses to “Using PHP Data Services in Flex 4 with Shopping Cart”

  1. Deckyon 06 Mar 2010 at 4:29 am

    I understand why you don’t share the code…must be horrible (slow pulling, awsome interface…)

    Well, not much help from yours…in these cases, why don`t you forget to share posts?

  2. Nayanon 08 Mar 2010 at 7:11 am

    most of the code is auto generated by flex data wizards, this post just shows you an example of how you can construct carts from popular shopping cart.

  3. Jameson 22 Aug 2010 at 10:28 am

    Nayan, everyone already knew that flex can communicate with back end technologies. that is nothing new. Other people could have benefited from your time spent at Adobe Max, the same way you have benefited from time spent by other peoples research on the Internet. Your article almost comes off as being arrogant by not posting the code.

  4. Drewon 10 Nov 2010 at 3:22 pm

    @Ducky & James: Why you guys gotta hate? Just because you are both too lazy to write a lick of code or use some wizards in Flash Builder – YOU guys are the arrogant ones. Thanks for sharing your experience Nayan.

  5. alancoryon 19 Jul 2011 at 11:59 pm

    Thanks for the Post, thanks for your useful Post. I will come back later !Php Shopping Cart

Trackback URI | Comments RSS

Leave a Reply