Forums / General Questions / AJAX Requests - how to return just data with no template?

AJAX Requests - how to return just data with no template?

Locked

Views: 1,091

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
29 Nov 2007, 3:25 PM
#1
moltar avatar

moltar

New Zenner

Join Date:
May 2007
Posts:
43
Plugin Contributions:
0

AJAX Requests - how to return just data with no template?

I am trying to add stock checking feature upon "Add to Cart" button click. I want to use AJAX.

I know how to do all the JavaScript stuff, but I am just not sure how to return values from Zen Cart without templates? Ideally I'd like to have a separate file that I can send requests to, but have ability to use ZC internal functions from that file. How can this be done?

Thank you!

29 Nov 2007, 3:41 PM
#2
jaycode avatar

jaycode

Zen Follower

Join Date:
Jun 2007
Location:
Australia - Melbourne
Posts:
306
Plugin Contributions:
1

Re: AJAX Requests - how to return just data with no template?

Hi Moltar, I was having the same problem with you, I handled that problem by creating all of my AJAX servers (the php files) on a separate folder "AJAX Servers" located at the root folder.

You might want to check on my article here too: Implementing AJAX in Zen-Cart dillema

My module "AJAX Image Swapper Basic" is using AJAX, you might want to learn the structure from there, feel free to use the same structure - I have made that IE & Firefox compatible (which was a HELLISH job to do btw)

The greatest pleasure in life is doing what people say you cannot do.

Check on www.WebExtremeCustomiser.com for my modules (free contribution):
AJAX Image Swapper
AJAX Banner Swapper
Fixed Navigation

29 Nov 2007, 3:59 PM
#3
jaycode avatar

jaycode

Zen Follower

Join Date:
Jun 2007
Location:
Australia - Melbourne
Posts:
306
Plugin Contributions:
1

Re: AJAX Requests - how to return just data with no template?

moltar:

have ability to use ZC internal functions from that file. How can this be done?

require the application_top.php file from that file that should handle it. and see point 1 from my article too.

The greatest pleasure in life is doing what people say you cannot do.

Check on www.WebExtremeCustomiser.com for my modules (free contribution):
AJAX Image Swapper
AJAX Banner Swapper
Fixed Navigation