GNDavid Posted October 27, 2016 Share Posted October 27, 2016 Hi. I nead to put a flag in adress for saying if it is invoice address or delivery address: I KNOW how to put it in DATABASE. I KNOW how tu put it in classes and controlers. I DON´T KNOW how to insert it in form in "order opc-new account.tpl" (I have one page checkout) How can I put : $variableFlag =1; in the form ( if $variableFlag was the variable already created) between: {elseif $field_name eq "lastname"} <div class="required form-group"> <label for="lastname_invoice">{l s='Last name'} <sup>*</sup></label> <input type="text" class="form-control validate" id="lastname_invoice" name="lastname_invoice" data-validate="isName" value="{if isset($guestInformations) && isset($guestInformations.lastname_invoice) && $guestInformations.lastname_invoice}{$guestInformations.lastname_invoice}{/if}" /> </div> and: {elseif $field_name eq "address1"} <div class="required form-group"> <label for="address1_invoice">{l s='Address'} <sup>*</sup></label> for example? Thanks Link to comment Share on other sites More sharing options...
shokinro Posted October 28, 2016 Share Posted October 28, 2016 it is better to use HTML ta attribute to hide the HTML element for the field instead of not rendering the HTML element so it will be something like <label for="address1_invoice" style="display:{if something}none;{else};{/if}">{l s='Address'} <sup>*</sup></label> If you do not render the HTML element, it may cause some javascript error since PrestaShop may use some of the fields in JS code. Link to comment Share on other sites More sharing options...
GNDavid Posted November 14, 2016 Author Share Posted November 14, 2016 OK Thanks 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