Update product category view to include default price_display configured by category
This commit is contained in:
@@ -30,6 +30,20 @@ class Model_Product_Category extends ORM_OSB {
|
||||
return ($a=$this->product_category_translate->where('language_id','=',$ao->language_id)->find()->description) ? $a : _('No Description');
|
||||
}
|
||||
|
||||
/**
|
||||
* List all the products belonging to this cateogry
|
||||
* @todo Consider if we should cache this
|
||||
*/
|
||||
public function products() {
|
||||
$return = array();
|
||||
|
||||
foreach (ORM::factory('Product')->where_active()->find_all() as $po)
|
||||
if (in_array($this->id,$po->categories()))
|
||||
array_push($return,$po);
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
public function list_bylistgroup($cat) {
|
||||
$result = array();
|
||||
|
||||
|
Reference in New Issue
Block a user