Bonjour,

Je suis sur ce problème depuis pas mal de temps, j'aimerai sur Prestashop, lors du clic sur le bouton details que j'ai rajouté dans Catalogues->Produits, avoir la liste de toutes mes activités.


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
public function renderList() {
        $this->addRowAction('edit');
        $this->addRowAction('duplicate');
        $this->addRowAction('delete');
        $this->addRowAction('details');
 
        return parent::renderList();
    }
Le code se situe dans ajaxProcessDetails() mais quand je clique sur ce bouton details rien ne se passe :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
public function ajaxProcessDetails() {
 
        if (($id = Tools::getValue('id')))
		{
			// override attributes
			$this->display = 'list';
			$this->lang = false;
 
			$this->addRowAction('edit');
			$this->addRowAction('delete');
 
			$this->_select = 'a.`id_activite` AS id_act, a.`name`';
			$this->_join = 'LEFT JOIN `'._DB_PREFIX_.'product_activite` pa ON (p.`id_product` = pa.`id_product`)'
                                . 'LEFT JOIN `'._DB_PREFIX_.'activite` a ON (pa.`id_activite` = a.`id_activite`)';
			//$this->_where = 'AND p.`id_product` = '.(int)$id;
			//$this->_orderBy = 'position';
 
			// get list and force no limit clause in the request
			$this->getList($this->context->language->id);
 
			// Render list
			$helper = new HelperList();
			$helper->actions = $this->actions;
			$helper->list_skip_actions = $this->list_skip_actions;
			$helper->no_link = true;
			$helper->shopLinkType = '';
			$helper->identifier = $this->identifier;
			//$helper->imageType = $this->imageType;
			$helper->toolbar_scroll = false;
			$helper->show_toolbar = false;
			//$helper->orderBy = 'position';
			//$helper->orderWay = 'ASC';
			$helper->currentIndex = self::$currentIndex;
			$helper->token = $this->token;
			$helper->table = $this->table;
			$helper->position_identifier = $this->position_identifier;
			//Force render - no filter, form, js, sorting ...
			$helper->simple_header = true;
			$content = $helper->generateList($this->_list, $this->fields_list);
 
			echo Tools::jsonEncode(array('use_parent_structure' => false, 'data' => $content));
		}
 
		die;
Merci à vous.