X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   documentation on core.microhandlers.* (https://forum.x-cart.com/showthread.php?t=73417)

Scott Godin 01-14-2016 01:16 PM

documentation on core.microhandlers.*
 
so it's been a while since XC 5 debuted and I would be interested to know whether there has been any new and detailed documentation made available on this feature so that we can start learning how to use it properly.

qualiteam 01-19-2016 10:58 AM

Re: documentation on core.microhandlers.*
 
There is no documentation on the function, but the usage is pretty simple:
Code:

core.microhandlers.add(
  'Your unique handler name',
  'jQuery selector',
  function (event) {
    // Your function goes there
  }
);


Use it in your .js files loaded through the getJSFiles() method.

Every time X-Cart 5 loads a page or inserts an AJAX result into the page it looks through added jQuery selectors and runs handler functions configured for matching microhandlers.

Scott Godin 01-19-2016 12:19 PM

Re: documentation on core.microhandlers.*
 
well here's hoping we get some writeups of real-world example usages and ways to leverage this, soon, because while I understand and am familiar with every word you used, I understood about half of what you meant when you put them in that order, in such a way that I can immediately turn around and start using it intelligently. :-)


All times are GMT -8. The time now is 08:00 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.