11 replies [Last post]
horizens's picture
Offline
Joined: 11/12/2007
Juice: 8
Was this information Helpful?

Hi, I've built many Flash sites using Drupal as the CMS with the Services and AMFPHP modules. Would it be possible to build a Flash frontend for an Ubercart store? Has anyone tried it? The only part I'm wrestling with is how to trigger adding items to the cart and then displaying the cart in Flash. Since each product is a node and Uber uses taxonomy, I can display the products just fine. Any thoughts or suggestions would be very welcome.

Thanks!

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Flash frontend?

I'd say built it in Flex and AS3, if you can. Probably would be your best option Smiling

Some Adobe talk about it:http://drupal.org/node/177266

FYI we're going to be writing a part of our site in Flex, not with a Cart system but a lot of user interaction. It's basically an online video editor that'll allow users to record audio and put down their own commentary track, along with using content created by us.

--
Help directly fund development: Donate via PayPal!

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Flash frontend?

Not sure what it would require to display the cart... if you can even use the pages Ubercart defines. You can use the Cart Links API to have URLs that work as add to cart and empty cart buttons, though.

GreyHawk's picture
Offline
Joined: 03/17/2009
Juice: 174
You may find these links interesting

Here's some links re: Drupal and Flash interaction via services:

http://thanksfornotsuing.com/discussion/flash-integration-drupal-6

http://www.dpdk.nl/opensource/drupalservice-as-a-bridge-between-flash-an...

I've got a project where the client wants to register people for a convention and trade show using the same form (same look and feel) as the PDF they use for manual registration, so I'm trying to develop it using help from the guy in the first link.

I'll keep you informed.

jrowny's picture
Offline
Joined: 01/08/2009
Juice: 297
Re: You may find these links interesting

I've written a few apps that are Flex + Drupal but never one with Ubercart. Basically, everything needs to be done with the services module and it is incredibly slow via the amfphp module. Exposing things as services is not really that hard, fortunately.

Flex and flash are terrible front ends for stores. They are slow, inaccessible, and have no power in search engines. I use Flex mostly for apps that would normal run on the desktop but need to be run from anywhere without install.

I've been a Flex developer for a long time and I've come to LOVE AS3 but HATE Flex.

GreyHawk's picture
Offline
Joined: 03/17/2009
Juice: 174
In my particular usage case...

For my particular usage case, only the registration product(s) have a Flash front-end to ensure that the entry form is effectively the same PDF form that the users see if they decide to manually register via downloaded PDF. Flash enables the registration to ensure some good validation...

...tho I'm told it's adding unnecessary complexity, and that there may be options worth exploring for next year that could deliver the desired look & feel with better performance and less overall complexity (fewer layers/components).

jaffa55 (not verified)
jaffa55's picture
Re: In my particular usage case...

It becomes a lot more urgent when using open wireless access points or badly secured access points. Also people with access to network equipment in the same building can easily eavesdrop the traffic. Thanks.
Regards,
caautoquote.com

luckyj (not verified)
jaffa55's picture
hello

You can display Flash at any location by editing the design files (PHP). Just make sure the dimension (width) of your Flash movie fits your template design.

PHP Developer

angelinajohn (not verified)
jaffa55's picture
Angelina

Your answer is really very very good and informative, hats off to you, great job.

rakesh's picture
Offline
Joined: 07/19/2010
Juice: 24
Re: Flash frontend?

Yes you can do that http://www.sponsoredbyanything.com/node/341 in developed this site and initially home page was in flex and after creating shirt will show the cart . But flex is not supported by ipad or mobiles so we switched to HTML5.

robbertnl's picture
Offline
Joined: 09/02/2011
Juice: 5
Re: Re: Flash frontend?

I want to do exactly the same: Flex frontend for customizing Ubercart products in Drupal.
Do you have a starting point for me (and for future readers)? Or some directions / suggestions?

rakesh's picture
Offline
Joined: 07/19/2010
Juice: 24
Re: Flash frontend?

Hi Horizens,

Yes you can do that . i am assuming that you want to display products in flex and then from flex to add cart functionality Right?

for that first you have to make a service which will be called by your flex , it will return the data from products in either in xml or json in which you want(we use XML because ite easy to manage xml in flex). you need to create a view on you root (themes root insite sites/all/themes/theme) here you will do all the data fectching functionality which will be returned to flex. flex will call this view to get the products data.

After you show the products in flex you would like to add to cart functionality. for that you have to make a custom module unser sites/all/module/custom_cart.In custom_cart.module file you will add two methods as

/**
* Define access permission to custom_cart.
*/
function custom_cart_perm() {
return array('access custom_cart');
}

/**
* Create URL for Service to be called by Flex Application.
*/

function custom_cart_menu() {
$items = array();

$items['custom_cart'] = array(
'title' => 'Flex Service',
'description' => 'Configure the cart settings.',
'page callback' => 'custom_cart_add_item',
'access arguments' => array('access custom_cart'),
'type' => MENU_CALLBACK,
);
return $items;
}

when you click on add to cart buttom this function will be called .another function will be

/**
* This hook_add_item() adds an item to current shopping cart.
*/
function custom_cart_add_item()
{

$custom_data = variable_get('cart_info', '');
$nid = $custom_data['product_id'];

if (module_exists('uc_product') && $custom_data) {
$data_status = array(
'values' => array(
'nid'=>$nid,
)
);

uc_catalog_buy_it_now_form_submit($data_status,$data_status);
$msg = drupal_get_messages('error');

if(count($msg)>0) {
return false;
}
else {
return true;
}
}
else
{
drupal_goto();
exit;
}

}

this function will add the product to your cart .

hope this will help you.

Thanks
Rakesh kumar