Jump to content

Search the Community

Showing results for tags 'Helper List'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Help and Support
    • PrestaShop Download
    • PrestaShop Addons
  • News and Announcements
    • PrestaShop news and releases
    • PrestaShop Beta
    • PrestaShop Blogs
    • PrestaShop Meetups
  • International community (English)
    • General topics
    • PrestaShop Merchants
    • PrestaShop Developers
    • Taxes, Translations & Laws
    • Community Modules and Themes
  • Forum francophone
    • Discussion générale
    • Aide et support communautaire
    • PrestaShop pour les marchands
    • PrestaShop pour les développeurs
    • Adaptation aux lois Québécoises
    • Modules et thèmes gratuits
    • Modules et thèmes payants
  • Foro en Español
    • Discusión general
    • Soporte de la comunidad y ayuda
    • Comerciantes PrestaShop
    • Desarrolladores PrestaShop
    • Módulos y plantillas gratuitas
  • Forum italiano
    • Forum generale
    • Aiuto e supporto della Community
    • Commercianti PrestaShop
    • Sviluppatori PrestaShop
    • Aspetti legali sull'eCommerce
    • Moduli e template gratuiti
  • Deutsches Forum
    • Generelle Fragen
    • Support und Hilfe aus der Community
    • e-Commerce/Versand-Handel mit Prestashop
    • Prestashop-Entwickler
    • Anpassung an deutsches Recht
    • Kostenlose Module und Templates
    • Generelle Fragen Copy
  • Nederlandstalig forum
    • Algemeen
    • Hulp en ondersteuning, van en voor de community
    • PrestaShop-winkeliers
    • PrestaShop-ontwikkelaars
    • Het aanpassen van PrestaShop
    • Gratis modules en templates
  • Fórum em Português
    • Fórum Geral
    • Ajuda e Suporte da Comunidade
    • Lojistas que utilizam o PrestaShop
    • Desenvolvedores PrestaShop
    • Legislação específica
    • Módulos e temas gratuitos
  • Polskie forum
    • Forum ogólne
    • Wsparcie i pomoc użytkowników
    • Oferty twórców PrestaShop
    • Deweloperzy PrestaShop
    • Darmowe Moduły i Szablony
  • Dansk forum
    • Generelt forum
    • Hjælp og support fra fællesskabet
    • PrestaShop for købmænd
    • PrestaShop for udviklere
    • Love og regler
    • Gratis moduler og temaer
  • České fórum
    • Instalasi, Konfigurasi dan upgrade
    • Obecná diskuze
    • Bezplatné moduly a šablony
    • PrestaShop vývojáři
    • PrestaShop obchodníci
  • Bahasa Indonesia
    • Diskusi Umum
    • Podpora a pomoc komunity
    • Laporan Bug
    • Jasa, Promosi & Lowongan Kerja
  • Svenskt forum
    • Allmän diskussion
    • Installation, konfigurering och uppdatering
  • Forumul românesc
    • Discuţii generale
    • Instalare, configurare şi upgrade
  • Pусский язык
    • Обсуждение скрипта
    • Установка, Настройка, Обновление
    • Прием багов
  • Slovenské fórum
    • Všeobecná diskusia
    • Podpora a pomoc komunity
    • PrestaShop obchodníci
    • PrestaShop vývojári
    • Bezplatné moduly a šablóny
  • Türkçe Topluluğu
    • Genel Konular
    • Topluluk desteği ve yardım
    • PrestaShop Tüccarları
    • Prestashop Geliştiricileri
    • Ücretsiz Modül ve Temalar
  • Diễn đàn tiếng Việt
    • Thảo luận chung
    • Hỗ trợ từ cộng đồng
    • Dành cho chủ doanh nghiệp / cửa hàng
    • Dành cho lập trình viên
  • PrestaShop Communities
    • اللغه العربيه [Arabic]
    • Ελληνικά [Greek]
    • עִבְרִית [Hebrew]
    • 中文
    • Magyar [Hungarian]
    • 日本語 [Japanese]
    • Lietuviškai [Lithuanian]
    • انجمن فارسی [Persian]
    • ไทย [Thai]
    • Malaysia [Malaysian]
    • Eesti [Estonian]
    • Slovenščina [Slovenian]
    • Српски [Serbian]
  • IP. Board Forum
    • IP. Board Forum Questions and Issues
  • Archive
    • Zapłać Moduły i Szablony [ARCHIVE]
    • Moduly, upravy a dizajn [ARCHIVE]
    • Phát triển và các mô-đun [ARCHIVE]
    • Yazılım, Modül ve Tema [ARCHIVE]
    • Модули, Шаблоны [ARCHIVE]
    • Module şi teme [ARCHIVE]
    • Pengembangan dan Modul [ARCHIVE]
    • Moduler och teman [ARCHIVE]
    • Ecommerce x PrestaShop [ARCHIVE BOARD]
    • Vývoj a moduly [ARCHIVE]
    • Kostenpflichtige Module, Templates [ARCHIVE]
    • Módulos y temas pagos [ARCHIVE]
    • Módulos e temas pagos [ARCHIVE]
    • Servizi commerciali [ARCHIVE]
    • Forum - Feedback Contributor
    • PrestaShop Cloud

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 4 results

  1. Salut j'ai crée un module dont la configuration doit contenir une liste et un deuxième formulaire de configuration indépendant . comme illustre l'image ci-dessous protected function initList() { $this->fields_list = array( 'id_info' => array( 'title' => $this->trans('ID', array(), 'Admin.Global'), 'width' => 120, 'type' => 'text', 'search' => false, 'orderby' => false ), 'title' => array( 'title' => $this->trans('Title', array(), 'Admin.Global'), 'width' => 100, 'type' => 'text', 'search' => false, 'orderby' => false ), 'active' => array( 'title' => $this->trans('Displayed', array(), 'Admin.Global'), 'type' => 'bool', 'active' => 'status', 'class' => 'fixed-width-xs', 'align' => 'center', 'ajax' => true, ), 'position' => array( 'title' => $this->trans('Position', array(), 'Admin.Global'), 'align' => 'center', 'class' => 'fixed-width-xs', 'position' => 'position', 'filter_key' => false ) ); $helper = new HelperList(); $helper->shopLinkType = ''; $helper->simple_header = false; $helper->actions = array('edit', 'delete'); $helper->show_toolbar = true; $helper->title = $this->displayName; $helper->table = 'eg_partners_infos'; $helper->identifier = 'id_eg_partners_infos'; $helper->position_identifier = 'id_egblockreassurance_to_move'; $helper->orderBy = 'position'; $helper->orderWay = 'ASC'; $helper->token = Tools::getAdminTokenLite('AdminModules'); $helper->currentIndex = AdminController::$currentIndex . '&configure=' . $this->name; $helper->imageType = 'jpg'; $helper->toolbar_btn['new'] = array( 'href' => AdminController::$currentIndex . '&configure=' . $this->name . '&add' . $this->name . '&token=' . Tools::getAdminTokenLite('AdminModules'), 'desc' => $this->trans('Add new', array(), 'Admin.Actions') ); return $helper; } /** * Create the form that will be displayed in the configuration of your module. */ protected function renderForm() { $helper = new HelperForm(); $helper->show_toolbar = false; $helper->table = $this->table; $helper->module = $this; $helper->default_form_language = $this->context->language->id; $helper->allow_employee_form_lang = Configuration::get('PS_BO_ALLOW_EMPLOYEE_FORM_LANG', 0); $helper->identifier = $this->identifier; $helper->submit_action = 'submitEg_partners_infosModule'; $helper->currentIndex = $this->context->link->getAdminLink('AdminModules', false) .'&configure='.$this->name.'&tab_module='.$this->tab.'&module_name='.$this->name; $helper->token = Tools::getAdminTokenLite('AdminModules'); $helper->tpl_vars = array( 'fields_value' => $this->getConfigFormValues(), /* Add values for your inputs */ 'languages' => $this->context->controller->getLanguages(), 'id_language' => $this->context->language->id, ); return $helper->generateForm(array($this->getConfigForm())); } comment pourrais -je ajouter le deuximè formualire de configuration ? Merci d'avance
  2. Bonjour, Je voudrais ajouter un champs 'En solde' dans la liste des produits en admin products, le champs s'affiche bien, mon problème est le filtrage me retourne une erreur 'ambiguious field on_sale', malgré j'ai bien spécifié l'alias $this->_select .= 'sa.`on_sale`'; $this->fields_list['on_sale'] = array( 'title' => $this->l('En solde'), 'filter_key' => sa.'!on_sale', 'align' => 'text-center', 'type' => 'bool', 'class' => 'fixed-width-sm', 'orderby' => false ); Merci d'avance.
  3. Hi everyone! I've created a Admin controller with an object model for table but when I use helper form for editing a row of table my changes doesnt save in database. and row that I've edit will be removed from list view !! this is my controller code: -------------------------------------------------------------------------------------------------------- <?php class AdminResellersreqControllerCore extends AdminController { public $description; public function initProcess() { $this->id_object = Tools::getValue('id_'.$this->table); if (Tools::isSubmit('changeStatus') && $this->id_object) $this->action = 'change_status'; parent::initProcess(); } public function __construct() { $this->bootstrap = true; $this->table = 'resellers_req'; $this->className = 'Resellersreq'; $this->lang = false; // Building the list of records stored within the "resellersreq" table $this->fields_list = array( 'firstname' => array( 'title' => $this->l('First Name'), 'align' => 'center', ), 'lastname' => array( 'title' => $this->l('Last Name'), 'width' => 'auto', ), 'req_date' => array( 'type' => 'date', 'title' => $this->l('Request Date'), 'width' => 'auto' ), // 'description' => array( // 'title' => $this->l('Description'), // 'width' => 'auto' // ), // 'status' => array( // 'title' => $this->l('Status'), // 'type' => 'bool', // 'callback' => 'ShowStatusIcon', // 'width' => 'auto' // ), 'id_customer' => array( 'title' => $this->l('Edit Group'), 'callback' =>'ShowCustomerGroupLink', 'width' => 'auto' ), ); $this->bulk_actions = array( 'delete' => array( 'text' => $this->l('Delete selected'), 'confirm' => $this->l('Delete selected items?') ) ); parent::__construct(); $id_shop = $this->context->shop->id; $this->_select = ' a.*, cu.firstname, cu.lastname'; $this->_join = 'LEFT JOIN '._DB_PREFIX_.'customer cu ON (cu.id_customer = a.id_customer)'; $this->_where = 'AND a.id_shop = '.(int)$id_shop; $this->processFilter(); } // This method generates the list of results public function renderList() { $this->addRowAction('edit'); return parent::renderList(); } public function renderForm() { $this->fields_form = array( 'legend' => array( 'title' => $this->l(''), ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Customer Description'), 'name' => 'description', //'values' => $this->description, 'style' => '', 'readonly' => true, //'class' => 't', 'rows' => 5, 'cols' => 35, // 'required' => true, 'desc' => $this->l('Customer Description'), ), array( 'type' => 'switch', 'label' => $this->l('Accept'), 'desc' => $this->l('Accepting or Rejecting a Customer'), 'name' => 'status', 'required' => true, 'class' => 't', 'is_bool' => true, 'values' => array( array( 'id' => 'active_on', 'value' => 1, 'label' => $this->l('Accept') ), array( 'id' => 'active_off', 'value' => 0, 'label' => $this->l('Reject') ) ), ), array( 'type' => 'textarea', 'autoload_rte' => true, //'class' => 'input fixed-width-sm', 'label' => $this->l('Shop Description'), 'name' => 'shop_description', 'rows' => 5, 'cols' => 35, // 'required' => true, 'desc' => $this->l('Your description for customer'), ), ), 'submit' => array( 'title' => $this->l(' Save '), 'class' => 'button btn btn-default pull-right' ) ); return parent::renderForm(); } public function ShowStatusIcon($id_resellers_req, $tr) { $resellersreq = new Resellersreq($tr['id_resellers_req']); if (!Validate::isLoadedObject($resellersreq)) return; return '<a class="list-action-enable'.($resellersreq->status ? ' action-enabled' : ' action-disabled').'" href="index.php?tab=AdminResellersreq&id_resellers_req='.(int)$resellersreq->id.'&changeStatus&token='.Tools::getAdminTokenLite('AdminResellersreq').'"> '.($resellersreq->status ? '<i class="icon-check"></i>' : '<i class="icon-remove"></i>'). '</a>'; } public function ShowCustomerGroupLink($id_resellers_req, $tr) { $resellersreq = new Resellersreq($tr['id_resellers_req']); if (!Validate::isLoadedObject($resellersreq)) return; return '<a class="edit btn btn-default" href="index.php?tab=AdminCustomers&id_customer='.(int)$resellersreq->id_customer.'&updatecustomer&token='.Tools::getAdminTokenLite('AdminCustomers').'"> '.$this->l('Edit Group').' </a>'; } public function processChangeStatus() { $resellersreq = new Resellersreq($this->id_object); if (!Validate::isLoadedObject($resellersreq)) $this->errors[] = Tools::displayError('An error occurred while updating this Request.'); $update = Db::getInstance()->execute('UPDATE `'._DB_PREFIX_.'resellers_req` SET status = '.($resellersreq->status ? 0 : 1).' WHERE `id_resellers_req` = '.(int)$resellersreq->id); if (!$update) $this->errors[] = Tools::displayError('An error occurred while updating this Request.'); Tools::clearSmartyCache(); Tools::redirectAdmin(self::$currentIndex.'&token='.$this->token); } } ----------------------------------------------------------------------------------- Code of Object Model : class ResellersreqCore extends ObjectModel { public $id; public $status; public $id_customer; public $firstname; public $lastname; /** @var string Name */ public $name; //public $editgroup; //public $shop_description; /** * @see ObjectModel::$definition */ public static $definition = array( 'table' => 'resellers_req', //'multishop' => true, 'primary' => 'id_resellers_req', 'fields' => array( 'id_shop' => array( 'type' => self::TYPE_INT, 'validate' => 'isUnsignedId' ), 'id_customer' => array( 'type' => self::TYPE_INT, 'validate' => 'isUnsignedId' ), 'req_date' => array( 'type' => self::TYPE_DATE, 'validate' => 'isDateFormat', ), 'description' => array( 'type' => self::TYPE_STRING, ), 'status' => array( 'type' => self::TYPE_INT, 'validate' => 'isUnsignedId', ), 'shop_description' => array( 'type' => self::TYPE_STRING, ), ), ); public function __construct($id_shop = null) { parent::__construct($id_shop); } } ---------------------------------------------------------------------------------------------------------------- Could anyone Help me? Tanx.
  4. Przy dodawaniu kodu SQL do AdminCategoriesController nie zwraca żadnego wyniku, za pomocą var_dump sprawdziłem zapytanie i jest ono poprawne. Może ktoś wie, co przeoczyłem? Problem powodują te 3 linijki, dodane do kodu $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'product` p ON (a.`id_category` = p.`id_category_default`)'; $this->_select .= 'COUNT(p.id_product)'; $this->_group .= 'GROUP BY a.id_category';
×
×
  • Create New...