diff --git a/composer.json b/composer.json index 48d0cd2dd..5bbba23f3 100644 --- a/composer.json +++ b/composer.json @@ -12,6 +12,7 @@ "dimsav/laravel-translatable": "^9.0", "fideloper/proxy": "^4.0", "intervention/image": "^2.4", + "intervention/imagecache": "^2.3", "kalnoy/nestedset": "^4.3", "laravel/framework": "5.6.*", "laravel/tinker": "^1.0", diff --git a/composer.lock b/composer.lock index cb287d95e..ec992ced6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "ee788a0a8a86526cd58b0b4853a45c06", + "content-hash": "c0c2a23aa2502c590b2ccf7975329ce1", "packages": [ { "name": "commerceguys/intl", @@ -600,6 +600,59 @@ ], "time": "2018-05-29T14:19:03+00:00" }, + { + "name": "intervention/imagecache", + "version": "2.3.3", + "source": { + "type": "git", + "url": "https://github.com/Intervention/imagecache.git", + "reference": "7936b90e695daee1aafbd25221815352ef97bcbc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Intervention/imagecache/zipball/7936b90e695daee1aafbd25221815352ef97bcbc", + "reference": "7936b90e695daee1aafbd25221815352ef97bcbc", + "shasum": "" + }, + "require": { + "illuminate/cache": "~4|~5", + "illuminate/filesystem": "~4|~5", + "intervention/image": "dev-master|~2,>=2.2.0", + "jeremeamia/superclosure": "~1|~2", + "php": ">=5.3.0" + }, + "require-dev": { + "mockery/mockery": "~0.9.2", + "phpunit/phpunit": "3.*" + }, + "type": "library", + "autoload": { + "psr-4": { + "Intervention\\Image\\": "src/Intervention/Image" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Oliver Vogel", + "email": "oliver@olivervogel.net", + "homepage": "http://olivervogel.net/" + } + ], + "description": "Caching extension for the Intervention Image Class", + "homepage": "http://image.intervention.io", + "keywords": [ + "cache", + "gd", + "image", + "imagick", + "laravel" + ], + "time": "2015-09-22T15:22:47+00:00" + }, { "name": "jakub-onderka/php-console-color", "version": "0.1", @@ -752,6 +805,64 @@ ], "time": "2018-05-16T11:53:55+00:00" }, + { + "name": "jeremeamia/SuperClosure", + "version": "2.4.0", + "source": { + "type": "git", + "url": "https://github.com/jeremeamia/super_closure.git", + "reference": "5707d5821b30b9a07acfb4d76949784aaa0e9ce9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jeremeamia/super_closure/zipball/5707d5821b30b9a07acfb4d76949784aaa0e9ce9", + "reference": "5707d5821b30b9a07acfb4d76949784aaa0e9ce9", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^1.2|^2.0|^3.0|^4.0", + "php": ">=5.4", + "symfony/polyfill-php56": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0|^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "psr-4": { + "SuperClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia", + "role": "Developer" + } + ], + "description": "Serialize Closure objects, including their context and binding", + "homepage": "https://github.com/jeremeamia/super_closure", + "keywords": [ + "closure", + "function", + "lambda", + "parser", + "serializable", + "serialize", + "tokenizer" + ], + "time": "2018-03-21T22:21:57+00:00" + }, { "name": "kalnoy/nestedset", "version": "v4.3.2", @@ -2580,6 +2691,62 @@ ], "time": "2018-04-26T10:06:28+00:00" }, + { + "name": "symfony/polyfill-php56", + "version": "v1.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php56.git", + "reference": "7b4fc009172cc0196535b0328bd1226284a28000" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php56/zipball/7b4fc009172cc0196535b0328bd1226284a28000", + "reference": "7b4fc009172cc0196535b0328bd1226284a28000", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-util": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php56\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2018-08-06T14:22:27+00:00" + }, { "name": "symfony/polyfill-php72", "version": "v1.8.0", @@ -2635,6 +2802,58 @@ ], "time": "2018-04-26T10:06:28+00:00" }, + { + "name": "symfony/polyfill-util", + "version": "v1.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-util.git", + "reference": "8e15d04ba3440984d23e7964b2ee1d25c8de1581" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-util/zipball/8e15d04ba3440984d23e7964b2ee1d25c8de1581", + "reference": "8e15d04ba3440984d23e7964b2ee1d25c8de1581", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.9-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Util\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony utilities for portability of PHP codes", + "homepage": "https://symfony.com", + "keywords": [ + "compat", + "compatibility", + "polyfill", + "shim" + ], + "time": "2018-08-06T14:22:27+00:00" + }, { "name": "symfony/process", "version": "v4.1.2", diff --git a/config/app.php b/config/app.php index d34452c5f..d9aa90898 100644 --- a/config/app.php +++ b/config/app.php @@ -238,7 +238,8 @@ return [ 'View' => Illuminate\Support\Facades\View::class, 'Datagrid' => Webkul\Ui\DataGrid\Facades\DataGrid::class, 'ProductGrid' => Webkul\Ui\DataGrid\Facades\ProductGrid::class, - 'Image' => Intervention\Image\Facades\Image::class + 'Image' => Intervention\Image\Facades\Image::class, + 'Core' => Webkul\Core\Facades\Core::class ], ]; diff --git a/config/filesystems.php b/config/filesystems.php index 25a84a4bd..b36f4c121 100644 --- a/config/filesystems.php +++ b/config/filesystems.php @@ -51,7 +51,7 @@ return [ 'public' => [ 'driver' => 'local', 'root' => storage_path('app/public'), - 'url' => env('APP_URL').'/public/storage', + 'url' => env('APP_URL') . '/public/storage', 'visibility' => 'public', ], diff --git a/config/imagecache.php b/config/imagecache.php new file mode 100644 index 000000000..83dae729f --- /dev/null +++ b/config/imagecache.php @@ -0,0 +1,72 @@ + 'cache', + + /* + |-------------------------------------------------------------------------- + | Storage paths + |-------------------------------------------------------------------------- + | + | The following paths will be searched for the image filename, submited + | by URI. + | + | Define as many directories as you like. + | + */ + + 'paths' => array( + storage_path('app/public'), + public_path('storage') + ), + + /* + |-------------------------------------------------------------------------- + | Manipulation templates + |-------------------------------------------------------------------------- + | + | Here you may specify your own manipulation filter templates. + | The keys of this array will define which templates + | are available in the URI: + | + | {route}/{template}/{filename} + | + | The values of this array will define which filter class + | will be applied, by its fully qualified name. + | + */ + + 'templates' => array( + 'small' => 'Webkul\Product\CacheFilters\Small', + 'medium' => 'Webkul\Product\CacheFilters\Medium', + 'large' => 'Webkul\Product\CacheFilters\Large', + ), + + /* + |-------------------------------------------------------------------------- + | Image Cache Lifetime + |-------------------------------------------------------------------------- + | + | Lifetime in minutes of the images handled by the imagecache route. + | + */ + + 'lifetime' => 1, + // 'lifetime' => 43200, + +); diff --git a/config/repository.php b/config/repository.php new file mode 100644 index 000000000..a251120c6 --- /dev/null +++ b/config/repository.php @@ -0,0 +1,244 @@ + [ + 'limit' => 15 + ], + + /* + |-------------------------------------------------------------------------- + | Fractal Presenter Config + |-------------------------------------------------------------------------- + | + + Available serializers: + ArraySerializer + DataArraySerializer + JsonApiSerializer + + */ + 'fractal' => [ + 'params' => [ + 'include' => 'include' + ], + 'serializer' => League\Fractal\Serializer\DataArraySerializer::class + ], + + /* + |-------------------------------------------------------------------------- + | Cache Config + |-------------------------------------------------------------------------- + | + */ + 'cache' => [ + /* + |-------------------------------------------------------------------------- + | Cache Status + |-------------------------------------------------------------------------- + | + | Enable or disable cache + | + */ + 'enabled' => false, + + /* + |-------------------------------------------------------------------------- + | Cache Minutes + |-------------------------------------------------------------------------- + | + | Time of expiration cache + | + */ + 'minutes' => 30, + + /* + |-------------------------------------------------------------------------- + | Cache Repository + |-------------------------------------------------------------------------- + | + | Instance of Illuminate\Contracts\Cache\Repository + | + */ + 'repository' => 'cache', + + /* + |-------------------------------------------------------------------------- + | Cache Clean Listener + |-------------------------------------------------------------------------- + | + | + | + */ + 'clean' => [ + + /* + |-------------------------------------------------------------------------- + | Enable clear cache on repository changes + |-------------------------------------------------------------------------- + | + */ + 'enabled' => true, + + /* + |-------------------------------------------------------------------------- + | Actions in Repository + |-------------------------------------------------------------------------- + | + | create : Clear Cache on create Entry in repository + | update : Clear Cache on update Entry in repository + | delete : Clear Cache on delete Entry in repository + | + */ + 'on' => [ + 'create' => true, + 'update' => true, + 'delete' => true, + ] + ], + + 'params' => [ + /* + |-------------------------------------------------------------------------- + | Skip Cache Params + |-------------------------------------------------------------------------- + | + | + | Ex: http://prettus.local/?search=lorem&skipCache=true + | + */ + 'skipCache' => 'skipCache' + ], + + /* + |-------------------------------------------------------------------------- + | Methods Allowed + |-------------------------------------------------------------------------- + | + | methods cacheable : all, paginate, find, findByField, findWhere, getByCriteria + | + | Ex: + | + | 'only' =>['all','paginate'], + | + | or + | + | 'except' =>['find'], + */ + 'allowed' => [ + 'only' => null, + 'except' => null + ] + ], + + /* + |-------------------------------------------------------------------------- + | Criteria Config + |-------------------------------------------------------------------------- + | + | Settings of request parameters names that will be used by Criteria + | + */ + 'criteria' => [ + /* + |-------------------------------------------------------------------------- + | Accepted Conditions + |-------------------------------------------------------------------------- + | + | Conditions accepted in consultations where the Criteria + | + | Ex: + | + | 'acceptedConditions'=>['=','like'] + | + | $query->where('foo','=','bar') + | $query->where('foo','like','bar') + | + */ + 'acceptedConditions' => [ + '=', + 'like' + ], + /* + |-------------------------------------------------------------------------- + | Request Params + |-------------------------------------------------------------------------- + | + | Request parameters that will be used to filter the query in the repository + | + | Params : + | + | - search : Searched value + | Ex: http://prettus.local/?search=lorem + | + | - searchFields : Fields in which research should be carried out + | Ex: + | http://prettus.local/?search=lorem&searchFields=name;email + | http://prettus.local/?search=lorem&searchFields=name:like;email + | http://prettus.local/?search=lorem&searchFields=name:like + | + | - filter : Fields that must be returned to the response object + | Ex: + | http://prettus.local/?search=lorem&filter=id,name + | + | - orderBy : Order By + | Ex: + | http://prettus.local/?search=lorem&orderBy=id + | + | - sortedBy : Sort + | Ex: + | http://prettus.local/?search=lorem&orderBy=id&sortedBy=asc + | http://prettus.local/?search=lorem&orderBy=id&sortedBy=desc + | + | - searchJoin: Specifies the search method (AND / OR), by default the + | application searches each parameter with OR + | EX: + | http://prettus.local/?search=lorem&searchJoin=and + | http://prettus.local/?search=lorem&searchJoin=or + | + */ + 'params' => [ + 'search' => 'search', + 'searchFields' => 'searchFields', + 'filter' => 'filter', + 'orderBy' => 'orderBy', + 'sortedBy' => 'sortedBy', + 'with' => 'with', + 'searchJoin' => 'searchJoin' + ] + ], + /* + |-------------------------------------------------------------------------- + | Generator Config + |-------------------------------------------------------------------------- + | + */ + 'generator' => [ + 'basePath' => app()->path(), + 'rootNamespace' => 'App\\', + 'stubsOverridePath' => app()->path(), + 'paths' => [ + 'models' => 'Entities', + 'repositories' => 'Repositories', + 'interfaces' => 'Repositories', + 'transformers' => 'Transformers', + 'presenters' => 'Presenters', + 'validators' => 'Validators', + 'controllers' => 'Http/Controllers', + 'provider' => 'RepositoryServiceProvider', + 'criteria' => 'Criteria' + ] + ] +]; diff --git a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php index 08779f405..b05b4b3b4 100644 --- a/packages/Webkul/Core/src/Providers/CoreServiceProvider.php +++ b/packages/Webkul/Core/src/Providers/CoreServiceProvider.php @@ -27,9 +27,9 @@ class CoreServiceProvider extends ServiceProvider $router->aliasMiddleware('locale', Locale::class); - $this->publishes([ - __DIR__ . '/../../publishable/lang' => public_path('vendor/webkul/core/lang'), - ], 'public'); + // $this->publishes([ + // __DIR__ . '/../../publishable/lang' => public_path('vendor/webkul/core/lang'), + // ], 'public'); Validator::extend('slug', 'Webkul\Core\Contracts\Validations\Slug@passes'); diff --git a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php index e6109be99..fedbe7294 100644 --- a/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php +++ b/packages/Webkul/Customer/src/Providers/CustomerServiceProvider.php @@ -13,12 +13,6 @@ class CustomerServiceProvider extends ServiceProvider { public function boot(Router $router) { - // include __DIR__ . '/../Http/routes.php'; - - $this->publishes([ - __DIR__ . '/../../publishable/assets' => public_path('vendor/webkul/customer/assets'), - ], 'public'); - $router->aliasMiddleware('customer', RedirectIfNotCustomer::class); $this->loadMigrationsFrom(__DIR__ . '/../Database/migrations'); diff --git a/packages/Webkul/Product/src/CacheFilters/Large.php b/packages/Webkul/Product/src/CacheFilters/Large.php new file mode 100644 index 000000000..bb71ee7f9 --- /dev/null +++ b/packages/Webkul/Product/src/CacheFilters/Large.php @@ -0,0 +1,14 @@ +resize(480, 480); + } +} \ No newline at end of file diff --git a/packages/Webkul/Product/src/CacheFilters/Medium.php b/packages/Webkul/Product/src/CacheFilters/Medium.php new file mode 100644 index 000000000..39ec33170 --- /dev/null +++ b/packages/Webkul/Product/src/CacheFilters/Medium.php @@ -0,0 +1,14 @@ +resize(280, 350); + } +} \ No newline at end of file diff --git a/packages/Webkul/Product/src/CacheFilters/Small.php b/packages/Webkul/Product/src/CacheFilters/Small.php new file mode 100644 index 000000000..a3698696c --- /dev/null +++ b/packages/Webkul/Product/src/CacheFilters/Small.php @@ -0,0 +1,14 @@ +resize(120, 120); + } +} \ No newline at end of file diff --git a/packages/Webkul/Product/src/Product/ConfigurableOption.php b/packages/Webkul/Product/src/Product/ConfigurableOption.php index b078576ba..216fd5408 100644 --- a/packages/Webkul/Product/src/Product/ConfigurableOption.php +++ b/packages/Webkul/Product/src/Product/ConfigurableOption.php @@ -3,7 +3,7 @@ namespace Webkul\Product\Product; use Webkul\Attribute\Repositories\AttributeOptionRepository as AttributeOption; -use Webkul\Product\Product\Gallery; +use Webkul\Product\Product\ProductImage; use Webkul\Product\Product\Price; class ConfigurableOption extends AbstractProduct @@ -16,11 +16,11 @@ class ConfigurableOption extends AbstractProduct protected $attributeOption; /** - * Gallery object + * ProductImage object * * @var array */ - protected $gallery; + protected $productImage; /** * Price object @@ -33,19 +33,19 @@ class ConfigurableOption extends AbstractProduct * Create a new controller instance. * * @param Webkul\Attribute\Repositories\AttributeOptionRepository $attributeOption - * @param Webkul\Product\Product\Gallery $gallery + * @param Webkul\Product\Product\ProductImage $productImage * @param Webkul\Product\Product\Price $price * @return void */ public function __construct( AttributeOption $attributeOption, - Gallery $gallery, + ProductImage $productImage, Price $price ) { $this->attributeOption = $attributeOption; - $this->gallery = $gallery; + $this->productImage = $productImage; $this->price = $price; } @@ -230,7 +230,7 @@ class ConfigurableOption extends AbstractProduct $images = []; foreach ($this->getAllowProducts($product) as $variant) { - $images[$variant->id] = $this->gallery->getImages($variant); + $images[$variant->id] = $this->productImage->getGalleryImages($variant); } return $images; diff --git a/packages/Webkul/Product/src/Product/Gallery.php b/packages/Webkul/Product/src/Product/Gallery.php deleted file mode 100644 index 7e47592c1..000000000 --- a/packages/Webkul/Product/src/Product/Gallery.php +++ /dev/null @@ -1,25 +0,0 @@ - '', - 'medium_image_url' => '', - 'large_image_url' => '', - ]; - - return $images; - } -} \ No newline at end of file diff --git a/packages/Webkul/Product/src/Product/ProductImage.php b/packages/Webkul/Product/src/Product/ProductImage.php new file mode 100644 index 000000000..1477144e9 --- /dev/null +++ b/packages/Webkul/Product/src/Product/ProductImage.php @@ -0,0 +1,72 @@ +images as $image) { + if(!Storage::has($image->path)) + continue; + + $images[] = [ + 'small_image_url' => url('cache/small/' . $image->path), + 'medium_image_url' => url('cache/medium/' . $image->path), + 'large_image_url' => url('cache/large/' . $image->path), + 'original_image_url' => url('cache/original/' . $image->path), + ]; + } + + if(!$product->parent_id && !count($images)) { + $images[] = [ + 'small_image_url' => bagisto_asset('images/product/small-product-placeholder.png'), + 'medium_image_url' => bagisto_asset('images/product/meduim-product-placeholder.png'), + 'large_image_url' => bagisto_asset('images/product/large-product-placeholder.png'), + 'original_image_url' => bagisto_asset('images/product/large-product-placeholder.png'), + ]; + } + + return $images; + } + + /** + * Get product's base image + * + * @param Product $product + * @return array + */ + public function getProductBaseImage($product) + { + $images = $product->images; + + if($images->count()) { + $image = [ + 'small_image_url' => url('cache/small/' . $images[0]->path), + 'medium_image_url' => url('cache/medium/' . $images[0]->path), + 'large_image_url' => url('cache/large/' . $images[0]->path), + 'original_image_url' => url('cache/original/' . $images[0]->path), + ]; + } else { + $image = [ + 'small_image_url' => bagisto_asset('images/product/small-product-placeholder.png'), + 'medium_image_url' => bagisto_asset('images/product/meduim-product-placeholder.png'), + 'large_image_url' => bagisto_asset('images/product/large-product-placeholder.png'), + 'original_image_url' => bagisto_asset('images/product/large-product-placeholder.png'), + ]; + } + + return $image; + } +} \ No newline at end of file diff --git a/packages/Webkul/Shop/src/Http/routes.php b/packages/Webkul/Shop/src/Http/routes.php index 40a1d73aa..846bf14c7 100644 --- a/packages/Webkul/Shop/src/Http/routes.php +++ b/packages/Webkul/Shop/src/Http/routes.php @@ -24,7 +24,7 @@ Route::group(['middleware' => ['web']], function () { 'view' => 'shop::products.reviews.create' ])->name('shop.reviews.create'); - Route::post('/reviews/create/{slug}', 'Webkul\Core\Http\Controllers\ReviewController@store')->defaults('_config', [ + Route::post('/reviews/create/{slug}', 'Webkul\Shop\Http\Controllers\ReviewController@store')->defaults('_config', [ 'redirect' => 'admin.reviews.index' ])->name('admin.reviews.store'); diff --git a/packages/Webkul/Shop/src/Resources/assets/images/product/large-product-placeholder.png b/packages/Webkul/Shop/src/Resources/assets/images/product/large-product-placeholder.png new file mode 100644 index 000000000..e839910cc Binary files /dev/null and b/packages/Webkul/Shop/src/Resources/assets/images/product/large-product-placeholder.png differ diff --git a/packages/Webkul/Shop/src/Resources/assets/images/product/meduim-product-placeholder.png b/packages/Webkul/Shop/src/Resources/assets/images/product/meduim-product-placeholder.png new file mode 100644 index 000000000..0aa66dc52 Binary files /dev/null and b/packages/Webkul/Shop/src/Resources/assets/images/product/meduim-product-placeholder.png differ diff --git a/packages/Webkul/Shop/src/Resources/assets/images/product/small-product-placeholder.png b/packages/Webkul/Shop/src/Resources/assets/images/product/small-product-placeholder.png new file mode 100644 index 000000000..8526a85f5 Binary files /dev/null and b/packages/Webkul/Shop/src/Resources/assets/images/product/small-product-placeholder.png differ diff --git a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss index e9c6882b4..e386d89fd 100644 --- a/packages/Webkul/Shop/src/Resources/assets/sass/app.scss +++ b/packages/Webkul/Shop/src/Resources/assets/sass/app.scss @@ -483,10 +483,18 @@ section.slider-block { .product-card { - .product-image img { - align-self: center; - width: 100%; - margin-bottom: 14px; + .product-image { + background: #F2F2F2; + margin-bottom: 10px; + // width: 380px; + // max-width: 100%; + // text-align: center; + + img { + align-self: center; + width: 100%; + margin-bottom: 14px; + } } .product-name { @@ -995,25 +1003,80 @@ section.product-detail { } div.layouter { - display:flex; - flex-flow: row; - margin-top: 21px; + margin-top: 20px; + margin-bottom: 20px; + display: inline-block; + width: 100%; div.product-image-group { - display:flex; - flex-direction: row; - justify-content: flex-start; - margin-right: 2.5%; + width: 43%; + float: left; + min-height: 1px; + position: relative; - .side-group { + .thumb-list { display: flex; flex-direction: column; margin-right: 4px; + height: 480px; + overflow: hidden; + position: relative; + float: left; + + .thumb-frame { + border: 2px solid transparent; + background: #F2F2F2; + width: 120px; + height: 120px; + + &.active { + border-color: #979797; + } + + img { + width: 100%; + height: 100%; + } + } + + .gallery-control { + width: 100%; + position: absolute; + text-align: center; + cursor: pointer; + z-index: 1; + + .overlay { + opacity: 0.3; + background: #000000; + width: 100%; + height: 18px; + position: absolute; + left: 0; + z-index: -1; + } + + .icon { + z-index: 2; + } + + &.top { + top: 0; + } + + &.bottom { + bottom: 0; + } + } } .product-hero-image { display: block; position: relative; + background: #F2F2F2; + width: 480px; + max-height: 480px; + float: left; .wishlist { position: absolute; @@ -1030,6 +1093,9 @@ section.product-detail { } .details { + width: 57%; + float: left; + .product-price { margin-bottom: 14px; } diff --git a/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php b/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php index 4a8597386..fcf42cf63 100644 --- a/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php +++ b/packages/Webkul/Shop/src/Resources/views/products/list/card.blade.php @@ -1,7 +1,12 @@