//2 Do the action //3 Retrieve the data //4 Show the data on screen include_once 'app/Config/database.php'; include_once 'lang/langs.php'; include_once 'functions.php'; include 'myshopRequest.php'; /* Set your private key for this plugin here */ $privateKey = '6db7415ddebd2e9842022f71cccda46c485b8f40-1f4553e62e36e693c61a8aeea4e93a575caf9de8'; /* Set base location / path for this plugin */ $baseLocation = '/connections/statistics404/'; /* Base string for the body */ $body = ''; //1 Get the parameters and the action-parameters //* Create MyshopRequest instance */ $myshopRequest = new MyshopRequest($privateKey); //XMLtextClean is only used to get the editlang. $XMLtext = @file_get_contents('php://input'); $XMLtextClean = str_replace("<![CDATA[", "", str_replace("]]>", "", $XMLtext)); /* Get state variables */ $stateVariables = $myshopRequest->getStates(); // Returns associative array with all state variables $pluginParameters = $myshopRequest->getParams(); // Returns associative array with all plugin parameters $my_shop_id = $myshopRequest->getParam('master_shopid'); $action = $myshopRequest->getParam('action'); $actionvar = $myshopRequest->getParam('actionvar'); getactionvarparameters($actionvar, $my_pagenr, $my_urlsperpage, $my_sortfield, $my_sortdirection, $my_view, $my_eyes); // Retrieves the requested parameters from $actionvar $my_pagenr = ($my_pagenr <= 0 or $my_pagenr >= 999) ? 1 : $my_pagenr; $my_urlsperpage = ($my_urlsperpage <= 1 or $my_urlsperpage >= 999) ? 50 : $my_urlsperpage;
* * Shows example usage of myshopRequest class. * * Version: 1.0 * Author: Sem van der Wal **/ include 'myshopRequest.php'; /* Set your private key for this plugin here */ $privateKey = '6db7415ddebd2e9842022f71cccda46c485b8f40-1f4553e62e36e693c61a8aeea4e93a575caf9de8'; /* Set base location / path for this plugin */ $baseLocation = '/connections/statistics404/'; /* Base string for the body */ $body = ''; try { /* Create MyshopRequest instance */ $myshopRequest = new MyshopRequest($privateKey); /* Get state variables */ $stateVariables = $myshopRequest->getStates(); // Returns associative array with all state variables /* Get plugin parameters */ $pluginParameters = $myshopRequest->getParams(); // Returns associative array with all plugin parameters $action = $myshopRequest->getParam($action); /* Get location */ $location = $myshopRequest->getLocation(); if ($baseLocation . 'start.html' == $location) { /* Return start screen */ $body .= '<h1>helloWorld!</h1>'; $body .= '<p>Press next to continue</p>'; } else { if ($baseLocation . 'settings.html' == $location) {