free website templates

Learn the Web Module api in a blink of an eye!

Making your own Base Module



Every module requires the structure like so:

Mymodulename-withoutspaces folder

in that folder put a file called module.php
in that module.php we need some information
in this case we need 4 functions that return information about the module:
Indentify,requirements,description,version
They need to return their info
For intentify its the module name
For requirements its the required module names seperated with , if no requirements are needed leave it emty and return an empty string
For description its a single line description of your module
And last for Version its the version number string of your module

Bit messy? take a look at our example below: 
EXAMPLE 1 CLICK HERE

Adding functions

Great now on to the functionality!
The module system is devided into multiple types
order
sale
are the first ones implemented.
they are send with their values to the api in JSON.
The api sends every module the JSON date gotten from the webreporter.
For your module we need to know which data it needs.
So if you wanna show order information as soon as a order is made use order as type and if you wanna catch any sale you make use sale as type
See the snipped examples below to see what i ment with this:
EXAMPLE 1 CLICK HERE
EXAMPLE 2 CLICK HERE

Very Good!

Now you basically know how to use the system the last thing you need to know are the responce values use the table below as a guide the rest is up to you.
Think about the possibilities like entering stuff in a database emailing information and much much more!
See the api guide Below for more info :)

Functions Module API

PLAYER

Type: String
Returns player name
Category: ORDER

COST

Type: Double (in string format)
Returns Order Price
Category: ORDER

PRODUCTS

Type: String List ( Seperated by , )
Returns the products bought in this order
Category: ORDER

STYPE

type: STRING
Returns the sales type either Store for storewide or Category name the sale is on
Category: SALE

VALUE

Type: Integer
Returns the percent of the sale
Category: SALE

SALE

Type: String
Returns the raw combined version of the STYPE and VALUE values.
Category: SALE

© Copyright 2018-2019 MCGSoft- All Rights Reserved