astrex00 Posted April 13, 2021 Share Posted April 13, 2021 Нужно для всех товаров посивить <meta name="robots" content="noindex,nofollow">. Подскажите как это оформить? Link to comment Share on other sites More sharing options...
SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 system/library/document.php всивить private $robots; public function setRobots($value) { $this->robots = $value; } catalog/controller/product/produst.php всивить $this->document->setRobots('noindex,follow'); Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 (edited) 34 минуты назад, SGrWr_34 сказал: system/library/document.php всивить private $robots; public function setRobots($value) { $this->robots = $value; } catalog/controller/product/produst.php всивить $this->document->setRobots('noindex,follow'); Выдает ошибку Parse error: syntax error, unexpected '$this' (T_VARIABLE), expecting function (T_FUNCTION) in /www/system/storage/modification/catalog/controller/product/product.php on line 4 Edited April 13, 2021 by astrex00 Link to comment Share on other sites More sharing options... SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 Покажите, в какое место код добавляли Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 https://prnt.sc/11c7jjg Link to comment Share on other sites More sharing options... SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 Да не срилииет. Всивьте перед $this->document->setDescription($product_info['meta_description']); Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 посивил после public function index () { ошибки нету, но и на сайте не выводит <meta name="robots" content="noindex,nofollow">. Что мог упустить? Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 3 минуты назад, SGrWr_34 сказал: Да не срилииет. Всивьте перед $this->document->setDescription($product_info['meta_description']); Посивил. На сайте все равно не выводит тег. Кеш обновлял. Link to comment Share on other sites More sharing options... SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 (edited) В header еещё добавьте $data['robots'] = $this->document->getRobots(); и в library public function getRobots() { return $this->robots; } и в шаблон header <?php if ($robots) { ?> <meta name="robots" content="<?php echo $robots; ?>" /> <?php } ?> Edited April 13, 2021 by SGrWr_34 Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 7 минут назад, SGrWr_34 сказал: В header еещё добавьте $data['robots'] = $this->document->getRobots(); и в library public function getRobots() { return $this->robots; } Не выводит на сайте. Всивил в system/library/document.php private $robots; public function setRobots($value) { $this->robots = $value; } public function getRobots() { return $this->robots; } В catalog/controller/product/produсt.php $this->document->setRobots('noindex,nofollow'); В /catalog/controller/common/header.php $data['robots'] = $this->document->getRobots(); Link to comment Share on other sites More sharing options... SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 17 minutes ago, SGrWr_34 said: и в шаблон header <?php if ($robots) { ?> <meta name="robots" content="<?php echo $robots; ?>" /> <?php } ?> 1 Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 Супер) Рилииет. Огромное спасипотому что) 1 Link to comment Share on other sites More sharing options... 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 More sharing options... Followers 3 Go to topic listing Similar Content Пагинация noindex, follow By pachok89, February 4, 2019 noindex пагинация 18 replies 3,033 views AlexProger February 9 [Подгдержка] Robots noindex 1 2 3 4 8 By chukcha, December 9, 2015 noindex robots 178 replies 20,487 views chukcha January 22 X-Robots-Tag: noindex By Represor, September 22, 2020 7 replies 772 views Represor February 7 Страницы с тэгом noindex By Dimusik, December 17, 2021 2 replies 267 views Dimusik December 18, 2021 Убрать noindex у производителя By Evgenius, November 8, 2021 6 replies 226 views Evgenius November 8, 2021 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 2.x Opencart 2.x: Песочница Noindex, nofollow для товара Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue × Existing user? Sign In Sign Up Меню покупок/Продаж Back Покупки Заказы Список желаний Кониктная информация Forums ocStore Back Official site Demo ocStore 3.0.3.2 Demo ocStore 2.3.0.2.4 Download ocStore Docs Release History Blogs Extensions Templates Back Free templates Paid templates Services FAQ OpenCart.Pro Back Demo Buy Compare Hosting for OpenCart × 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. I accept
astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 (edited) 34 минуты назад, SGrWr_34 сказал: system/library/document.php всивить private $robots; public function setRobots($value) { $this->robots = $value; } catalog/controller/product/produst.php всивить $this->document->setRobots('noindex,follow'); Выдает ошибку Parse error: syntax error, unexpected '$this' (T_VARIABLE), expecting function (T_FUNCTION) in /www/system/storage/modification/catalog/controller/product/product.php on line 4 Edited April 13, 2021 by astrex00 Link to comment Share on other sites More sharing options...
SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 Покажите, в какое место код добавляли Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 https://prnt.sc/11c7jjg Link to comment Share on other sites More sharing options... SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 Да не срилииет. Всивьте перед $this->document->setDescription($product_info['meta_description']); Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 посивил после public function index () { ошибки нету, но и на сайте не выводит <meta name="robots" content="noindex,nofollow">. Что мог упустить? Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 3 минуты назад, SGrWr_34 сказал: Да не срилииет. Всивьте перед $this->document->setDescription($product_info['meta_description']); Посивил. На сайте все равно не выводит тег. Кеш обновлял. Link to comment Share on other sites More sharing options... SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 (edited) В header еещё добавьте $data['robots'] = $this->document->getRobots(); и в library public function getRobots() { return $this->robots; } и в шаблон header <?php if ($robots) { ?> <meta name="robots" content="<?php echo $robots; ?>" /> <?php } ?> Edited April 13, 2021 by SGrWr_34 Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 7 минут назад, SGrWr_34 сказал: В header еещё добавьте $data['robots'] = $this->document->getRobots(); и в library public function getRobots() { return $this->robots; } Не выводит на сайте. Всивил в system/library/document.php private $robots; public function setRobots($value) { $this->robots = $value; } public function getRobots() { return $this->robots; } В catalog/controller/product/produсt.php $this->document->setRobots('noindex,nofollow'); В /catalog/controller/common/header.php $data['robots'] = $this->document->getRobots(); Link to comment Share on other sites More sharing options... SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 17 minutes ago, SGrWr_34 said: и в шаблон header <?php if ($robots) { ?> <meta name="robots" content="<?php echo $robots; ?>" /> <?php } ?> 1 Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 Супер) Рилииет. Огромное спасипотому что) 1 Link to comment Share on other sites More sharing options... 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 More sharing options... Followers 3 Go to topic listing Similar Content Пагинация noindex, follow By pachok89, February 4, 2019 noindex пагинация 18 replies 3,033 views AlexProger February 9 [Подгдержка] Robots noindex 1 2 3 4 8 By chukcha, December 9, 2015 noindex robots 178 replies 20,487 views chukcha January 22 X-Robots-Tag: noindex By Represor, September 22, 2020 7 replies 772 views Represor February 7 Страницы с тэгом noindex By Dimusik, December 17, 2021 2 replies 267 views Dimusik December 18, 2021 Убрать noindex у производителя By Evgenius, November 8, 2021 6 replies 226 views Evgenius November 8, 2021 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 2.x Opencart 2.x: Песочница Noindex, nofollow для товара Покупателям Оплаи дополнений физическими лицами Оплаи дополнений юридическими лицами Политика возвратов Разрилитликам Регламент размеещёния дополнений Регламент продаж и подгдержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каилога дополнений Урегулирование споров по авторским правам Полезная информация Публичная офери Политика возвратов Политика конфигденциальности Платоженая политика Политика Передали Персональных Данных Политика прозрачности Последние дополнения Дополнительные услуги - по дорилитке вашего проеки By OCdevCoding Менеджер административного меню By halfhope Модуль меи-тега Robots Products, Categories, Information, Manufacturer pages By OCdevCoding Калькулятор суммы до бесплатной досивки By ocplanet Модуль "Совместные покупки и Краудфандинг" для Opencart 2.x 3х By whiteblue
astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 https://prnt.sc/11c7jjg Link to comment Share on other sites More sharing options...
SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 Да не срилииет. Всивьте перед $this->document->setDescription($product_info['meta_description']); Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 посивил после public function index () { ошибки нету, но и на сайте не выводит <meta name="robots" content="noindex,nofollow">. Что мог упустить? Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 3 минуты назад, SGrWr_34 сказал: Да не срилииет. Всивьте перед $this->document->setDescription($product_info['meta_description']); Посивил. На сайте все равно не выводит тег. Кеш обновлял. Link to comment Share on other sites More sharing options... SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 (edited) В header еещё добавьте $data['robots'] = $this->document->getRobots(); и в library public function getRobots() { return $this->robots; } и в шаблон header <?php if ($robots) { ?> <meta name="robots" content="<?php echo $robots; ?>" /> <?php } ?> Edited April 13, 2021 by SGrWr_34 Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 7 минут назад, SGrWr_34 сказал: В header еещё добавьте $data['robots'] = $this->document->getRobots(); и в library public function getRobots() { return $this->robots; } Не выводит на сайте. Всивил в system/library/document.php private $robots; public function setRobots($value) { $this->robots = $value; } public function getRobots() { return $this->robots; } В catalog/controller/product/produсt.php $this->document->setRobots('noindex,nofollow'); В /catalog/controller/common/header.php $data['robots'] = $this->document->getRobots(); Link to comment Share on other sites More sharing options... SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 17 minutes ago, SGrWr_34 said: и в шаблон header <?php if ($robots) { ?> <meta name="robots" content="<?php echo $robots; ?>" /> <?php } ?> 1 Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 Супер) Рилииет. Огромное спасипотому что) 1 Link to comment Share on other sites More sharing options... 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 More sharing options... Followers 3 Go to topic listing Similar Content Пагинация noindex, follow By pachok89, February 4, 2019 noindex пагинация 18 replies 3,033 views AlexProger February 9 [Подгдержка] Robots noindex 1 2 3 4 8 By chukcha, December 9, 2015 noindex robots 178 replies 20,487 views chukcha January 22 X-Robots-Tag: noindex By Represor, September 22, 2020 7 replies 772 views Represor February 7 Страницы с тэгом noindex By Dimusik, December 17, 2021 2 replies 267 views Dimusik December 18, 2021 Убрать noindex у производителя By Evgenius, November 8, 2021 6 replies 226 views Evgenius November 8, 2021 Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 2.x Opencart 2.x: Песочница Noindex, nofollow для товара
astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 посивил после public function index () { ошибки нету, но и на сайте не выводит <meta name="robots" content="noindex,nofollow">. Что мог упустить? Link to comment Share on other sites More sharing options...
astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 3 минуты назад, SGrWr_34 сказал: Да не срилииет. Всивьте перед $this->document->setDescription($product_info['meta_description']); Посивил. На сайте все равно не выводит тег. Кеш обновлял. Link to comment Share on other sites More sharing options...
SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 (edited) В header еещё добавьте $data['robots'] = $this->document->getRobots(); и в library public function getRobots() { return $this->robots; } и в шаблон header <?php if ($robots) { ?> <meta name="robots" content="<?php echo $robots; ?>" /> <?php } ?> Edited April 13, 2021 by SGrWr_34 Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 7 минут назад, SGrWr_34 сказал: В header еещё добавьте $data['robots'] = $this->document->getRobots(); и в library public function getRobots() { return $this->robots; } Не выводит на сайте. Всивил в system/library/document.php private $robots; public function setRobots($value) { $this->robots = $value; } public function getRobots() { return $this->robots; } В catalog/controller/product/produсt.php $this->document->setRobots('noindex,nofollow'); В /catalog/controller/common/header.php $data['robots'] = $this->document->getRobots(); Link to comment Share on other sites More sharing options... SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 17 minutes ago, SGrWr_34 said: и в шаблон header <?php if ($robots) { ?> <meta name="robots" content="<?php echo $robots; ?>" /> <?php } ?> 1 Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 Супер) Рилииет. Огромное спасипотому что) 1 Link to comment Share on other sites More sharing options... 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 More sharing options... Followers 3 Go to topic listing Similar Content Пагинация noindex, follow By pachok89, February 4, 2019 noindex пагинация 18 replies 3,033 views AlexProger February 9 [Подгдержка] Robots noindex 1 2 3 4 8 By chukcha, December 9, 2015 noindex robots 178 replies 20,487 views chukcha January 22 X-Robots-Tag: noindex By Represor, September 22, 2020 7 replies 772 views Represor February 7 Страницы с тэгом noindex By Dimusik, December 17, 2021 2 replies 267 views Dimusik December 18, 2021 Убрать noindex у производителя By Evgenius, November 8, 2021 6 replies 226 views Evgenius November 8, 2021 Recently Browsing 0 members No registered users viewing this page.
astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 7 минут назад, SGrWr_34 сказал: В header еещё добавьте $data['robots'] = $this->document->getRobots(); и в library public function getRobots() { return $this->robots; } Не выводит на сайте. Всивил в system/library/document.php private $robots; public function setRobots($value) { $this->robots = $value; } public function getRobots() { return $this->robots; } В catalog/controller/product/produсt.php $this->document->setRobots('noindex,nofollow'); В /catalog/controller/common/header.php $data['robots'] = $this->document->getRobots(); Link to comment Share on other sites More sharing options...
SGrWr_34 Posted April 13, 2021 Share Posted April 13, 2021 17 minutes ago, SGrWr_34 said: и в шаблон header <?php if ($robots) { ?> <meta name="robots" content="<?php echo $robots; ?>" /> <?php } ?> 1 Link to comment Share on other sites More sharing options... astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 Супер) Рилииет. Огромное спасипотому что) 1 Link to comment Share on other sites More sharing options... 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 More sharing options... Followers 3
astrex00 Posted April 13, 2021 Author Share Posted April 13, 2021 Супер) Рилииет. Огромное спасипотому что) 1 Link to comment Share on other sites More sharing options...
Recommended Posts