- +7(962)141-55-43
- @wpprog
- emel8881
- serj-post@mail.ru
Главная страница » Статьи » Как добавить новую страницу в PrestaShop
Добавить новую страницу в PrestaShop сложнее, чем в WordPress. К сожалению, информации по данной CMS достаточно немного.
Данный способ был проверен мной на PrestaShop 1.7.7.0 на сайте https://top1autovaruosad.ee
Создаем 2 файла:
1) /override/controllers/front/VinPageController.php
setTemplate('vinpage.tpl');
}
}
2) /themes/ваша_тема/templates/vinpage.tpl
{**
* 2007-2018 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License 3.0 (AFL-3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* https://opensource.org/licenses/AFL-3.0
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA
* @copyright 2007-2018 PrestaShop SA
* @license https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
{extends file='page.tpl'}
{block name='page_header_container'}{/block}
{block name='left_column'}
{* {widget name="ps_contactinfo" hook='displayLeftColumn'} *}
{hook h="displayContactForm7" id="2"}
{/block}
{block name='page_content'}
{l s='Поиск по VIN'}
{* {widget name="contactform"} *}
{* {hook h="displayContactForm7" id="2"} *}
{/block}
После всех манипуляций нужно удалить файл /var/cache/prod/class_index.php.
ВНИМАНИЕ! ОБЯЗАТЕЛЬНО создайте резервную копию!
Затем настраиваем страницу в админке таким образом: