在Prestashop中定制注册表单

Ros*_*ana 5 php prestashop-1.6

我是Prestashop框架的新手(v 1.6),我需要对主题进行更改.

在prestashop注册表单中,我得到如下页面.

无论如何,我需要更改该表单的属性,如添加新字段或删除已存在的字段

我在哪里可以找到此页面的源html代码部分,如何删除此页面的字段.如果我从表单中删除字段会影响页面的任何其他功能吗?(例如,如何从此表单中删除生日字段?)

yen*_*rak 7

你应该编辑themes/default-bootsrap/authentication.tpl.表格从这一行开始:

<form action="{$link->getPageLink('authentication', true)|escape:'html':'UTF-8'}" method="post" id="account-creation_form" class="std box">
Run Code Online (Sandbox Code Playgroud)

您可以删除可选字段(例如Date of Birth),而不会产生任何后果.

要删除Date of Birth删除这些行:

<div class="form-group">
    <label>{l s='Date of Birth'}</label>
    <div class="row">
        <div class="col-xs-4">
            <select id="days" name="days" class="form-control">
                <option value="">-</option>
                {foreach from=$days item=day}
                    <option value="{$day}" {if ($sl_day == $day)} selected="selected"{/if}>{$day}&nbsp;&nbsp;</option>
                {/foreach}
            </select>
            {*
                {l s='January'}
                {l s='February'}
                {l s='March'}
                {l s='April'}
                {l s='May'}
                {l s='June'}
                {l s='July'}
                {l s='August'}
                {l s='September'}
                {l s='October'}
                {l s='November'}
                {l s='December'}
            *}
        </div>
        <div class="col-xs-4">
            <select id="months" name="months" class="form-control">
                <option value="">-</option>
                {foreach from=$months key=k item=month}
                    <option value="{$k}" {if ($sl_month == $k)} selected="selected"{/if}>{l s=$month}&nbsp;</option>
                {/foreach}
            </select>
        </div>
        <div class="col-xs-4">
            <select id="years" name="years" class="form-control">
                <option value="">-</option>
                {foreach from=$years item=year}
                    <option value="{$year}" {if ($sl_year == $year)} selected="selected"{/if}>{$year}&nbsp;&nbsp;</option>
                {/foreach}
            </select>
        </div>
    </div>
</div>
Run Code Online (Sandbox Code Playgroud)

确保在开发期间Template compilation设置为Force compilation并在PrestaShop后台Cache设置No- > Advanced Parameters- >  Performance.