Jump to content

Add custom field to my address


pavell86
 Share

Recommended Posts

i want add field input to my address, but after click save show error

Call to undefined method Validate:  in classes/ObjectModel.php on line 1029

I added to the template

  <label for="dph">{l s='custom'}</label>
                        <input type="text" class="text" name="custom" value="{if isset($smarty.post.custom)}{$smarty.post.custom}{else}{if isset($address->custom)}{$address->custom|escape:'html'}{/if}{/if}" />
                    </p>

I have a column in the database custom

 

In file address.php

 'custom' =>     array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64),

Prestashop 1.5.

 


Can you help me with problem, please

Share this post


Link to post
Share on other sites

Just a double check, but you haven't

'custom' =>     array('type' => self::TYPE_STRING, 'Validate' => 'isGenericName', 'size' => 64),

 

 (With capital 'V' ) in your address.php definition of custom, or?

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More