FilipHavlicek Posted January 12, 2018 Share Posted January 12, 2018 Hello all, I'm a newcomer to this forum. I have some basic piece of code my first module, which has the ability to enable / disable the display of the title in the customer account registration. Switching the hide option in the administration works. However, my question of her: How do I modify the original prestashop file order-opc-new-account.tpl for hide this code from the form called from my module without modifying original files? <div class="required clearfix gender-line"> <label>{l s='Social title'}</label> {foreach from=$genders key=k item=gender} <div class="radio-inline"> <label for="id_gender{$gender->id_gender}" class="top"> <input type="radio" name="id_gender" id="id_gender{$gender->id_gender}" value="{$gender->id_gender}"{if isset($smarty.post.id_gender) && $smarty.post.id_gender == $gender->id_gender || (isset($guestInformations) && $guestInformations.id_gender == $gender->id_gender)} checked="checked"{/if} /> {$gender->name}</label></div> {/foreach} </div> through a module based on ORDERS_SOCIALTITLE boolean, which will be TRUE Code: https://pastebin.com/raw/km42mJv6 Sorry for my bad english, thanks! Link to comment Share on other sites More sharing options...
Pierre_d Posted January 13, 2018 Share Posted January 13, 2018 You mean, w/o modifying the original tpl file ? You can create a child theme, copy the original tpl in the child theme and modify it. Link to comment Share on other sites More sharing options...
FilipHavlicek Posted January 13, 2018 Author Share Posted January 13, 2018 (edited) Yes, I need to edit the .tpl file that is part of the prestashop through the module. Specifically, hide the gender field of the customer. How can I do it? How can I create child theme in module? Edited January 14, 2018 by FilipHavlicek (see edit history) Link to comment Share on other sites More sharing options...
Pierre_d Posted January 15, 2018 Share Posted January 15, 2018 http://developers.prestashop.com/themes/smarty/parent-child-feature.html Once you've created the theme, you simply copy the .tpl that you want to modify in your child theme, using the same directory structure as the parent theme. PS will then use your modified tpl. Don't forget to force recompilation of template (BO > Advanced parameters > Performance...). Beware that the cache files will be created within your child theme directories. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now