Jump to content

Reference product


Cacahouet

Recommended Posts

Hi Every,
 
I Need help :
 
I use a webservice for my products (simply to display the quantity)
It's works with the product reference.
So I created a function in FrontController.php in override like this:

<?php

class FrontController extends FrontControllerCore {
public function initHeader(){
$clienttest = new SoapClient('webservice.awws?wsdl');
$reftest = $this->product->reference;
$paramstest = array('codeart'=>$reftest);
$responsetest = $clienttest->__soapCall('quantite', array($paramstest));


foreach($responsetest as $valeurtest) {
}
self::$smarty->assign('testtest', $valeurtest);

return parent::initHeader();
}
}  

It's good to display $valeurtest in product.tpl but not in product-list.tpl, it would actually be to retrieve the reference of the product of product-list.tpl to include it in my function. Someone would have any idea ?

Thank you :)

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