php - How to set CMS page as homepage in Prestashop 1.6
Get the solution ↓↓↓Can anyone please help me with is question here.
I want to set a CMS page as homepage in prestashop 1.6 and still able to keep the old default Prestashop homepage as my Shop button link in menu still? please.
Answer
Solution:
This is a very good requirement. In order to achieve this you need to edit some core files on your store.
- Open /controllers/front/IndexController.php
Add the following code to the initContent() function
if (!Tools::isSubmit('home'))
Tools::redirect('contact');
Replace the 'contact' to the controller of any CMS page based upon your requirements.
- Open /themes/YOUR_THEME/header.tpl
Search for
{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}
Replace with
{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}?home=1{else}{$base_dir}?home=1{/if}
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: please make sure the php redis extension is installed and enabled.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.