Jump to content

prestashop api,


Recommended Posts

Can someone help me?


I don't know hot to call discount value or old price.



I have code like this


public function hookDisplayHome($params){ 

$xml=simplexml_load_file("http://yokystevanus***x**x****@dian**.net/api/products/1") or die("Error: Cannot create object");

'add_prod_display' => Configuration::get('PS_ATTRIBUTE_CATEGORY_DISPLAY'),
'homeSize' => Image::getSize(ImageType::getFormatedName('home')),
return $this->display(__FILE__,'xml.tpl');

and in my xml.tpl 

{$xml->product->name->language}  // {* for call name item *}

{$xml->product->id_default_image->attributes( 'xlink', true)} // {* for call link images *}

Someone have idea to call discount and old price? 


thank you for help.



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...