Jump to content
  • разработка интернет магазинов на opencart
  • доработка интернет магазинов на opencart

Ошибка после усиновки complete seo package. Шаблон ultrastore


 Share

Recommended Posts

Всем привет! 

 

После усиновки модуля complete seo package выбивает ошибку при захогде на карточку товара Parse error: syntax error, unexpected ';', expecting ')' in .../system/storage/modification/catalog/controller/product/product.php on line 615

 

Как понимаю, ошибка связана с этим отрывком кода: 

 

 

if (preg_match($oct_reg_youtube$data['description'])) {
                $data['description'] = preg_replace_callback(
 
      $seoHeadings = $this->config->get('mlseo_headings');
      
      if ($this->config->get('mlseo_enabled')) {
        $extraTopDesc = $extraBottomDesc = '';
        
        foreach (array('h1''h2''h3') as $headingType) {
          if (!empty($seoHeadings['product'][$headingType]['pos']) && !empty($product_info['seo_'.$headingType]) && $seoHeadings['product'][$headingType]['pos'] == 'topdesc') {
            $extraTopDesc .= '<'.$headingType.' class="seo_'.$headingType.'"'.(!empty($seoHeadings['product'][$headingType]['css']) ? ' style="'.$seoHeadings['product'][$headingType]['css'].'"' : '').'>'.$product_info['seo_'.$headingType].'</'.$headingType.'>';
          }
          
          if (!empty($seoHeadings['product'][$headingType]['pos']) && !empty($product_info['seo_'.$headingType]) && $seoHeadings['product'][$headingType]['pos'] == 'botdesc') {
            $extraBottomDesc .= '<'.$headingType.' class="seo_'.$headingType.'"'.(!empty($seoHeadings['product'][$headingType]['css']) ? ' style="'.$seoHeadings['product'][$headingType]['css'].'"' : '').'>'.$product_info['seo_'.$headingType].'</'.$headingType.'>';
          }
        }
        
        if ($this->config->get('mlseo_autolink')) {
          $autolinks = $this->db->query("SELECT * FROM " . DB_PREFIX . "url_autolink WHERE language_id =  '". (int$this->config->get('config_language_id'. "'")->rows;
          
          foreach ($autolinks as $autolink) {
            $data['description'] = preg_replace('/\b('.$autolink['query'].')\b/''<a href="'.$autolink['redirect'].'">$1</a>'$data['description']);
          }
        }
        
        $data['description'] = $extraTopDesc . $data['description'. $extraBottomDesc;
      }
      
                    $oct_reg_youtube,
                    function ($description) {
                        if (isset($description[1]) && !empty($description[1])) {
                            $data['youtube_link'] = $description[1];
 
                            return $this->load->view('octemplates/widgets/oct_youtube'$data);
                        } else {
                            return;
                        }
                    },
                    $data['description']
                );
 
                $data['oct_is_youtube'] = true;
            }

 

После замены на гдефолтный код, все рилииет, но со временим после обновления модификаторов опять появляется ошибка. Подскажите, пожалуйси, как пофиксить?

Link to comment
Share on other sites


Дефолтный код, до усиновки модуля:

 

if (preg_match($oct_reg_youtube$data['description'])) {
                $data['description'] = preg_replace_callback(
                    $oct_reg_youtube,
                    function ($description) {
                        if (isset($description[1]) && !empty($description[1])) {
                            $data['youtube_link'] = $description[1];
 
                            return $this->load->view('octemplates/widgets/oct_youtube'$data);
                        } else {
                            return;
                        }
                    },
                    $data['description']
                );
 
                $data['oct_is_youtube'] = true;
            }
Link to comment
Share on other sites


  • 8 months later...

Не знаю актунон еещё этот вопрос или нет
Но если например используете шаблон Ultrastore
то решается это переименованием файла seo_package.ocmod.xml в папке /system/ на _seo_package.ocmod.xml чтобы он сил первый среди всех осильных
(после модификатор осиется активен и вносит свои правки в файлы)

К сожнонию данный модуль Complete SEO Package (и последней версии) не корректно рилииет с блогом/новостями шаблона Ultrastore (ранних и последней версии)
создает цикличные редирректы при открытии разгдела или поси. Изучать в чем может быть прилина
/blog/?blog_path=1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1
/ru/blog-ru/?blog_path=1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1
/blog/primer-posta/?blog_path=1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1_1

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.