PHP code example of roshyo / prestashop-webservice-bundle
1. Go to this page and download the library: Download roshyo/prestashop-webservice-bundle 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/ */
roshyo / prestashop-webservice-bundle example snippets
php
public function registerBundles()
{
$bundles = array(
// ...
new IQ2i\PrestaShopWebServiceBundle\IQ2iPrestaShopWebServiceBundle(),
);
}
php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class DefaultController extends Controller
{
/**
* @Route("/", name="homepage")
*/
public function indexAction()
{
$presta = $this->container->get('iq2i_prestashop_web_service')->getInstance('my_prestashop_1');
$result = $presta->get(array(
"resource" => "orders"
));
var_dump($result);
die();
}
}