feat(shop): change grid image resize algorythm
This commit is contained in:
@@ -60,7 +60,6 @@ class ControllerExtensionModuleTgshop extends Controller
|
||||
|
||||
public function index(): void
|
||||
{
|
||||
$this->load->language('extension/module/tgshop');
|
||||
$this->load->model('setting/setting');
|
||||
|
||||
$hasConfig = $this->config->get('module_tgshop_app_name') !== null;
|
||||
@@ -182,6 +181,7 @@ class ControllerExtensionModuleTgshop extends Controller
|
||||
|
||||
private function baseData(array &$data): void
|
||||
{
|
||||
$this->load->language('extension/module/tgshop');
|
||||
$this->document->setTitle($this->language->get('heading_title'));
|
||||
|
||||
$data['header'] = $this->load->controller('common/header');
|
||||
|
||||
@@ -44,10 +44,12 @@ class ImageTool implements ImageToolInterface
|
||||
mkdir($dirPath, 0777, true);
|
||||
}
|
||||
|
||||
$image = $this->manager->make($fullOldPath)->resize($width, $height, function ($constraint) {
|
||||
$image = $this->manager->make($fullOldPath)
|
||||
->resize($width, $height, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
$constraint->upsize();
|
||||
});
|
||||
})
|
||||
->resizeCanvas($width, $height, 'center', false, null);
|
||||
|
||||
$image->encode($format, 75)->save($fullNewPath, 75, $format);
|
||||
}
|
||||
|
||||
@@ -53,8 +53,8 @@ class ProductsHandler
|
||||
$featuredProducts = $this->settings->get('featured_products');
|
||||
$mainpageProducts = $this->settings->get('mainpage_products');
|
||||
|
||||
$imageWidth = 200;
|
||||
$imageHeight = 200;
|
||||
$imageWidth = 184;
|
||||
$imageHeight = 245;
|
||||
|
||||
if ($categoryId) {
|
||||
$categoryName = $this->queryBuilder->newQuery()
|
||||
|
||||
Reference in New Issue
Block a user