Esempio n. 1
0
 /** {inheritDoc} */
 public function checkFriendlyAlias()
 {
     if ($this->workingContext->getOption('ms2_product_id_as_alias')) {
         $alias = $this->object->id;
         $this->setProperty('alias', $alias);
     } else {
         $alias = parent::checkFriendlyAlias();
     }
     return $alias;
 }
Esempio n. 2
0
 /**
  * @return mixed|string
  */
 public function checkFriendlyAlias()
 {
     $alias = parent::checkFriendlyAlias();
     if ($this->modx->context->key != 'mgr') {
         foreach ($this->modx->error->errors as $k => $v) {
             if ($v['id'] == 'alias' || $v['id'] == 'uri') {
                 unset($this->modx->error->errors[$k]);
             }
         }
     }
     return $alias;
 }