Unhandled Error!

Trying to get property of non-object

Document Category
Document type CMS page POST action code
Line 11
Exception class Cms_ExecutionException

Code Highlight

	$topProducts = $category->get_top_products_orders($category->id);
	if ( count($topProducts)){
		$topProductId = key($topProducts);
	}
}
 
	$categoryId = $category->id;
	$categoryName = $category->name;
 
	/*
	// finds material subcategories from here		
	$categoryQuery = "SELECT DISTINCT value, SPP.name  FROM shop_product_properties SPP
	INNER JOIN shop_products_categories SPC ON SPC.shop_product_id = SPP.product_id
# Document Type
1 Category CMS page POST action code