PHP code example of progcode / icecat-api

1. Go to this page and download the library: Download progcode/icecat-api 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/ */

    

progcode / icecat-api example snippets


// Use the class.
use Src\Icecat\Api;

$icecat = new Api(getenv('ICEACAT_USER'), getenv('ICEACAT_PASS'));
$xml = $icecat->getArticleByMPN('Hewlett Packard Enterprise', '838079-B21', 'HU');
$productDataArray = $icecat->xml2array($xml);

$productData = $icecat->getProductData($productDataArray);