The essence of the module is to output reviews with content that are added through the admin panel, the review displays an iframe from YouTube, a logo, a company name, a description and several images. It is possible to add, edit and delete reviews. The module itself was written in a few hours and there are probably errors somewhere, please inform if possible
Everything you do with your site you do at your own risk, I do not bear any responsibility for you and your actions
- The SQL code from the
dump.sql
file must be executed into the database - Upload all files from the
upload
folder to the root folder - In the admin panel, go to extensions and modifiers => modifiers and update the modifier cache
At this stage, the module can be considered installed and now it is displayed in the admin panel in extensions => extensions / modules => "Content reviews". In use, the module adheres to the classic opencart UI, so there should be no problems
Now you need to output the module on the client side
- You need to decide on which page to display the module, let's say you need to display it on the main page (home)
- Go to the home page
controller
in the directorycatalog/controller/common/home.php
and before the line$data['column_left'] = $this->load->controller('common/column_left');
insert the line
$data['reviews_content'] = $this->load->controller('extension/module/content');
- Next, go to the hone page
view
by directorycatalog/view/theme/YOUR_THEME/template/common/home.twig
and paste in the right place
{{ reviews_content }}
- Now I suggest updating the modifier cache again (item 3 installation)
In the future, there are ideas and a desire to develop the module. I will be glad to receive any feedback. You can contact me in telegram
Суть модуля в выводе отзывов с контентом, которые добавляются через админку, в отзыве выводится iframe из ютуба, логотип, название компании, описание и несколько изображений. Есть возможность добавлять, редактировать и удалять отзывы. Сам модуль был написан за несколько часов и где-то наверняка присутсвуют ошибки, прошу информировать по возможности
Всё что Вы делаете со своим сайтом Вы делате на свой страх и риск, я не несу никакую ответственность за Вас и Ваши действия
- SQL код из фала
dump.sql
необходимо выполнить в базу данных - Все файлы из папки
upload
загрузить в корневую папку - В админке перейти в расширения и модификаторы => модифкаторы и обновить кэш модификаторов
На данном этапе модуль можно считать установленным и теперь он отображается в админке в расширения => расширения / модули => "Контент-отзывы". В использовании модуль соблюдает классический UI опенкарт`а поэтому не должно возникнуть никаких проблем
Теперь нужно вывести модуль в клиентской части
- Нужно решить на какой странице нужно вывести модуль, допустим нужно вывести на главной странице (home)
- Переходим к контроллеру главной страницы по директории
catalog/controller/common/home.php
и перед строкой$data['column_left'] = $this->load->controller('common/column_left');
вставляем строчку
$data['reviews_content'] = $this->load->controller('extension/module/content');
- Далее переходим к вью главной страницы по директории
catalog/view/theme/ТВОЯ_ТЕМА/template/common/home.twig
и в нужном месте вставляем
{{ reviews_content }}
- Теперь предлагаю еще раз обновить кэш модификаторов (п.3 установка)
В дальнейшем, есть идеи и желание развивать модуль. Буду рад любой обратной связи. Связаться можно через телеграм