gabriel nogue Posted September 2, 2014 Share Posted September 2, 2014 Bonjour, J'ai besoin d'attibuer a mes categories de produit 4 images miniatures mais leur nombre est limité à 3. Y a t il un fichier de configuration dans les codes qui me permette d'augmenter ce nombre max de miniatures de 3 à 4. D'avance merci. Gabriel Link to comment Share on other sites More sharing options...
titeuf913 Posted September 10, 2014 Share Posted September 10, 2014 Bon j'ai eu du mal à trouver mais pour ma part sa fonctionne. dans le module blockcategories ligne 169 : public function hookDisplayBackOfficeCategory($params) { $category = new Category((int)Tools::getValue('id_category')); $files = array(); if ($category->level_depth != 2) return; for ($i=0;$i<3;$i++) { if (file_exists(_PS_CAT_IMG_DIR_.(int)$category->id.'-'.$i.'_thumb.jpg')) { $files[$i]['type'] = HelperImageUploader::TYPE_IMAGE; $files[$i]['image'] = ImageManager::thumbnail(_PS_CAT_IMG_DIR_.(int)$category->id.'-'.$i.'_thumb.jpg', $this->context->controller->table.'_'.(int)$category->id.'-'.$i.'_thumb.jpg', 100, 'jpg', true, true); $files[$i]['delete_url'] = Context::getContext()->link->getAdminLink('AdminBlockCategories').'&deleteThumb='.$i.'&id_category='.(int)$category->id; } } $helper = new HelperImageUploader(); $helper->setMultiple(true)->setUseAjax(true)->setName('thumbnail')->setFiles($files)->setMaxFiles(4)->setUrl( Context::getContext()->link->getAdminLink('AdminBlockCategories').'&ajax=1&id_category='.$category->id .'&action=uploadThumbnailImages'); $this->smarty->assign('helper', $helper->render()); return $this->display(__FILE__, 'views/blockcategories_admin.tpl'); } Link to comment Share on other sites More sharing options...
Atch Posted September 10, 2014 Share Posted September 10, 2014 Bonjour, Pouvez vous etre plus précis ? Vous parlez du nombre de produits en colonne sur une ligne ? Si c'est cela, il faut le configurer dans le fichier product.list.tpl et global.js V++ Atch 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