Jump to content

get feature values


Chirs
 Share

Recommended Posts

Hi there,

I try to get products and features useing following functions:

	public function initContent(){
    	parent::initContent();		
		$id_lang=(int)$this->context->language->id;
		$this->context->smarty->assign(array(
	    'all_products' =>$this->getAllProducts(),
    	'all_features'=>$this->getAllFeatures()  
		));
    
		$this->setTemplate('display.tpl');
  	}   

	public function getAllProducts(){
  
    $id_lang=$this->context->language->id;
	
	$productObj = new Product();
    $products = $productObj -> getProducts($id_lang, 0, 0, 'id_product', 'DESC' );
	
	return $products;  
  }
  
  public function getAllFeatures(){
  
    $id_lang=$this->context->language->id;
    $all_features = FeatureCore::getFeatures($this->context->language->id);

	return $all_features;    
  }

My issue is that $all_features just contains feature.names, but not values. I don't find a way to get the values as well. Any hints for me?

Thanks, Chris

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More