PHP code example of updevru / retailrocket-client

1. Go to this page and download the library: Download updevru/retailrocket-client 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/ */

    

updevru / retailrocket-client example snippets


use RetailRocketClient\Client;
use RetailRocketClient\Recommendation;

$client = new Client('token');
$service = new Recommendation($client);

foreach($service->popular(0) as $item) {
    print(sprintf("Product #%s %s\n", $item->getItemId(), $item->getName()));
}
bash
# Install Composer
curl -sS https://getcomposer.org/installer | php
bash
php composer.phar