/**
  * Display product
  * @param string $url product url
  */
 public function actionView($seo_alias)
 {
     $this->_loadModel($seo_alias);
     $this->registerSessionViews($this->model->id);
     Yii::app()->clientScript->registerScriptFile($this->module->assetsUrl . '/product.view.js', CClientScript::POS_END);
     Yii::app()->clientScript->registerScriptFile($this->module->assetsUrl . '/product.view.configurations.js', CClientScript::POS_END);
     if ($this->model->mainCategory) {
         $ancestors = $this->model->mainCategory->excludeRoot()->ancestors()->findAll();
         // $this->breadcrumbs = array(Yii::t('ShopModule.default', 'BC_SHOP') => '/shop');
         foreach ($ancestors as $c) {
             $this->breadcrumbs[$c->name] = $c->getViewUrl();
         }
         //
         // Do not add root category to breadcrumbs
         if ($this->model->mainCategory->id != 1) {
             //$bc[$this->model->mainCategory->name]=$this->model->mainCategory->getViewUrl();
             $this->breadcrumbs[$this->model->mainCategory->name] = $this->model->mainCategory->getViewUrl();
         }
         $this->breadcrumbs[] = $this->model->name;
     }
     $this->pageKeywords = $this->model->keywords();
     $this->pageDescription = $this->model->description();
     $this->pageTitle = $this->model->title();
     $this->render('view', array('model' => $this->model));
 }