Language ID rework
This commit is contained in:
@@ -22,7 +22,12 @@ class Model_Product_Category extends ORMOSB {
|
||||
);
|
||||
|
||||
public function description() {
|
||||
return ($a=$this->product_category_translate->where('language_id','=','en')->find()->description) ? $a : 'No Description';
|
||||
// If the user is not logged in, show the site default language
|
||||
// @todo This needs to change to the session language.
|
||||
if (! $ao=Auth::instance()->get_user())
|
||||
$ao=Config::instance()->so;
|
||||
|
||||
return ($a=$this->product_category_translate->where('language_id','=',$ao->language_id)->find()->description) ? $a : _('No Description');
|
||||
}
|
||||
|
||||
public function list_active() {
|
||||
|
Reference in New Issue
Block a user