[Notice] Trying to get property of non-object

GET /index.php/products?category=6

Line 66 in /var/www/clients/client15/web16/web/mysite/code/ProductsPage.php

Source

57  }
58 
59    public function getCategoryName() {
60    $category=$this->getRequest()->getVar('category');
61    if(!$category)
62    {
63      $category=1;
64    }
65 		$file = DataObject::get_one('ProductCategories','ID = '.$category);
66 		return $file->Name;
67 	}
68 
69  function myImagefile($id) {
70    if($id<=0){$id=63;}
71 		$file = DataObject::get_one('File','ID = '.$id);
72 		$img = new Image_Cached($file->Filename);

Trace

Products

Products

Agricultural Solutions Products

We focus on delivering products that are novel and offer sustainable solutions for our customers and the community.

Our development projects and pipeline include differentiated products that provide farmers with the technology they need to grow high quality produce for an ever increasing population.

Product List