AJAX reloading


I am just trying to understand the process for AJAX updates.

For example when a product option is changed on the product details page:

What happens?

What elements get updated?

Why do they get updated?

What view's are reloaded in the background?

What javascript function manages this process?

Is there a javascript callback function after this process finishes?

Is there any specific documentation on this?

How do I control what elements get updated when an AJAX refresh occurs?



You might find this page helpful: http://docs.cs-cart.com/common.php?dispatch=docs/view&node_name=ajaxrequests

At a lower level, there is a lot more happening than is described in that doc, but it's definitely a good start. If you want to trace through the code you should look at the Ajax class (core/class.ajax.php) and the ajax JavaScript functions (ajax.js, core.js).

How to use $.ajaxRequest function to update the content of div tag?

Check this [url=“http://docs.cs-cart.com/ajaxrequests”]http://docs.cs-cart.com/ajaxrequests[/url]

A simple ex:




I hope that helps,


I was trying to add a function to the one-page checkout and I found that using .ajaxComplete() worked. So instead of using document ready just change it to document ajaxComplete and it will run the code any time an ajax request completes. I tried to contact cs-cart customer service to get help with the $.ajaxRequest method but they insisted that required custom development.

[url=“.ajaxComplete() | jQuery API Documentation”]http://api.jquery.com/ajaxComplete/[/url]

$(document).ajaxComplete(function () {
// custom js