Jump to content

McGoo

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Location
    Poland
  • First Name
    Marek
  • Last Name
    Niewiadomski

Recent Profile Visitors

298 profile views

McGoo's Achievements

Newbie

Newbie (1/14)

0

Reputation

1

Community Answers

  1. Hi, I installed newest version of presta, I also installed template. All worked smoothly until I did copy in "/ app / themes / theme1" of "_dev" and "assets". I just wanted to have a copy of this catalogs and files files (so I had _dev-copy and assets-copy). After that I got 500. In the admin section I get ... see attachment. Nothing else was changed there. Any idea what can be cause of issue? Appreciate any help.
  2. Hi, I try to add new field to registration process. When user trying to registry and "company name", "Vat number" is filed I want to add also file to registration with "Company registration documents". What I already did : I add specyfic validation for files in classes\Validate.php. I add file field in $definition = array : \classes\Customer.php. /** * @see ObjectModel::$definition */ public static $definition = array( 'table' => 'customer', 'primary' => 'id_customer', 'fields' => array( 'secure_key' => array('type' => self::TYPE_STRING, 'validate' => 'isMd5', 'copy_post' => false), 'lastname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), 'firstname' => array('type' => self::TYPE_STRING, 'validate' => 'isName', 'required' => true, 'size' => 32), 'email' => array('type' => self::TYPE_STRING, 'validate' => 'isEmail', 'required' => true, 'size' => 128), 'passwd' => array('type' => self::TYPE_STRING, 'validate' => 'isPasswd', 'required' => true, 'size' => 32), 'last_passwd_gen' => array('type' => self::TYPE_STRING, 'copy_post' => false), 'id_gender' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId'), 'birthday' => array('type' => self::TYPE_DATE, 'validate' => 'isBirthDate'), 'newsletter' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'newsletter_date_add' => array('type' => self::TYPE_DATE,'copy_post' => false), 'ip_registration_newsletter' => array('type' => self::TYPE_STRING, 'copy_post' => false), 'optin' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), 'website' => array('type' => self::TYPE_STRING, 'validate' => 'isUrl'), 'company' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'), 'siret' => array('type' => self::TYPE_STRING, 'validate' => 'isSiret'), 'ape' => array('type' => self::TYPE_STRING, 'validate' => 'validatenip', 'size' => 13),//@mcgoo 'outstanding_allow_amount' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat', 'copy_post' => false), 'show_public_prices' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), 'id_risk' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'copy_post' => false), 'max_payment_days' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'copy_post' => false), 'active' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), 'note' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml', 'size' => 65000, 'copy_post' => false), 'is_guest' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), 'id_shop' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false), 'id_shop_group' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false), 'id_default_group' => array('type' => self::TYPE_INT, 'copy_post' => false), 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'copy_post' => false), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false), 'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false), 'file' => array('type' => self::TYPE_STRING, 'validate' => 'filevalidation', 'size' => 130),//@mcgoo ), ); I also add to : authentication.tpl <p class="form-group"> <label for="file">{l s='Company registration documents'}</label> <input type="file" class="form-control" id="file" name="file" /> </p> Of course, I also add file field to data base. I want to only save file path to database. But I don't know how. Did I missed something?
×
×
  • Create New...