Search the Community
Showing results for tags 'hookDisplayAdminProductsExtra'.
-
Hi Dev's, I've got stucked while saving data from product page where i've craeted the field through the module via hookDisplayAdminProductsExtra. And i didn't get an idea to save new field data from the admin product page. So, please help if anyone have solution for this. Thank You.
- 4 replies
-
- hook
- adminproductpage
-
(and 2 more)
Tagged with:
-
How to create a new tab Prestashop 1.7 ? Prestashop 1.6 public function hookDisplayAdminProductsExtra() { $this->context->smarty->assign(array( 'id_product' => Tools::getValue('id_product'), 'id_lang' => $this->context->language->id, 'languages' => Language::getLanguages(), 'default_language' => $this->default_language, )); return $this->display(__FILE__, 'views/templates/admin/tab.tpl'); } In the new version also creates a new tab... But how to connect file tab.html.twig ? Transfer variables with the value of ? Thanks.
-
Hi, i am creating a module on Presta 1.7.2, i would like to add a table of products in the admin product section (with the hook displayAdminProductsExtra). This is a simplified version of my code public function hookDisplayAdminProductsExtra($params) { $products = MyModel::getProducts(); $helper = new HelperList(); $helper->shopLinkType = ''; $helper->simple_header = true; $helper->identifier = 'id'; $helper->show_toolbar = true; $helper->title = 'HelperList'; $helper->table = $this->name . '_mytable'; $helper->token = Tools::getAdminTokenLite('AdminModules'); $helper->currentIndex = AdminController::$currentIndex.'&configure='.$this->name; return $helper->generateList($products, array( 'id' => array( 'title' => 'ID', 'type' => 'text' ), 'name' => array( 'title' => 'Nom', 'type' => 'text' ) )); } It generate the following error : Twig_Error_Runtime in form.html.twig line 951: An exception has been thrown during the rendering of a template ("Unable to load template file 'helpers/list/list_header.tpl'"). The template file exists, i tried to do some debugging in HelperList class, but no luck so far. Anyone can help ?
-
- 1
-
-
- twig
- hookDisplayAdminProductsExtra
- (and 4 more)
-
Ajout D'une Tab Sur Admin Product
Nicolas (Stafe) posted a topic in PrestaShop pour les développeurs
Bonjour, J'ai entrepris de développer un module nécessitant l'ajout d'une tab dans l'admin d'un produit. Jusque là pas de problème, je me hook sur le hookDisplayAdminProductsExtra. Là où j'ai dû probablement loupé quelque chose, c'est au moment d'ajouter mes nouveaux champs au product_form. Voulant faire les choses proprement, j'ai utilisé le HelperForm, sans me rendre compte tout de suite que toutes les tabs sont englobées dans un seul et même <form> ! Donc je me retrouve avec un <form> dans un <form> : pas bien ! Je n'ai pour le moment pas trouvé de solution à ce problème. Y-a-t-il un moyen pour que le HelperForm::generateForm ne génère que les champs, sans le <form> </form> ? Merci d'avance à toi qui prend le temps de lire ce petit post Bonne journée.- 6 replies
-
- Product Tab
- HelperForm
-
(and 1 more)
Tagged with:
-
Hi all! I'm working on a module and I use the hookDisplayAdminProductsExtra to show the module's control panel to users. It's ok on the PS versions >= 1.5.4.0. Today I was testing on the 1.5.0.1 version and I found that my custom tab is not showing at all in the list on the left.. I suppose my code is correct (with the newer versions it works).. maybe I need to use some particular way to implement the hookDisplayAdminProductsExtra in this PS version? Thanks
- 6 replies
-
- hookDisplayAdminProductsExtra
- 1.5.0.1
-
(and 2 more)
Tagged with:
-
How can I know product ID (or get the product object) in hook DisplayAdminProductsExtra It is not passed in the params variable.