feat: update styles

This commit is contained in:
2025-08-08 17:13:41 +03:00
parent 5f785e82e6
commit ca3a59f43a
11 changed files with 93 additions and 32 deletions

View File

@@ -47,7 +47,7 @@ class ImageTool implements ImageToolInterface
$image = $this->manager->make($fullOldPath)
->resize($width, $height, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
// $constraint->upsize();
})
->resizeCanvas($width, $height, 'center', false, null);

View File

@@ -57,8 +57,8 @@ class ProductsHandler
$mainpageProducts = $params['mainpageProducts'];
$languageId = 1;
$categoryName = '';
$imageWidth = 184;
$imageHeight = 245;
$imageWidth = 300;
$imageHeight = 300;
if ($categoryId) {
$categoryName = $this->queryBuilder->newQuery()
@@ -243,6 +243,8 @@ class ProductsHandler
$languageId = 1;
$imageWidth = 500;
$imageHeight = 500;
$imageFullWidth = 1000;
$imageFullHeight = 1000;
$product = $this->queryBuilder->newQuery()
->select([
@@ -299,7 +301,7 @@ class ProductsHandler
[$width, $height] = $this->ocImageTool->getRealSize($imagePath);
$images[] = [
'thumbnailURL' => $this->ocImageTool->resize($imagePath, $imageWidth, $imageHeight, 'placeholder.png'),
'largeURL' => $this->ocImageTool->getUrl($imagePath),
'largeURL' => $this->ocImageTool->resize($imagePath, $imageFullWidth, $imageFullHeight, 'placeholder.png'),
'width' => $width,
'height' => $height,
'alt' => $product['product_name'],