Jump to content

soporte_bb

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by soporte_bb

  1. Hola, He hecho un modulo y quiero mostrar las miniaturas de las imágenes en el renderlist. He creado la siguiente función en el admin del módulo: public function renderList () { if (!\Tools::isSubmit('addModuleItem') && !\Tools::isSubmit('updateModuleItem')) { $this->fields_list = array( 'id' => array( 'title' => $this->l('ID'), 'align' => 'center', 'class' => 'fixed-width-xs', 'type' => 'int', 'orderBy' => true, 'search' => true ), 'image' => array( 'title' => $this->l('Image'), 'orderBy' => false, 'search' => false, 'image' => 'myModuleImages', ), 'name' => array( 'title' => $this->l('Name'), 'orderBy' => true, 'search' => true ), 'link' => array( 'title' => $this->l('Link'), ) ); $helperList = new HelperList(); $helperList->shopLinkType = ''; $helperList->list_id = ''; $helperList->simple_header = false; $helperList->actions = array('edit', 'delete',); $helperList->identifier = 'id'; $helperList->show_toolbar = true; $helperList->orderBy = 'position'; $helperList->position_identifier = 'id'; $helperList->title = $this->l('Items list'); $helperList->table = "myModule"; $helperList->show_filters = true; $helperList->token = \Tools::getAdminTokenLite('AdminmyModule'); $helperList->currentIndex = \AdminController::$currentIndex . '&configure=' . $this->name; $helperList->bulk_actions = array( 'enable' => array( 'text' => $this->l('Enable selection'), 'icon' => 'icon-power-off text-success' ), 'disable' => array( 'text' => $this->l('Disable selection'), 'icon' => 'icon-power-off text-danger' ), 'divider' => array( 'text' => 'divider' ), 'delete' => array( 'text' => $this->l('Delete selection'), 'icon' => 'icon-trash', 'confirm' => $this->l('Delete selected items?') ) ); $ListItems = \myModuleClass::getAllItems(); return $helperList->generateList($ListItems, $this->fields_list); } } En la configuración del módulo, donde se listan los items, se ve la columna de la imagen de la siguiente forma (Ver captura). El minicuadradito a la derecha de los números, si se inspecciona el elemento se ve lo siguiente. <img src="/mi_prestashop/img/tmp/myModuleImages_mini__1.?time=1530265762" alt="" class="imgm img-thumbnail"> En la parte donde pone: mini__1, debería poner un numero que seria el ID, para que quedase tal que así: mini_2_1, siendo 2 el ID del elemento.
×
×
  • Create New...