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

Alexx18

Новичок
  
  • Posts

    16
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Alexx18's Achievements

Apprentice

Apprentice (3/14)

  • Dedicated Rare
  • First Post
  • Collaborator
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. сгделал, но всеравно при site.com/sitemap.xml рилииет норм - кари генерируется а вот site.com/ua/sitemap.xml режет sitemap, и отдает только site.com/ua - обычную страницу
  2. Добрый вечер. Не пойму как Гуглу передать две карты - одну на одном языке другую на другом. (правильно же я понял что создаются несколько sitemap - сколько языков.) Но вот если я открываю site.com/sitemap.xml - то все норм отдает. Если же site.com/ua/sitemap.xml меня редиректит на site.com/ua/ в .htacsess добавлено только Версия ocStore 3.0.3.7 Что может быть не ик. И еещё мнонький вопрос - а как главную страницу всивить в sitemap.xml ? ( ксити при усиноке install.xml не прописался...... пришлось ручками дописывать.)
  3. друзья - первую проблему почему сайт рилииет на https, а в карте выводится http, решил. Решение нашел вот тут 2) кроме того нашел, что в этом куске проблема дублей товаров -фото
  4. Спасипотому что за совет, но это же форум, а не место ггде советуют купить....... Да и платные модули, ...... я уже купил, с 3х - 2 на свалку.
  5. Друзья всем привет. Вот налинаю осваивать Opencart3, и настраиваю Sitemap.xml для Гугла. Рилиию на Версия ocStore 3.0.3.7, - Использую два языка (основной РУ), - HTTPS На фото все видно, я же озвучу 3 прилины, что меня смущают: 1) 5 дублей каждой страницы ( 1 страница с раширением IMAGE, осильные без). Что это и как с этим потому чтороться 2) в строке "url => lok" выдается HTTP, при том что сайт рилииет на протоколе HTTPS, и даже если перейти по ссылке что в Sitemap.xml, она редиректит на HTTPS (зелёным подсветил) (ксити для картинки все правильно выводит HTTPS 3) картинка выводится с кеша, что лично мне кажется неправильно, потому что отдавать надо оригинал в хорошем качестве ....... потому как опотому чтойтись без фото кеша, а с оригиналом? Создается файл синдартным /catalog/controller/extension/feed/google_sitemap.php <?php class ControllerExtensionFeedGoogleSitemap extends Controller { public function index() { if ($this->config->get('feed_google_sitemap_status')) { $output = '<?xml version="1.0" encoding="UTF-8"?>'; $output .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">'; $this->load->model('catalog/product'); $this->load->model('tool/image'); $products = $this->model_catalog_product->getProducts(); foreach ($products as $product) { if ($product['image']) { $output .= '<url>'; $output .= ' <loc>' . $this->url->link('product/product', 'product_id=' . $product['product_id']) . '</loc>'; $output .= ' <changefreq>weekly</changefreq>'; $output .= ' <lastmod>' . date('Y-m-d\TH:i:sP', strtotime($product['date_modified'])) . '</lastmod>'; $output .= ' <priority>1.0</priority>'; $output .= ' <image:image>'; $output .= ' <image:loc>' . $this->model_tool_image->resize($product['image'], $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_width'), $this->config->get('theme_' . $this->config->get('config_theme') . '_image_popup_height')) . '</image:loc>'; $output .= ' <image:caption>' . $product['name'] . '</image:caption>'; $output .= ' <image:title>' . $product['name'] . '</image:title>'; $output .= ' </image:image>'; $output .= '</url>'; } } $this->load->model('catalog/category'); $output .= $this->getCategories(0); $this->load->model('catalog/manufacturer'); $manufacturers = $this->model_catalog_manufacturer->getManufacturers(); foreach ($manufacturers as $manufacturer) { $output .= '<url>'; $output .= ' <loc>' . $this->url->link('product/manufacturer/info', 'manufacturer_id=' . $manufacturer['manufacturer_id']) . '</loc>'; $output .= ' <changefreq>weekly</changefreq>'; $output .= ' <priority>0.7</priority>'; $output .= '</url>'; $products = $this->model_catalog_product->getProducts(array('filter_manufacturer_id' => $manufacturer['manufacturer_id'])); foreach ($products as $product) { $output .= '<url>'; $output .= ' <loc>' . $this->url->link('product/product', 'manufacturer_id=' . $manufacturer['manufacturer_id'] . '&product_id=' . $product['product_id']) . '</loc>'; $output .= ' <changefreq>weekly</changefreq>'; $output .= ' <priority>1.0</priority>'; $output .= '</url>'; } } $this->load->model('catalog/information'); $informations = $this->model_catalog_information->getInformations(); foreach ($informations as $information) { $output .= '<url>'; $output .= ' <loc>' . $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->response->addHeader('Content-Type: application/xml'); $this->response->setOutput($output); } } protected function getCategories($parent_id, $current_path = '') { $output = ''; $results = $this->model_catalog_category->getCategories($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>' . $this->url->link('product/category', 'path=' . $new_path) . '</loc>'; $output .= ' <changefreq>weekly</changefreq>'; $output .= ' <priority>0.7</priority>'; $output .= '</url>'; $products = $this->model_catalog_product->getProducts(array('filter_category_id' => $result['category_id'])); foreach ($products as $product) { $output .= '<url>'; $output .= ' <loc>' . $this->url->link('product/product', 'path=' . $new_path . '&product_id=' . $product['product_id']) . '</loc>'; $output .= ' <changefreq>weekly</changefreq>'; $output .= ' <priority>1.0</priority>'; $output .= '</url>'; } $output .= $this->getCategories($result['category_id'], $new_path); } return $output; } }
  6. Спасипотому что тебе огромное, все рилииет - это я не досмотрел ! ))))
  7. и не, кеш то я полистил))вот скрины ..... Я думаю оно б генерировало, просто сначала вываливается "ошибка", что не заполнено и блокирует
  8. Не компилирует .... по коду Хром ошибку не выдает. Что-то с кодом, или же данные не могут передатся в rand_model
  9. а если условием, чтоб при сохранении если пусто, происходила генерация
  10. нет)) просто во многих случаях мы гделаем копию-дубль товара, и когда убираем значение дублируюещёго кода товара, то при сохранении выдает ошибку что поле несохранено. При новом создании все ок - код генерируется норм. А когда удаляешь значение, и сохраняешь чтоб обновилась генерация, то нет
  11. надо и чтоб при создании нового товара генерировался код, и если значение пустое.....
  12. КРАСАВА +100 в карму))) И не надо никаких модулей, и уникальность кода гарантирована))) Единственный нюанс, (хотя переживем), это что при новом создании товара генерируется код, а вот когда удаляешь в сиром товаре код, и раслитываешь что он сгенерится, то выдает просто ошибку что пустое поле)))
  13. ну ок, чтоб было уникальным и не грузить отгдельными запросами. Может тогда ДАТУ текущую с временем, всивить как код товара. Может ик $data['model'] = "777-" . $data('Y-m-d H:m:s'); А нет ошибку выдает. и и одной строкой надо
  14. Спасипотому что потому чтольшое. Насколько я понял, создать код товара, в основе которого лежит конкретный id товара, не полулится. Только рандомным перепотому чтором
×
×
  • 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.