PAKORTIZ Posted February 24, 2020 Share Posted February 24, 2020 (edited) Que tal amigos, tengo un asunto, para agregar un campo en la parte de direcciones ... vi un tutortial en internet http://nemops.com/new-customer-address-fields-prestashop/#.XlRBGyhKjIX y todo va muy bien hasta buscar el front de las direcciones para agregar el campo, alguien puede darme un dato de donde debo modificar esto {if $field_name eq 'vat_number'} <div id="vat_area"> <div id="vat_number"> <div class="form-group"> <label for="vat-number">{l s='VAT number'}</label> <input type="text" class="form-control validate" data-validate="{$address_validation.$field_name.validate}" id="vat-number" name="vat_number" value="{if isset($smarty.post.vat_number)}{$smarty.post.vat_number}{else}{if isset($address->vat_number)}{$address->vat_number|escape:'html':'UTF-8'}{/if}{/if}" /> </div> </div> </div> {/if} ... {if $field_name eq 'my_custom_field'} <div id="vat_area"> <div id="my_custom_field"> <div class="form-group"> <label for="my-custom-field">{l s='My Custom Field'}</label> <input type="text" class="form-control validate" data-validate="{$address_validation.$field_name.validate}" id="my-custom-field" name="my_custom_field" value="{if isset($smarty.post.my_custom_field)}{$smarty.post.my_custom_field}{else}{if isset($address->my_custom_field)}{$address->my_custom_field|escape:'html':'UTF-8'}{/if}{/if}" /> </div> </div> </div> {/if} Edited February 26, 2020 by PAKORTIZ (see edit history) Link to comment Share on other sites More sharing options...
PAKORTIZ Posted February 25, 2020 Author Share Posted February 25, 2020 Bueno ya pude agregar un campo, pero ahora me gustaría hacer un check box o una lista, donde puedo cambiar esos datos, alguna idea por favor Link to comment Share on other sites More sharing options...
Luis C Posted March 11, 2020 Share Posted March 11, 2020 El procedimiento debería ser el mismo. En lugar de añadir en el template un input text (<input type="text" ) añades un input checkbox, o un select (<input type="checkbox" || <select>) Y luego en el controlador cambias el tipo de campo a lo que corresponda: array( 'type' => 'checkbox', o array( 'type' => 'select', 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