magicalella / yii2-prestashop

Componente per integrare la Yii2 con Prestashop

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

yii2-prestashop

Modulo per integrare la Yii con Prestashop

Prestashop Technical API Documentation

Installation

The preferred way to install this extension is through composer.

Run

composer require "magicalella/yii2-prestashop" "*"

or add

"magicalella/yii2-prestashop": "*"

to the require section of your composer.json file.

Usage

  1. Add component to your config file
'components' => [
    // ...
    'prestashop' => [
        'class' => 'magicalella\prestashop\Prestashop',
        'url' => 'URL Site prestashop',
        'key' => 'API Keyu WebService PS',
        'debug' => true/false,
        'version' => 'version PS'
    ],
]
  1. Add new contact to Prestashop . Patch a contact by email. If contact does not exists, it is created
$prestashop = Yii::$app->prestashop;
$prestashop->$url = $this->$url;
$prestashop->key = $this->key;
$prestashop->debug = $this->debug;
try
 {
    $xml = $prestashop->get(['resource' => 'orders','limit'=> $off_set.','.$limit,'sort'=>'id_ASC']);
 }
catch (BridgePSException $ex)
 {
    echo 'Error : '.$ex->getMessage();
}

Check Prestashop Technical API Documentation for all available options.

About

Componente per integrare la Yii2 con Prestashop

License:GNU General Public License v3.0


Languages

Language:PHP 100.0%