Привет всем! Сегодня мы разберемся, как включить удаление заказов в Prestashop. Вопрос это очень интересный, учитывая, что данный функционал в админке магазина отсутствует, а заказы иногда удалять нужно 🙂
Решение очень простое:
1. В файле (/controllers/admin/AdminOrdersController.php) найдите 43 строку.
2. После нее добавьте $this->addRowAction(‘delete’);
Итоговый код должен быть такой:
$this->bootstrap = true;
$this->table = ‘order’;
$this->className = ‘Order’;
$this->lang = false;
$this->addRowAction(‘view’);
$this->explicitSelect = true;
$this->allow_export = true;
$this->deleted = false;
$this->context = Context::getContext();
// Включить удаление заказов
$this->addRowAction(‘delete’);
Как видите — все просто 🙂
Как всегда — в случае возникновения вопросов пишите на почту или в Telegram.
Support the Blog!
Running a blog takes a lot of effort, time, and passion. Your donations help improve the content, inspire new ideas, and keep the project going.
If you’ve enjoyed the blog’s materials, any support would mean the world to me. Thank you for being here! ❤️