1. Go to this page and download the library: Download pdeans/miva-provision library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pdeans / miva-provision example snippets
use pdeans\Miva\Provision\Manager as Provision;
$store_code = 'PS';
$url = 'http://www.example.com/mm5/json.mvc?Function=Module&Module_Code=remoteprovisioning&Module_Function=XML';
$token = '12345';
$prv = new Provision($store_code, $url, $token);
// Appends <Domain></Domain> element to xml
$xml = $prv->addDomain($xml);
// Appends <Store code="store code"></Store> element to xml
$xml = $prv->addStore($xml);
// Appends <Provision></Provision> element to xml
$xml = $prv->addProvision($xml);
// Get store code
$store_code = $prv->getStore();
// Set store code
$prv->setStore('store code');
// Get provision request url
$url = $prv->getUrl();
// Set provision request url
$prv->setUrl('request url');
// Get provision access token
$token = $prv->getToken();
// Set provision access token
$prv->setToken('access token');
xml
<Category_Add>
<Code>Tools</Code>
<Name><![CDATA[Class Tools and Skill Kits]]></Name>
</Category_Add>