lukaszw Posted April 2, 2015 Share Posted April 2, 2015 Hello, I want to change the thumbnail size in default product list in back office.I already did that in orders by override, but this is totally different level of difficulty for me. Want to do that also by override but after looking into AdminProductsController.php ... I totally don't know where to start. Found only this in : $this->fields_list['image'] = array( 'title' => $this->l('Image'), 'align' => 'center', 'image' => 'p', 'orderby' => false, 'filter' => false, 'search' => false ); in function __construct which I think generates table of products.Some other users was asking about that earlier, but nobody posted solution.--PS 1.6.0.11 Link to comment Share on other sites More sharing options...
PascalVG Posted April 4, 2015 Share Posted April 4, 2015 I believe you can just add some css in your admin-theme.css: in file: /<your admin folder>/themes/default/css/admin-theme.css, add this piece of code: #table-product .img-thumbnail { width: 180px; // adjust size as needed... } result: Hope this helps, pascal. Link to comment Share on other sites More sharing options...
lukaszw Posted April 13, 2015 Author Share Posted April 13, 2015 That way resolution of images are still 45x45. Not so good.Found that way: into /controllers/admin/AdminProductsController.php add new array definition to function __construct(), under $this->fields_list['image'] = array... definition: $this->fields_list['id_image'] = array( 'title' => 'test', 'align' => 'center', 'orderby' => false, 'filter' => false, 'search' => false, 'class' => 'idimg' ); add line to funtion setMedia(): $this->addJs(__PS_BASE_URI__.$this->admin_webpath.'/themes/'.$bo_theme.'/js/jquery.admprod.js'); create file: /adminX/themes/default/js/jquery.admprod.js $(function() { $('.imgm').hover( function(){ var idobrazu = $.trim($(this).parent().next().text()); var n = idobrazu.length; var url = '/img/p/'; for (i=0; i<n; i++){ url = url+idobrazu.charAt(i)+'/'; } url = url+idobrazu+'.jpg'; var obrazek = $('<img id="dynamicProd">'); obrazek.attr('src', url); obrazek.appendTo('#main'); }, function(){ $('#dynamicProd').remove(); }); }); into /adminX/themes/default/css/overrides.css: .idimg { display:none; } .adminproducts #form-product table#table-product thead tr th:nth-child(4) { display:none; } #dynamicProd { top: 50%; left: 50%; ; margin-top: -240px; position: fixed; z-index: 1001; border:1px solid #000; } 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