Forums / General Questions / How do I add items to the basket via AJAX (no page reload)

How do I add items to the basket via AJAX (no page reload)

Locked

Views: 2,972

Results 1 to 11 of 11
This thread is locked. New replies are disabled.
5 Dec 2007, 4:16 PM
#1
dgeere avatar

dgeere

New Zenner

Join Date:
Dec 2007
Posts:
24
Plugin Contributions:
0

How do I add items to the basket via AJAX (no page reload)

Hey all, kind of says it all in the title. :)

I want users to view list of products
When they click on buy button it adds the item to the cart
But it does NOT reload the page, it just adds it and alerts them that it was done. :)

Any help would be magical :)

New Hacked Up Zen : YumBadges.com

6 Dec 2007, 9:36 AM
#2
dgeere avatar

dgeere

New Zenner

Join Date:
Dec 2007
Posts:
24
Plugin Contributions:
0

Re: How do I add items to the basket via AJAX (no page reload)

Anyone at all? :)

New Hacked Up Zen : YumBadges.com

6 Dec 2007, 9:56 AM
#3
banswidthjunkie avatar

banswidthjunkie

Zen Follower

Join Date:
Nov 2007
Posts:
167
Plugin Contributions:
1

Re: How do I add items to the basket via AJAX (no page reload)

dgeere:

Anyone at all? :)
You can probably do even better with this: demos.mootools.net/Drag.Cart

I am thinking of coding an AJAX cart, but not sure that I will make it a downloadable mod, al least not in the foreseeable future. Looks like you are going to have to get your hands (very) dirty.

My ZenCart Mods: Define Pages Generator | Fual Slimbox (Lightbox)
A site I did for a mate: http://richard-moon.co.uk/

6 Dec 2007, 10:08 AM
#4
dgeere avatar

dgeere

New Zenner

Join Date:
Dec 2007
Posts:
24
Plugin Contributions:
0

Re: How do I add items to the basket via AJAX (no page reload)

Thanks, have seen that, but I specifically want to keep the functionality as "click" "adds to cart". :)

The drag cart is nice, but not suitable for my new store.

Any help on submitting the "buy" click via ajax instead of by reloading the page would be helpful :)

Thanks for taking the time to reply though :)

New Hacked Up Zen : YumBadges.com

6 Dec 2007, 10:23 AM
#5
banswidthjunkie avatar

banswidthjunkie

Zen Follower

Join Date:
Nov 2007
Posts:
167
Plugin Contributions:
1

Re: How do I add items to the basket via AJAX (no page reload)

Mootools has an ajax library, so you could probably use that. I cant promise it will be pretty though. (Actually I can promise it will be a royal pain in the ######)

My ZenCart Mods: Define Pages Generator | Fual Slimbox (Lightbox)
A site I did for a mate: http://richard-moon.co.uk/

6 Dec 2007, 10:25 AM
#6
dgeere avatar

dgeere

New Zenner

Join Date:
Dec 2007
Posts:
24
Plugin Contributions:
0

Re: How do I add items to the basket via AJAX (no page reload)

Yeah, I have found a few sets of ajax library code, but not being a code makes it remarkably difficult for me to implement :) eheh

Perhaps someone can point me in the direction of someone that I can pay to help code this in? As I see it, its a forum submit that goes via ajax and that's it :)

New Hacked Up Zen : YumBadges.com

6 Dec 2007, 10:25 AM
#7
dgeere avatar

dgeere

New Zenner

Join Date:
Dec 2007
Posts:
24
Plugin Contributions:
0

Re: How do I add items to the basket via AJAX (no page reload)

Hell, perhaps I will just use an iframe :)

New Hacked Up Zen : YumBadges.com

6 Dec 2007, 2:31 PM
#8
dgeere avatar

dgeere

New Zenner

Join Date:
Dec 2007
Posts:
24
Plugin Contributions:
0

Re: How do I add items to the basket via AJAX (no page reload)

But of course, anyone that does actually know is welcome to help me :)

New Hacked Up Zen : YumBadges.com

6 Dec 2007, 3:03 PM
#9
dgeere avatar

dgeere

New Zenner

Join Date:
Dec 2007
Posts:
24
Plugin Contributions:
0

Re: How do I add items to the basket via AJAX (no page reload)

How about this script?

"http://www.malsup.com/jquery/form/#getting-started"

Seems pretty straight forward? :)

New Hacked Up Zen : YumBadges.com

6 Dec 2007, 5:01 PM
#10
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: How do I add items to the basket via AJAX (no page reload)

If you want to hire someone to do this properly, you can post in the Commercial Help Wanted forum here.

Sorry I can't say anything about AJAX.