2017 © Pedro Peláez
 

package opencart-sdk

Open Cart API

image

vkolya/opencart-sdk

Open Cart API

  • Saturday, February 17, 2018
  • by Vkolya
  • Repository
  • 1 Watchers
  • 0 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 25 % Grown

The README.md

OpenCart SDK library

As a basis was used this project https://github.com/iSenseLabs/OpenCartAPI/blob/master/opencart.php, (*1)

Installation

Require this package in your composer.json and update composer. This will download the package, (*2)

composer require vkolya/opencart-sdk

Basic usage

use Vkolya\ocSDK\OpenCart;

Second parameter is name of file in your file system where will be store opencart session data for next requests(if you're not going to save session beetwen request you may not pass this parameter), (*3)

$oc = new OpenCart('http://opencartsite,com','oc_api.dat');
//login method on success returns array with token and apiVersion
$oc->login('OC_API_TOKEN');

if you want to work with api, for instance , not only in one class(controller) . In this case , you can save token and apiVersion on session, (*4)

$_SESSION['op_session_data'] = $oc->login('OC_API_TOKEN');

And later in another controller call, (*5)

$oc = new OpenCart('http://opencartsite,com','oc_api.dat',$_SESSION['op_session_data']);
//add product to cart
$oc->cart->add(1, 1);

The Versions

17/02 2018

dev-master

9999999-dev

Open Cart API

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Kolya Vantukh

laravel api yii sdk opencart

17/02 2018

1.0.0

1.0.0.0

Open Cart API

  Sources   Download

MIT

The Requires

  • php >=7.0

 

by Kolya Vantukh

laravel api yii sdk opencart