Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Выключить и отключить индексацию товарам


Recommended Posts

Добрый день! Есть товарная группа, заходит с 1С, для неё нужно выключить Индексацию и сам товар. Они идут без картинки, поэтому придумал это сделать через БД, но не могу разобраться с правильностью запроса, подскажите люди знающие, спасибо...

 

UPDATE 'oc_product' SET 'status'= 0 'noindex'= 0 WHERE 'image'='' OR 'image' IS NULL;

Так не работает...

Link to comment
Share on other sites


Доброго дня,

 

приберіть скобки, якщо екрануєте поля, то використовуйте гравіс

і забули кому між полями що оновлюються

 

UPDATE `oc_product` SET `status`= 0, `noindex` = 0 WHERE `image` = '' OR `image` IS NULL;

 

Link to comment
Share on other sites

06.06.2023 в 15:34, chukcha сказал:

Навіщо. Хто цей товар побачить?

`status`= 0

Покупатель на сайте)

Link to comment
Share on other sites


06.06.2023 в 15:49, Evgenius сказал:

Покупатель на сайте)

ніт! Хто його покаже? Товар з статусом 0 не відображується зовсім

 

  • +1 1
Link to comment
Share on other sites

06.06.2023 в 16:11, spectre сказал:

кстати чтобы не индексировалось noindex = '1'

С Вами спорить не могу (уж Вы очень авторитетный), но все таки 0 отключило индекс. 1 включено (по крайней мере у меня так).

Link to comment
Share on other sites


07.06.2023 в 12:14, Evgenius сказал:

С Вами спорить не могу (уж Вы очень авторитетный), но все таки 0 отключило индекс. 1 включено (по крайней мере у меня так).

 

спорить можно и нужно)))) таки да, в коде это выглядит так

 

if ($product_info['noindex'] <= 0 && $this->config->get('config_noindex_status')) {
		$this->document->setRobots('noindex,follow');
}

 

но это нелогично, как по мне или настройку надо было назвать index , а то получается что noindex = true, что переводится как не индексировать = правда, как раз должно это отключать)

Link to comment
Share on other sites

06.06.2023 в 16:10, chukcha сказал:

ніт! Хто його покаже? Товар з статусом 0 не відображується зовсім

 

Понял) В принципе логично...) Не додумал)

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.