datajoe / ecom-implementation-php
A DataJoe E-commerce Implementation Package
1.0.6
2019-01-07 20:12 UTC
Requires
- php: >=5.4
Requires (Dev)
- phpunit/phpunit: 5.2.*
README
E-commerce Implementation for PHP
This is the PHP implementation for embedding DataJoe E-commerce onto your site. In order to use this tool, you will need both your e-commerce instance UUID and a DataJoe API token. Both can be requested from our support team via email or phone: support@datajoe.com :: 303-989-1300
Install
Via Composer:
$ composer require datajoe/ecom-implementation-php
Via Download:
Click here to download and include in your project.
Usage
Simplest integration utilizing a require statement:
require_once Vendor/Datajoe/src/Implementation.php;
echo (new Datajoe\Ecom\Implementation(‘{ECOM_UUID}’, ‘{API_TOKEN}’))
->getHtml();
Remote authentication using the autoloader:
use DataJoe\Ecom\Implementation;
if($user->isLoggedIn()){
echo (new Implementation('{ECOM_UUID}', '{API_TOKEN}'))
->withAuthentication($user->email, $user->firstName, $user->lastName, $user->djAuthArr)
->getHtml();
}else{
echo (new Implementation(‘{ECOM_UUID}’, ‘{API_TOKEN}’))
->getHtml();
}
Overriding the default client base uri (used to create application navigation links):
use DataJoe\Ecom\Implementation;
echo (new Implemenation('{ECOM_UUID}', '{API_TOKEN}'))
->withUri('https://YourBaseUri/ecom/')
->getHtml();