Jump to content

Recommended Posts

Подскажите, как создать свою страницу tpl?

Хочу сделать отдельный раздел Распродажа, в нем выводить все товары со скидкой (как "Акционные товары" на главной (по-умолчанию))
в .htaccess дописал:
 

# Распродажа
RewriteRule ^sale/?$	index.php?module=SaleView [L,QSA]

 

в папке View сделал файл SaleView.php
в Design/my-design/html sale.tpl

результат - 404 страница не найдена

пробовал создать страницу по адресу /sale через админку - то же самое

Помогите, что я делаю не так?

Спасибо!

Link to post
Share on other sites

Сделал также, но страница так и не открывается. Точнее она открывается только по адресу сайт.ru/index.php?module=SaleView
Создаю страницу с /sale , ничего не происходит. Пустая

 

Записывал в .htaccess

# Распродажа

RewriteRule ^sale/([^/]+)/?$    index.php?module=SaleView&url=$1 [L,QSA]
RewriteRule ^sale/?$    index.php?module=SaleView [L,QSA]
Link to post
Share on other sites

Спасибо!

Дело было именно в этом.

В файле SaleView.php имя класса должно быть class SaleView

 

также в конце єтого файла - указівается шаблон страницы ... .tpl

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...