Перейти к публикации
Поиск в
  • Дополнительно...
Искать результаты, содержащие...
Искать результаты в...

Hyperos

Новичок
  
  • Публикаций

    47
  • Зарегистрирован

  • Посещение

Все публикации пользователя Hyperos

  1. Я использую Google Sitemap Fast. Вот главная страница https://rose-mary.shop и страница каталога https://rose-mary.shop/yarn Нужно им поставить приоритет 1 относительно всех страниц. Если я правильно понимаю, то это меняется в файле. Что нужно изменить или добавить в код, чтобы реализовать такое? <?php class ControllerFeedGoogleSitemapFast extends Controller { protected $categories = array(); public function index() { if($this->config->get('google_sitemap_fast_status')) { $time_start = microtime(true); $output = '<?xml version="1.0" encoding="UTF-8"?>'; $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'; $this->load->model('tool/sitemap'); $products = $this->model_tool_sitemap->getProducts(); foreach($products as $product) { $output .= '<url>'; $output .= '<loc>' . str_replace('&', '&', str_replace('&', '&', $this->url->link('product/product', 'product_id=' . $product['product_id']))) . '</loc>'; $output .= '<lastmod>' . $product['date'] . '</lastmod>'; $output .= '<changefreq>weekly</changefreq>'; $output .= '<priority>1.0</priority>'; $output .= '</url>'; } $this->categories = $this->model_tool_sitemap->getAllCategories(); $output .= $this->getAllCategories(0); $manufacturers = $this->model_tool_sitemap->getManufacturers(); foreach($manufacturers as $manufacturer) { $output .= '<url>'; $output .= '<loc>' . str_replace('&', '&', str_replace('&', '&', $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $manufacturer['manufacturer_id']))) . '</loc>'; $output .= '<changefreq>weekly</changefreq>'; $output .= '<priority>0.7</priority>'; $output .= '</url>'; } $informations = $this->model_tool_sitemap->getInformations(); foreach($informations as $information) { $output .= '<url>'; $output .= '<loc>' . str_replace('&', '&', str_replace('&', '&', $this->url->link('information/information', 'information_id=' . $information['information_id']))) . '</loc>'; $output .= '<changefreq>weekly</changefreq>'; $output .= '<priority>0.5</priority>'; $output .= '</url>'; } $output .= '</urlset>'; $this->log->write(sprintf("Fast Sitemap Execution Time: %05.5f", (microtime(true) - $time_start))); $this->response->addHeader('Content-Type: application/xml'); $this->response->setOutput($output); } } protected function getAllCategories($parent_id = 0, $current_path = '') { $output = ''; if(array_key_exists($parent_id, $this->categories)) { $results = $this->categories[$parent_id]; foreach($results as $result) { if(!$current_path) { $new_path = $result['category_id']; } else { $new_path = $current_path . '_' . $result['category_id']; } $output .= '<url>'; $output .= '<loc>' . str_replace('&', '&', str_replace('&', '&', $this->url->link('product/category', 'path=' . $new_path))) . '</loc>'; $output .= '<lastmod>' . $result['date'] . '</lastmod>'; $output .= '<changefreq>weekly</changefreq>'; $output .= '<priority>0.7</priority>'; $output .= '</url>'; if(!$current_path) { $new_path = $result['category_id']; } else { $new_path = $current_path . '_' . $result['category_id']; } $children = ''; if(array_key_exists($result['category_id'], $this->categories)) { $children = $this->getAllCategories($result['category_id'], $new_path); } $output .= $children; } } return $output; } } ?>
  2. Нужно главной странице и в каталоге поставить приоритет 1
  3. Всем привет. Такая проблема. Как настроить приоритет главной страницы? Спасибо.
  4. Решил вопрос поменяв url. Сейчас другая проблема. На главной странице не отображается категория в меню, а когда перехожу на другие страницы или категории, то это категория появляется. Как сделать, чтобы это категория появилась и на главной странице?
  5. Всем добрый вечер. Столкнулся с такой проблемой. При открытии категории, на странице пишет Категория не найдена! и в адресной строке такой линк: index.php?route=product/category&path=494 Как можно решить?
  6. Вот скриншоты с базы данных. Проблема с таблицей Двигатель. Таблица oc_category и oc_category_description
  7. Я вот наткнулся на такую статью, объясняющую из-за чего такое. http://vpsvds.ru/blog/2015/03/20/propala-categoriya-tovarov.html Но я не понял с ID. Какие ID нужно менять и каким полям.
  8. Это всё делается в админ панели?
  9. Как вернуть всё назад? Как починить категории и сбросить кеш?
  10. Всем привет. Я зашел в админке в каталог - категории, выбрал категорию и родительской категорий назначил эту же категорию, после чего категория пропала и с url этой категории страниц стало такое чудо, скидываю скриншоты. Скриншот, что происходит с url и хлебными крошками: Что делать в такой ситуации?
×
×
  • Создать...

Важная информация

На нашем сайте используются файлы cookie и происходит обработка некоторых персональных данных пользователей, чтобы улучшить пользовательский интерфейс. Чтобы узнать для чего и какие персональные данные мы обрабатываем перейдите по ссылке. Если Вы нажмете «Я даю согласие», это означает, что Вы понимаете и принимаете все условия, указанные в этом Уведомлении о Конфиденциальности.