View Single Post
  #8  
Old 09-14-2012, 07:35 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: ajax add to cart button

**Edited**
Yes, it is a function somewhere. In /common_files/js/ajax.add2cart.js on line 51:
PHP Code:
// Widget
ajax.widgets.add2cart = function(form) {
  if (!
form || typeof(form.tagName) == 'undefined' || !form.tagName || form.tagName.toUpperCase() != 'FORM')
    return 
false;

  if (!
form.add2cartWidget) {
    new 
ajax.widgets.add2cart.obj(form);
  }

  return 
form.add2cartWidget.add2cart();

You can tell this by looking at the onclick in the example I gave you.

Now, in order to further demonstrate, I have updated (temporarily!) my test site to display exactly what you want in full working order. There is a simple link with onclick to add to cart. Works with Qty and options just fine. http://trainingpen.com/manufacturers_carousel/product.php?productid=17551

**Edited**
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote