Jump to content

New theme, via backend ok but manually not detected, what is going on behind the scenes?


Recommended Posts

Hi,

 

I am in the process of creating a new Prestashop theme and have followed the Prestashop documentation for version 1.6 here: http://doc.prestashop.com/display/PS16/Laying+the+Theme%27s+Foundations

 

Under the section From your operating system / FTP server, I've followed what it mentions and I get no detection within my Prestashop install regarding the new theme (called the new theme folder, themeone), this is despite clearing cache via Prestashop and manually in the database.

 

I then followed the section From the back office which worked (calling the second theme, themetwo), but when I run a Ubuntu diff command on both folders, it comes back without any differences at all...?

 

My question is what is happening within Prestashop to detect a new theme by generating using Import theme -> Generate new theme as opposed to doing it manually?

 

I've also noticed this question being asked a couple of times already in the forums with people happily resolving the issue by going through Prestashop, but I'm not satisfied with the answer of doing it via the backend when there is no difference in the file/folder structure itself.

 

Regards,

Kaden

Edited by Kaideane (see edit history)
Link to comment
Share on other sites

Love answering my own question ^^

 

The answer to this is that Prestashop will not recognise your custom theme (i.e. when copying the default-bootstrap theme folder as a default template for your theme) until you indicate it within Prestashop by defining it within the database under the ps_theme table.

 

To accomplish this simply insert into the ps_theme table via PHPmyAdmin (or other database client) and fill out the following fields:

 

name - The name of your theme.

directory - Your themes directory (within the /theme/ folder).

product_per_page - Products per page, can default to 12.

 

No need to touch the id_theme field as it will auto-increment. 

 

See example below with an example theme named "ThemeOne" in a folder called "themeone":

 

ps_theme.png

 

Regards,

Kaden

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...