Jump to content

Agregar campo en direcciones


PAKORTIZ

Recommended Posts

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 by PAKORTIZ (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

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

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