Jump to content

webmonger

Members
  • Posts

    2
  • Joined

  • Last visited

Profile Information

  • First Name
    web
  • Last Name
    Monger

webmonger's Achievements

Newbie

Newbie (1/14)

0

Reputation

1

Community Answers

  1. I think i found why in PrestaShop 1.7 the extrafield is not auto-inserted to database as in PrestaShop 1.6. In AddressController, postProcess: $this->address_form->fillWith(Tools::getAllValues()); The Tools::getAllValues() already contains all value submitted. But the address_form's fillWith only fill the field from the country's format address. In the end, it would be great if actionAddressSave is added to core
  2. I am adding custom field to address by overiding Address class: <?php class Address extends AddressCore { public $extrafield; public function __construct($id_address = null, $id_lang = null) { self::$definition['fields']['extrafield'] = array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'size' => 64); parent::__construct($id_address, $id_lang); } } Also I have modified the template to add the new input field. This scenario is working in PrestaShop 1.6, new input is saved in database. But in PrestaShop 1.7, the new input is not saved in database. Am I missing something here ? Thanks
×
×
  • Create New...