Change image size category did not work

LiteCart Fan
Od Thailand
Členem od srp 2017

I am trying to change the size of the category images. I am following this: [url=https://www.litecart.net/forums/2/general-discussions/6645/change-the-size-of-category-images]Change size image category[/url]
I could change the size of the images of the products in func_draw.inc.php I did change the ratio in admin. But the same fix (I reduced from 320 to 120) did not work for the size of the categories images.
I also change something in the listing.less but any change doesn't reflect in the size of the categories images.
In the file listing_category.inc.php I could manage to remove all the images of the categories but not resize.
I think I should work on the container of the category images, but I don't know where it is or how exactley the categories images are working.
Change the size of the products images was very easy.
Thank you, bye.

tim
Founder
Od Sweden
Členem od kvě 2013
tim

~/pages/category.inc.php line ~48

'image' => functions::image_thumbnail(FS_DIR_HTTP_ROOT . WS_DIR_IMAGES . $category->image, 1024, 0, 'FIT_ONLY_BIGGER'),

LiteCart Fan
Od Thailand
Členem od srp 2017

I try to modify that file but nothing change.
I also try to delete it completely from the server to understand why the modification did not have any result and the image are still there huge, I think that is not the file I have to modify. Here the page after I delete the file~/pages/category.inc.php, I also navigate it from proxysite.com:
[img]https://iceagethai.com/test/cats-crop.jpg[/img]
What is missing after I delete ~/pages/category.inc.php is that when I enter a category I have the message "NOT FOUND" obviously.
The images of category are too big, how to do it? What is managing that size?
Thank you, bye.

LiteCart Fan
Od Thailand
Členem od srp 2017

[img]https://iceagethai.com/test/happy.jpg[/img]
I solved: the fix must be apply in litecart_installation/includes/templates/default.catalog/css/app.min.css
in the following css:
.categories.row (there will be 6 of them). For better fix unminify before code.
By the way, I did not find anywhere the 320x480 size.
But when I change the css to my desires, should I also change other parameters in other file?

tim
Founder
Od Sweden
Členem od kvě 2013
tim

We recommend playing with the LESS files and have CSS generated by a LESS compilator.

The CSS does not set a size. The image is being displayed relative to the size of the grid objects. Setting a fixed width might give you trouble in different screen resolutions.

LiteCart Fan
Od Thailand
Členem od srp 2017

So now that I changed the css, the less compiler will overwrite it? I mean, I should change the less file then use a compiler and then overwrite the css with the generated css, right? But where is the less file that is on top of app.min.css?

Yes I did set a % width instead of a fixed width, but this grid, where I can modify it?

Thank you

LiteCart Fan
Od Thailand
Členem od srp 2017

Thank you, I will work on it.
Bye

tim
Founder
Od Sweden
Členem od kvě 2013
tim

LiteCart uses the same grid syntax as Bootstrap 3. Although five in a row is not supported in Bootstrap. LiteCart used to offer col-md-fifths that does that but I am unsure if it's still there as there is nothing on the site using five in a row.

You can peek in your template folder less/framework/grid.less if col-md-fifths is present. Otherwise you can grab from a previous version.

LiteCart Fan
Od Thailand
Členem od srp 2017

Ok I will try it.
Thank you

Merchant
Od United Kingdom
Členem od bře 2021

Is there an updated page to this, as I am also trying to locate where to change image size of categories, and the data is no longer in the file ~/pages/category.inc.php line ~48

LiteCart Fan
Od Thailand
Členem od srp 2017

Hello, at the time I changed it adding a style class for the div that contain img in
public_html/includes/templates/default.catalog/views/listing_category.inc.php

Merchant
Od United Kingdom
Členem od bře 2021

The image defaults to 480 pixels, so somewhere that is being set ?
Regards

LiteCart Fan
Od Thailand
Členem od srp 2017

I did like this:


.nameofnewclass img {margin:o auto;max-width:250px}
</style>
  <div class="category hover-light nameofnewclass" data-id="<?php echo $category_id; ?>" data-name="<?php echo htmlspecialchars($name); ?>">```
Let me know if works for you
Vy
This website uses no cookies and no third party tracking technology. We think we can do better than others and really think about your privacy.