masskill Posted March 26, 2018 Share Posted March 26, 2018 Всем привет. Столкнулись с ситуациец, что после удаления товара в админке url_alias_id - не удалился Появились непонятно по какими причинам - дубликаты (Возможно где то что то не то нажали) В админке есть 2 товара Сундук Aviator Trunk с одинаковым чпу "sunduk-aviator-trunk" Удалил в админке один из товаров, второй перестал открыватся. Изменил ему чпу на "sunduk-aviator-trunk-1" - открыватся начал нормально. Хочу изменить товары новый чпу на старый - не поддается. Смотрю в базе, а старый чпу не удалился Как это можно исправить? Кто может помочь ? INSERT INTO `oc_url_alias` (`url_alias_id`, `query`, `keyword`, `seomanager`) VALUES ('10359', 'product_id=618', 'sunduk-aviator-trunk-1', '0'); INSERT INTO `oc_url_alias` (`url_alias_id`, `query`, `keyword`, `seomanager`) VALUES ('9891', 'product_id=11121', 'sunduk-aviator-trunk', '0'); Link to comment Share on other sites More sharing options...
masskill Posted March 26, 2018 Author Share Posted March 26, 2018 25 minutes ago, nikifalex said: delete from oc_url_alias where query like 'product=' and query not in (select concat('product_id=',product_id) from oc_product) типа такого, но не проверял А что этот запрос сделает ? Суть в том, что мне не нужно 1 алиас удалить, таких несколько десятков ( Link to comment Share on other sites More sharing options...
chukcha Posted March 26, 2018 Share Posted March 26, 2018 бекап, бекап, бекап DELETE FROM `url_alias` WHERE `query` LIKE 'product_id=%' and `query` not in (SELECT CONCAT('product_id=',product_id) FROM product) Link to comment Share on other sites More sharing options... chukcha Posted March 26, 2018 Share Posted March 26, 2018 DELETE u FROM `url_alias` u left JOIN product p ON CONCAT('product_id=',p.product_id) = query WHERE `query` LIKE 'product_id=%' and p.product_id is null как один из вариантов 1 Link to comment Share on other sites More sharing options... masskill Posted March 26, 2018 Author Share Posted March 26, 2018 3 minutes ago, chukcha said: DELETE u FROM `url_alias` u left JOIN product p ON CONCAT('product_id=',p.product_id) = query WHERE `query` LIKE 'product_id=%' and p.product_id is null как один из вариантов А можете обяснить чуток что этот запрос сделает ? Link to comment Share on other sites More sharing options... chukcha Posted March 26, 2018 Share Posted March 26, 2018 https://dev.mysql.com/doc/refman/5.7/en/delete.html Link to comment Share on other sites More sharing options... Mister85 Posted March 26, 2018 Share Posted March 26, 2018 Ребята, а кто возьмется поправить за вознаграждение? Link to comment Share on other sites More sharing options... chukcha Posted March 26, 2018 Share Posted March 26, 2018 3 минуты назад, Mister85 сказал: Ребята, а кто возьмется поправить за вознаграждение? а вы каким боком к теме? Link to comment Share on other sites More sharing options... Mister85 Posted March 26, 2018 Share Posted March 26, 2018 владелец этого магазина Link to comment Share on other sites More sharing options... chukcha Posted March 26, 2018 Share Posted March 26, 2018 пишите в личку. 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 0 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 2.x Opencart 2.x: General questions Чистка url_alias_id Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Chameleon - Responsive & Multipurpose Opencart Template + Quick Start By 29aleksey Wayforpay API оплата для Opencart 2.3, 3.x By bogdan281989 TgMarket - Модуль интернет магазина в телеграмме. By Rassol2 ShowCase – Responsive / Multipurpose Opencart Template By octemplates Telnotification By Yevhenii_7777 × Existing user? Sign In Sign Up Shopping section Back Purchased extensions Invoices Whishlist Alternative Contacts Forums News 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 × 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
chukcha Posted March 26, 2018 Share Posted March 26, 2018 DELETE u FROM `url_alias` u left JOIN product p ON CONCAT('product_id=',p.product_id) = query WHERE `query` LIKE 'product_id=%' and p.product_id is null как один из вариантов 1 Link to comment Share on other sites More sharing options... masskill Posted March 26, 2018 Author Share Posted March 26, 2018 3 minutes ago, chukcha said: DELETE u FROM `url_alias` u left JOIN product p ON CONCAT('product_id=',p.product_id) = query WHERE `query` LIKE 'product_id=%' and p.product_id is null как один из вариантов А можете обяснить чуток что этот запрос сделает ? Link to comment Share on other sites More sharing options... chukcha Posted March 26, 2018 Share Posted March 26, 2018 https://dev.mysql.com/doc/refman/5.7/en/delete.html Link to comment Share on other sites More sharing options... Mister85 Posted March 26, 2018 Share Posted March 26, 2018 Ребята, а кто возьмется поправить за вознаграждение? Link to comment Share on other sites More sharing options... chukcha Posted March 26, 2018 Share Posted March 26, 2018 3 минуты назад, Mister85 сказал: Ребята, а кто возьмется поправить за вознаграждение? а вы каким боком к теме? Link to comment Share on other sites More sharing options... Mister85 Posted March 26, 2018 Share Posted March 26, 2018 владелец этого магазина Link to comment Share on other sites More sharing options... chukcha Posted March 26, 2018 Share Posted March 26, 2018 пишите в личку. 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 0 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 2.x Opencart 2.x: General questions Чистка url_alias_id Покупателям Оплата дополнений физическими лицами Оплата дополнений юридическими лицами Политика возвратов Разработчикам Регламент размещения дополнений Регламент продаж и поддержки дополнений Виртуальный аккаунт автора Политика продвижения объявлений API каталога дополнений Урегулирование споров по авторским правам Полезная информация Публичная оферта Политика возвратов Политика конфиденциальности Платежная политика Политика Передачи Персональных Данных Политика прозрачности Последние дополнения Chameleon - Responsive & Multipurpose Opencart Template + Quick Start By 29aleksey Wayforpay API оплата для Opencart 2.3, 3.x By bogdan281989 TgMarket - Модуль интернет магазина в телеграмме. By Rassol2 ShowCase – Responsive / Multipurpose Opencart Template By octemplates Telnotification By Yevhenii_7777
masskill Posted March 26, 2018 Author Share Posted March 26, 2018 3 minutes ago, chukcha said: DELETE u FROM `url_alias` u left JOIN product p ON CONCAT('product_id=',p.product_id) = query WHERE `query` LIKE 'product_id=%' and p.product_id is null как один из вариантов А можете обяснить чуток что этот запрос сделает ? Link to comment Share on other sites More sharing options...
chukcha Posted March 26, 2018 Share Posted March 26, 2018 https://dev.mysql.com/doc/refman/5.7/en/delete.html Link to comment Share on other sites More sharing options... Mister85 Posted March 26, 2018 Share Posted March 26, 2018 Ребята, а кто возьмется поправить за вознаграждение? Link to comment Share on other sites More sharing options... chukcha Posted March 26, 2018 Share Posted March 26, 2018 3 минуты назад, Mister85 сказал: Ребята, а кто возьмется поправить за вознаграждение? а вы каким боком к теме? Link to comment Share on other sites More sharing options... Mister85 Posted March 26, 2018 Share Posted March 26, 2018 владелец этого магазина Link to comment Share on other sites More sharing options... chukcha Posted March 26, 2018 Share Posted March 26, 2018 пишите в личку. 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 0 Go to topic listing Recently Browsing 0 members No registered users viewing this page. Последние темы Последние дополнения Последние новости All Activity Home Opencart 2.x Opencart 2.x: General questions Чистка url_alias_id
Mister85 Posted March 26, 2018 Share Posted March 26, 2018 Ребята, а кто возьмется поправить за вознаграждение? Link to comment Share on other sites More sharing options...
chukcha Posted March 26, 2018 Share Posted March 26, 2018 3 минуты назад, Mister85 сказал: Ребята, а кто возьмется поправить за вознаграждение? а вы каким боком к теме? Link to comment Share on other sites More sharing options... Mister85 Posted March 26, 2018 Share Posted March 26, 2018 владелец этого магазина Link to comment Share on other sites More sharing options... chukcha Posted March 26, 2018 Share Posted March 26, 2018 пишите в личку. 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 0 Go to topic listing Recently Browsing 0 members No registered users viewing this page.
Mister85 Posted March 26, 2018 Share Posted March 26, 2018 владелец этого магазина Link to comment Share on other sites More sharing options...
chukcha Posted March 26, 2018 Share Posted March 26, 2018 пишите в личку. 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 0
Recommended Posts