Gold1s Posted February 1, 2015 Share Posted February 1, 2015 Hi there, I was add new field required during on registration (checkbox with agreement rules) and I have a problem. Prestashop 1.5.6.2 1. During adding new user on administration panel - error was occured: "Property Customer->zgoda2 is empty". Where I have to add code to admin files? 2. When user want to edit your's adress - he musn't click on checkbox with agreement rules - the changes are add. So required doesn't work at well. 3. When user choose delivery - the error was show: zgoda2 is empty. I've add code zgoda2 to: (code from originally prestashop + below - my code): classes/Customer.php /** @var integer Password */ public $passwd; /** @var boolean zgoda2*/ public $zgoda2; 'passwd' => array('type' => self::TYPE_STRING, 'validate' => 'isPasswd', 'required' => true, 'size' => 32), 'zgoda2' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'required' => true), themes/default/adress.tpl <p class="required text" id="adress_alias"> <label for="alias">{l s='Please assign an address title for future reference.'} <sup>*</sup></label> <input type="text" id="alias" name="alias" value="{if isset($smarty.post.alias)}{$smarty.post.alias}{else if isset($address->alias)}{$address->alias|escape:'html'}{elseif !$select_address}{l s='My address'}{/if}" /> </p> <p class="checkbox" > <input type="checkbox" name="zgoda2" id="zgoda2" value="1" /> <label for="zgoda2">Oświadczam, iż zapoznałem/am się z treścią <a href="./index.php?id_cms=10&controller=cms" target="_blank">Regulaminu Sklepu</a> i akceptuję wszystkie jego postanowienia.</label> <sup><span style="color:#900">*</span></sup> </p> themes/default/authentication.tpl <select id="years" name="years"> <option value="">-</option> {foreach from=$years item=year} <option value="{$year}" {if ($sl_year == $year)} selected="selected"{/if}>{$year} </option> {/foreach} </select> </p> <p class="checkbox" > <input type="checkbox" name="zgoda2" id="zgoda2" value="1" /> <label for="zgoda2">Oświadczam, iż zapoznałem/am się z treścią <a href="./index.php?id_cms=10&controller=cms" target="_blank">Regulaminu Sklepu</a> i akceptuję wszystkie jego postanowienia.</label> <sup><span style="color:#900">*</span></sup> </p> <select id="years" name="years"> <option value="">-</option> {foreach from=$years item=year} <option value="{$year}" {if ($sl_year == $year)} selected="selected"{/if}>{$year} </option> {/foreach} </select> </p> <p class="checkbox" > <input type="checkbox" name="zgoda2" id="zgoda2" value="1" /> <label for="zgoda2">Oświadczam, iż zapoznałem/am się z treścią <a href="./index.php?id_cms=10&controller=cms" target="_blank">Regulaminu Sklepu</a> i akceptuję wszystkie jego postanowienia.</label> <sup><span style="color:#900">*</span></sup> </p> themes/default/identity.tpl <select id="years" name="years"> <option value="">-</option> {foreach from=$years item=v} <option value="{$v}" {if ($sl_year == $v)}selected="selected"{/if}>{$v} </option> {/foreach} </select> </p> <p class="checkbox" > <input type="checkbox" name="zgoda2" id="zgoda2" value="1" /> <label for="zgoda2">Oświadczam, iż zapoznałem/am się z treścią <a href="./index.php?id_cms=10&controller=cms" target="_blank">Regulaminu Sklepu</a> i akceptuję wszystkie jego postanowienia.</label> <sup><span style="color:#900">*</span></sup> </p> themes/default/order_carrier.tpl <p class="checkbox"> <input type="checkbox" name="cgv" id="cgv" value="1" {if $checkedTOS}checked="checked"{/if} autocomplete="off"/> <label for="cgv">{l s='I agree to the terms of service and will adhere to them unconditionally.'}</label> <a href="{$link_conditions}" class="iframe">{l s='(Read the Terms of Service)'}</a> </p></div> <p class="checkbox" > <input type="checkbox" name="zgoda2" id="zgoda2" value="1" /> <label for="zgoda2">Oświadczam, iż zapoznałem/am się z treścią <a href="./index.php?id_cms=10&controller=cms" target="_blank">Regulaminu Sklepu</a> i akceptuję wszystkie jego postanowienia.</label> <sup><span style="color:#900">*</span></sup> </p> themes/default/order_opc_new_account.tpl <select id="years" name="years"> <option value="">-</option> {foreach from=$years item=year} <option value="{$year|escape:'htmlall':'UTF-8'}" {if isset($guestInformations) && ($guestInformations.sl_year == $year)} selected="selected"{/if}>{$year|escape:'htmlall':'UTF-8'} </option> {/foreach} </select> </p> <p class="checkbox" > <input type="checkbox" name="zgoda2" id="zgoda2" value="1" /> <label for="zgoda2">Oświadczam, iż zapoznałem/am się z treścią <a href="./index.php?id_cms=10&controller=cms" target="_blank">Regulaminu Sklepu</a> i akceptuję wszystkie jego postanowienia.</label> <sup><span style="color:#900">*</span></sup> </p> Link to comment Share on other sites More sharing options...
Gold1s Posted February 12, 2015 Author Share Posted February 12, 2015 Someone know, how to resolve this problem? 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