Jump to content

Edit .tpl files


Recommended Posts

after changes in tpl files:

- turn on force compile in adv. paramters > performance tab in your back office

- turn off cache (the same tab in BO)

 

do it temporarily, when you will stop workin on templates, switch these options to original values.

 

 

in addition, make sure that your .tpl files of modules (if you edit module .tpl files) dont exist in themes/YOUR_THEME/modules dir.

if so - you have to edit these files instead of original module .tpl files.

Link to comment
Share on other sites

Thank you for your answer!

 

I would like to edit Login Form and delete some fields like (Company, Phone...). 

 

Besides, I would like to change "State" field for "Province".

 

How should I do this? Deleting/changing the fields in the authentication tpl file or how?

 

 

Thank you!

Link to comment
Share on other sites

Authentication.tpl modificaiton (themes/authentication.tpl) + preferences in back office to hide unwanted fields (localization > countries >edit for country)

 

in addition, one phone number is necessary for prestashop.

Link to comment
Share on other sites


if (!Tools::getValue('phone') && !Tools::getValue('phone_mobile'))

$error_phone = true;

}

elseif (((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') || Configuration::get('PS_ORDER_PROCESS_TYPE')) 

&& (Configuration::get('PS_ORDER_PROCESS_TYPE') && !Tools::getValue('email_create')))

&& (!Tools::getValue('phone') && !Tools::getValue('phone_mobile')))

$error_phone = true;

elseif (((Configuration::get('PS_REGISTRATION_PROCESS_TYPE') && Configuration::get('PS_ORDER_PROCESS_TYPE') && Tools::getValue('email_create')))

&& (!Tools::getValue('phone') && !Tools::getValue('phone_mobile')))

$error_phone = true;

Link to comment
Share on other sites

I restored the files. However, now I have an error. How can I fix it?

 

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/homepages/42/d514753301/htdocs/clickandbuilds/Prestashop/basketshoponline/themes/coffeeshop_theme/authentication.tpl" on line 234 "<form action="../default/themes/default/{$link->getPageLink('authentication', true, NULL, "back=$back")|escape:'html'}" method="post" id="new_account_form" class="std clearfix">" - Unexpected "&"' in /homepages/42/d514753301/htdocs/clickandbuilds/Prestashop/basketshoponline/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:665 Stack trace: #0 /homepages/42/d514753301/htdocs/clickandbuilds/Prestashop/basketshoponline/tools/smarty/sysplugins/smarty_internal_templateparser.php(3144): Smarty_Internal_TemplateCompilerBase->trigger_template_error() #1 /homepages/42/d514753301/htdocs/clickandbuilds/Prestashop/basketshoponline/tools/smarty/s in/homepages/42/d514753301/htdocs/clickandbuilds/Prestashop/basketshoponline/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 665

Link to comment
Share on other sites

Hi!

 

Line 234 is this:

 

{if isset($inOrderProcess) && $inOrderProcess && $PS_GUEST_CHECKOUT_ENABLED}
 
 
And Dreamweaver advice that the error is in line 36:
 
var idSelectedCountry = {if isset($smarty.post.id_state)}{$smarty.post.id_state|intval}{else}false{/if};
 
 
Anyone can help me find the syntax error, please?
Link to comment
Share on other sites

  • 6 years later...

Helo..Im New to prestashop. I created one custom module for payment gatway. and i need to edit error.tpl file inside that module. i edited tpl file after enabling force compilation and no cache. but it wont works for me. i need to show one message (response from payment like invalid pin, insufficient fund)in that file.Please answer..

Thank youu

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...