Futamiya Posted February 1, 2022 Share Posted February 1, 2022 Hello, I used a module. And this module, display a table/dashboard value : you can see this on the image But the array repeat 5/6 times the same value. This is the code php : public function __construct() { $this->context = Context::getContext(); $this->table = 'apmarketplace_product'; $this->identifier = 'id_apmarketplace_product'; $this->className = 'ApmarketplaceProduct'; $this->lang = false; $this->bootstrap = true; parent::__construct(); $this->addRowAction('edit'); $this->_select = 'sa.user_name, p_l.name, p.active, p.date_add'; $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'apmarketplace_vendor` sa ON (a.`id_apmarketplace_vendor` = sa.`id_apmarketplace_vendor`)'; $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'product` p ON (a.`id_product` = p.`id_product`)'; $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'product_lang` p_l ON (a.`id_product` = p_l.`id_product`)'; $this->_where .= 'AND p_l.id_lang = ' . (int)Context::getContext()->language->id; $this->fields_list = array( 'id_apmarketplace_product' => array('title' => $this->l('ID Product Vendor'), 'width' => 100), 'name' => array('title' => $this->l('Nom du Produit'), 'width' => 100), 'user_name' => array('title' => $this->l('Nom du franchisé'), 'width' => 100), 'active' => array( 'title' => $this->l('Status'), 'width' => 100, 'type' => 'bool', 'active' => 'status' ), 'date_add' => array('title' => $this->l('Date Ajoutée'), 'width' => 100, 'type' => 'date'), ); } Do you have an idea ? Please Thanks Sincerely Futamiya Link to comment Share on other sites More sharing options...
MEG Venture Posted February 1, 2022 Share Posted February 1, 2022 Seems that id_apmarketplace_product has multiple products for each id_apmarketplace_vendor. Link to comment Share on other sites More sharing options...
Futamiya Posted February 1, 2022 Author Share Posted February 1, 2022 Oh ok thank you 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now