Skip to content
Snippets Groups Projects
Commit 3971e1d4 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

Add API doc

parent b0ecad43
Branches
No related tags found
No related merge requests found
OpenTools Ordernumber Library
=============================
API functions:
~~~~~~~~~~~~~~
-) registerCallback($callback, $func)
-) createNumber($fmt, $type, $order, $customvars, $ctrsettings)
-) createJSSetup()
-) custom_variables_create_table($id, $variables)
-) counter_modification_create_table($type, $counters)
-) setFlag($flag, $value)
-) unsetFlag($flag)
-) getFlag($flag, $default)
Flags:
~~~~~~
-) 'extract-counter-settings': Allow the counter to include padding, increment, reset or not; e.g. [#####:100/15]
E-commerce specific functions (to be overridden in child classes!):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-) __($string) // or use the translate callback for your own function!
-) urlPath($type, $filename) // If not overridden, callback is used
-) getAllCounters($type)
-) getCounter($type, $countername, $default)
-) setCounter($type, $countername, $value)
-) addCustomJS(&$json)
-) appendJS() // Add e-commerce-specific JS code
Callback functions:
~~~~~~~~~~~~~~~~~~~
-) translate($message)
-) urlPath($type, $filename)
-) getCounter($type, $countername, $default)
-) setCounter($type, $countername, $value)
-) setupDateTimeReplacements(&$reps, $details, $nrtype);
-) setupStoreReplacements(&$reps, $details, $nrtype);
-) setupOrderReplacements(&$reps, $details, $nrtype);
-) setupUserReplacements(&$reps, $details, $nrtype);
-) setupShippingReplacements(&$reps, $details, $nrtype);
-) setupThirdPartyReplacements(&$reps, $details, $nrtype);
E-commerce specific members of the helper class (to be set in child classes!):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-) $_styles[...]: CSS styles for the HTML tables. Possible keys:
o) 'counter-table-class'
o) 'counter-table-style'
o) 'variable-table-class'
o) 'variable-table-style'
-) $ajax_url: The URL for the AJAX calls
AJAX modifications (JS):
~~~~~~~~~~~~~~~~~~~~~~~~
-) ajax_ordernumber.updateMessages: Show messages generated during AJAX calls
-) ajax_ordernumber.parseAjaxResponse: Parse the AJAX return value to JSON; only if the default does not work
-) ajax_ordernumber.modifyAjaxArgs: Modify the arguments sent in the AJAX call (e.g. if text format instead of json is requested, etc)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment