Jump to content

Prestashop 1.6 Web Service


Bart_Bart

Recommended Posts

Hi, Could any one help me with fetching or getting list of products with its name and product description from prestashop by using web service. so far I am able to get list of products ID .

 

 this code is in try block

$opt['resource'] = 'products';
if (isset($_GET['id']))
        $opt['id'] = $_GET['id'];
$xml = $webService->get($opt);

$resources = $xml->children()->children() ;

 and rest of the code.

if (!isset($_GET['id']))
	{
		echo '<tr><th>Id</th><th>Product</th></tr>';
		foreach($resources as $resource){
	echo'<tr><td>'.$resource->attributes() .'</td><td>'.'<a href="?id='.$resource->attributes().'">Opis</a>'.'</td></tr>';
	}	
		}
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...