Jump to content

unable to edit category.tpl file


Recommended Posts

Hi there, I am new to Prestashop and have been customising the main theme for a new ecommerce store. I have run into a problem whereby I don't seem able to edit the category.tpl file within the prestashop themes folder. What I want to do is remove the tag that says either 'There are no products' or for example 'There are 2 products' and sits right next to the h1 tag that displays the category title. I have checked file permissions and these are set to 777 (read, write and execute). However, when I make any changes to this file and upload it to the server, nothing changes!

I assume that to do the above I remove:


{if $category->id == 1 OR $nb_products == 0}{l s='There are no products.'}
{else}
{if $nb_products == 1}{l s='There is'}{else}{l s='There are'}{/if}
{$nb_products}
{if $nb_products == 1}{l s='product.'}{else}{l s='products.'}{/if}
{/if}


from the category.tpl file which I have done and then re-uploaded the file but this does nothing. To test, I deleted the complete code from the category.tpl file and uploaded it (which should mess everything up) but still nothing changes! I can only assume it's an FTP or server issue although I have no problem editing the css files within the same folder (or any other issues with ftp'ing files and images etc).....so I am very confused.....

If anyone could help it woud be great as I'm tairing my hair out here! For reference the link to my store is here: http://shoesandhandbags.site50.net/category.php?id_category=2

Thanks, Sam

Link to comment
Share on other sites

what version of PrestaShop are you using?
Are you using custom theme or default?

If you are using custom theme, please make sure you are editing the under the correct theme folder
please also try to clear the smarty cache under following folder

/tools/smarty/compile/

  • Like 1
Link to comment
Share on other sites

What's more - I have set up a test version of Prestashop v.1.3 and edited the category.tpl file and this has worked! On the same web host!

Can anyone offer a clue as to what's going on here? Is it a bug in Prestashop v.1.4?

Has anyone else had trouble editing the .tpl files in this latest version? PLEASE let me know.

Sam

Link to comment
Share on other sites

OK - I found another post that detailed the same issue. It seems that Force Complile is not turned on by default in Prestashop v1.4 so for anyone having the same issue go to:

Back Office - Preferences - Performance - Then enable 'Force Compile' and 'Cache'.

This will enable you to edit the .tpl files!

:)

Sam

Link to comment
Share on other sites

Back Office – Preferences – Performance – Then enable ‘Force Compile’ and ‘Cache’.


That is what I suggested you to do in my previous post. To clear cache manually as following

please also try to clear the smarty cache under following folder
/tools/smarty/compile/
  • Like 1
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...