Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Ordernumber Library
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open Tools
Ordernumber Library
Commits
3971e1d4
Commit
3971e1d4
authored
8 years ago
by
Reinhold Kainhofer
Browse files
Options
Downloads
Patches
Plain Diff
Add API doc
parent
b0ecad43
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
OpenTools_Ordernumber_Framework_API.txt
+59
-0
59 additions, 0 deletions
OpenTools_Ordernumber_Framework_API.txt
with
59 additions
and
0 deletions
OpenTools_Ordernumber_Framework_API.txt
0 → 100644
+
59
−
0
View file @
3971e1d4
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)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment