Jump to content

Search the Community

Showing results for tags 'fields_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. PrestaShop Version: 1.7.6.5 Coding Knowledge: Intermediate (Learning PrestaShop) I have developed a module that I intend to use to modify the "AdminSuppliers" controller list view in the back office. In fact I've been able to hook into the "actionAdminSuppliersListingFieldsModifier" hook in order to do just that (see attached screenshot). On the supplier list view this custom button's value is determined by a newly added custom setting that can also be toggled on the supplier edit page. On the supplier edit page when a supplier is saved the "hookActionAdminSaveAfter" is used to capture the newly added custom setting value. The problem I'm facing is that the button on the list view is simply not toggling this value in the same way, and I'm sure that I am missing a piece of information that would allow this value to be toggled on the list view. Note that I want this button to toggle the newly added custom value in the exact way the "Status" button toggles the supplier's enabled/disabled status. The only code I have for adding this button so far is the below: public function hookActionAdminSuppliersListingFieldsModifier( $params ) { // This adds the value to the list, but is not saving since there is no AdminController "processHide_products" function. $params['fields']['hide_products'] = [ 'title' => $this->trans( 'Hide assoc. products' ), 'align' => 'center', 'type' => 'bool', 'orderby' => false, 'class' => '', 'active' => 'hide_products' ]; } When the newly created custom button on the list view is clicked it tries opening the following link: "index.php?controller=AdminSuppliers&id_supplier=<id_supplier>&hide_productssupplier&token=<token>" To make this button acccess and save its custom value, should this URL be changed? What is the best way to implement this button? Thank you in advance for any assistance.
  2. Bonjour, j'ai développe un module sous Prestashop 1.6, maintenant j'ai du mal a gérer deux tables dans la base de données, je sais pas exactement comment je peux manipuler les fields_list mais ça va pour les forms. voila un morceau de code : public function getContent() { $output = null; if (Tools::isSubmit('submit'.$this->name)) { $my_module_name = strval(Tools::getValue('printpics')); if (!$my_module_name || empty($my_module_name) || !Validate::isGenericName($my_module_name)) $output .= $this->displayError($this->l('Invalid Configuration value')); else { Configuration::updateValue('printpics', $my_module_name); $output .= $this->displayConfirmation($this->l('Settings updated')); } } return $output.$this->displayForm(); } public function displayForm() { // Get default language $default_lang = (int)Configuration::get('PS_LANG_DEFAULT'); // Init Fields form array $fields_form[0]['form'] = array( 'legend' => array( 'title' => $this->l('Settings'), ), 'input' => array( array( 'type' => 'text', 'label' => $this->l('Configuration champs'), 'name' => 'MYMODULE_NAME', 'size' => 20, 'required' => true ) ), 'submit' => array( 'title' => $this->l('Save'), 'class' => 'button' ) ); $helper = new HelperForm(); // Load current value $helper->fields_value['MYMODULE_NAME'] = Configuration::get('MYMODULE_NAME'); return $helper->generateForm($fields_form); }
  3. I'm facing a few problems here and can't seem to find any solutions for it, any help would be much appreciated: 1) I'm trying to add in a downloadable link into the CRUD table. 2) The show more details button does not work (nothing happens when i click on it) 3) How can I disable the clicking on each row that directs the user to the edit page? 4) I'm using PS 1.6.0.5 AdminUserUploads (A custom tab in back office) <?php class AdminUserUploads extends AdminController { public function __construct(){ $this->bootstrap = true; $this->table = "customer_uploads"; $this->className = "MyUploads"; $this->lang = false; $this->deleted = false; $customer_id = (int)Tools::getValue('id_customer_uploads'); $this->context = Context::getContext(); $this->fields_list = array( 'id_customer_uploads' => array( 'title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs' ), 'p_name' => array( 'title' => $this->l('Product Name'), 'align' => 'center', 'class' => 'fixed-width-xs' ), 'p_desc' => array( 'title' => $this->l('Product Description'), 'align' => 'center', 'class' => 'fixed-width-xs' ), 'p_cost' => array( 'title' => $this->l('Production Cost'), 'align' => 'center', 'type' => 'price', 'class' => 'fixed-width-xs' ), 'id_customer' => array( 'title' => $this->l('Customer ID'), 'align' => 'center', 'class' => 'fixed-width-xs' ), 'c_name' => array( 'title' => $this->l('Customer Name'), 'align' => 'center', 'class' => 'fixed-width-xs' ), 'c_contact' => array( 'title' => $this->l('Contact Number'), 'align' => 'center', 'class' => 'fixed-width-xs' ), 'c_email' => array( 'title' => $this->l('Email'), 'align' => 'center', 'class' => 'fixed-width-xs' ), 'attachment' => array( 'title' => $this->l('Attachments'), 'align' => 'center', 'class' => 'fixed-width-xs' ), 'upload_date' => array( 'title' => $this->l('Upload Date'), 'type' => 'date', 'align' => 'center', 'class' => 'fixed-width-xs' ), 'active' => array( 'title' => $this->l('Status'), 'align' => 'center', 'active' => 'status', 'type' => 'bool', 'class' => 'fixed-width-xs' ) ); parent::__construct(); } public function renderList(){ //$this->actions = array('edit', 'delete', 'view'); $this->addRowAction('details'); return parent::renderList(); } public function rednerForm(){ //$this->fields_form = array() return parent::renderForm(); } public function ajaxProcess() { $query = "SELECT * FROM customer_uploads WHERE id_customer_uploads = '$customer_id'"; echo Tools::jsonEncode(array( 'data' => Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($query), 'fields_display' => $this->fieldsDisplay = array( 'id_customer_uploads' => array('title' => $this->l('ID')), 'p_name' => array('title' => $this->l('Product Name')), 'p_desc' => array('title' => $this->l('Product Description')), 'upload_date' => array('title' => $this->l('Upload Date')), 'active' => array('title' => $this->l('Status')) ) )); die(); } }
  4. Hi there, I am trying to hide the product-id from my backoffice product page. By removing $this->fields_list['id_product'] = array( 'title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs', 'type' => 'int' ); from my AdminProductsController.php I get a fatal error as the id is needed for further processes. That's why I want to hide the ID but I couldn't figure out how to do it. Does anybody have an idea how this can be achieved? Thanks a lot!
×
×
  • Create New...