Jump to content

belicslavko

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by belicslavko

  1. I have a problem. I need to create module for custom upload image. Render form function: public function renderForm() { // Building the Add/Edit form $this->fields_form = array( 'legend' => array( 'title' => $this->l('Create/Edit design') ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Name:'), 'name' => 'name', 'size' => 33, 'required' => true, ), array( 'type' => 'file', 'label' => $this->l('Image:'), 'name' => 'image', 'display_image' => TRUE, 'desc' => $this->l('Upload image from your computer') ), ), 'submit' => array( 'title' => $this->l(' Save '), 'class' => 'submit' ), ); return parent::renderForm(); } In objectmodel I need to add image upload definition. MyObject class: class MyObject extends ObjectModel { /** @var string Name */ public $name; public $image; public $id_design; /** * @see ObjectModel::$definition */ public static $definition = array( 'table' => 'design', 'primary' => 'id_design', 'fields' => array( 'name' => array( 'type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 64 ), 'image' => array( 'type' => self::TYPE_STRING, 'required' => true, ), ), ); } After submit this form name is save but image is not upload. Any Help?
  2. Hi, I want to overload navigation template file: /admin/themes/template/nav.tpl I put code in /my_module_dir/override/controller/admin/template/nav.tpl code: {extends file="nav.tpl"} <h1>TEST</h1> I clear cache and restart module but code not showing. Any Help?
  3. Hi, I build a module for products customization. I need a hook in Admin -> Orders -> View an Order -> Products section down where Customization is normally listed. If use 'displayInvoice' or 'displayAdminOrder' code shows on the top of the page, but I need in the products list. Any help?
×
×
  • Create New...