Jump to content

Formulario de pedidos


jamsei

Recommended Posts

hace 2 horas, jamsei dijo:

Donde puedo reducir el numero de caracteres del campo teléfono en el formulario de pedido, cual es el archivo .PHP o tpl ?  

Buenos dias @jamsei tienes que buscar el directorio xxxx\classes\Address.php si trabajas con PS 1.7 y dentro buscas :

            'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32),
            'phone_mobile' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32),

y ya lo modificas a tu gusto.

Espero haberte ayudado ;)

 

Link to comment
Share on other sites

Otra opción menos "invasiva" es editar el tpl del formulario de creación de direcciones (/themes/nombre-de-tu-tema/templates/customer/partials/address-form.tpl), y añadir algo como lo de la última línea del código:

  <section class="form-fields">
    {block name='form_fields'}
      {foreach from=$formFields item="field"}
        {if $field['name']=='phone'|| $field['name']=='phone_mobile'}{$field['maxLength']='12'}{/if}

En lugar del valor '12', pon el que tú necesites. De esta forma el que limita la longitud es el propio navegador. Es menos seguro que la opción que te da ZP (perdón, @JavierP), pero se puede hacer simplemente editando una plantilla de tu tema.

Edited by Prestafan33 (see edit history)
Link to comment
Share on other sites

  • 2 weeks later...

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