Forums / General Questions / Add items to shopping cart from Flash ?

Add items to shopping cart from Flash ?

Locked

Views: 2,750

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
2 Aug 2007, 7:19 PM
#1
fatalparadox avatar

fatalparadox

New Zenner

Join Date:
Apr 2007
Posts:
12
Plugin Contributions:
0

Add items to shopping cart from Flash ?

I need to add an item to the shopping cart from a flash file.
Any ideas on what to use within my getURL statement ?

ZenCart Newbie :lookaroun Here sorry.

2 Aug 2007, 8:46 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Add items to shopping cart from Flash ?

You'll need to tell your flash app to POST the products_id and cart_quantity to your Zen Cart product page, with &action=add_product on the URL.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

5 Aug 2007, 6:33 PM
#3
fatalparadox avatar

fatalparadox

New Zenner

Join Date:
Apr 2007
Posts:
12
Plugin Contributions:
0

Re: Add items to shopping cart from Flash ?

I understand what you mean, but I do not know the full URL I would use.

My customers site is:

https://www.lillyscollection.com/ZeCart/

Thanks for your help !

5 Aug 2007, 6:49 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Add items to shopping cart from Flash ?

Your client's images are in desperate need of optimization. At circa 2MB each, they are roughly 1,000 times the size thumbnails should be and thus take 1,000 times the time to load and 1,000 times both your client's and their visitors bandwidth to be viewed.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

5 Aug 2007, 7:07 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Add items to shopping cart from Flash ?

DrByte:

You'll need to tell your flash app to POST the products_id and cart_quantity to your Zen Cart product page, with &action=add_product on the URL.

fatalparadox:

The URL I am using to try and add things to the shopping cart from flash is:

http://www.lillyscollection.com/ZenCart/index.php?main_page=shopping_cart&action=add_product&product_id=12&quanity=1

Doesn't work though :no:

You need to POST the values, not pass them on the URL as GET values. Only the action belongs in the URL.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

5 Aug 2007, 8:43 PM
#7
fatalparadox avatar

fatalparadox

New Zenner

Join Date:
Apr 2007
Posts:
12
Plugin Contributions:
0

Re: Add items to shopping cart from Flash ?

Sorry I don't understand. Could you give me an example ?

5 Aug 2007, 9:50 PM
#8
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Add items to shopping cart from Flash ?

I'd recommend that you look at some of the product listing pages and product_info page to get a sense of the sort of data that needs to be passed in the URL. In particular note that the page is generally product_info rather than shopping cart. Zen Cart will determine for itself (based on an Admin switch) whether it is appropriate to invoke the shopping cart after adding items to it, or whether it should go onto the page that you specify.

However, DrByte's point is that even if you get all the parameters passed in the URL correct, that won't be sufficient. You will still need to pass the cart_quantity and products_id via the $_POST variable (please note that "s" in products_id).

Not being a Flash expert, I can't tell you how to do this, or even whether it can be done (though I would be very surprised if it couldn't).

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

6 Aug 2007, 2:08 AM
#9
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,680
Plugin Contributions:
0

Re: Add items to shopping cart from Flash ?

And this is probably a silly question, but why do you think you need to use the flash?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

6 Aug 2007, 1:20 PM
#10
fatalparadox avatar

fatalparadox

New Zenner

Join Date:
Apr 2007
Posts:
12
Plugin Contributions:
0

Re: Add items to shopping cart from Flash ?

We are building a Build-A-Bag section that is designed in Flash, the customer chooses a bag, uploads their picture and it emails the design to the client. It also needs to add a custom bag to the shopping cart.

6 Aug 2007, 10:57 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Add items to shopping cart from Flash ?

hint: LoadVars

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.