Merge pull request #6649 from akathuria289/add_image_issue2
Add edit catalog image issue resolved
This commit is contained in:
commit
41c725eb22
|
|
@ -1634,6 +1634,7 @@ return [
|
|||
'logo-size' => 'Image resolution should be like 112px X 41px',
|
||||
'favicon-size' => 'Image resolution should be like 16px X 16px',
|
||||
'invoice-logo-size' => 'Image resolution should be like 192px X 50px',
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -1591,6 +1591,7 @@ return [
|
|||
'set-order-status' => 'Faturayı oluşturduktan sonra sipariş durumunu ayarlayın.',
|
||||
'generate-invoice-applicable' => 'Otomatik fatura oluştur etkinse geçerlidir',
|
||||
'records-found' => 'Kayıt(lar) bulundu',
|
||||
|
||||
],
|
||||
],
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
{!! view_render_event('bagisto.admin.catalog.product.edit_form_accordian.images.controls.before', ['product' => $product]) !!}
|
||||
|
||||
<div class="control-group {{ $errors->has('images.files.*') ? 'has-error' : '' }}">
|
||||
<label>{{ __('admin::app.catalog.categories.image') }}</label>
|
||||
<label class="required">{{ __('admin::app.catalog.categories.image') }}</label>
|
||||
|
||||
<product-image></product-image>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,14 @@
|
|||
|
||||
namespace Webkul\Product\Http\Requests;
|
||||
|
||||
use Illuminate\Support\Str;
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
use Webkul\Admin\Validations\ProductCategoryUniqueSlug;
|
||||
use Webkul\Core\Contracts\Validations\Decimal;
|
||||
use Webkul\Core\Contracts\Validations\Slug;
|
||||
use Webkul\Core\Contracts\Validations\Decimal;
|
||||
use Webkul\Product\Models\ProductAttributeValue;
|
||||
use Webkul\Product\Repositories\ProductAttributeValueRepository;
|
||||
use Webkul\Product\Repositories\ProductRepository;
|
||||
use Webkul\Admin\Validations\ProductCategoryUniqueSlug;
|
||||
use Webkul\Product\Repositories\ProductAttributeValueRepository;
|
||||
|
||||
class ProductForm extends FormRequest
|
||||
{
|
||||
|
|
@ -66,6 +67,16 @@ class ProductForm extends FormRequest
|
|||
'special_price' => ['nullable', new Decimal, 'lt:price'],
|
||||
]);
|
||||
|
||||
if (request()->images) {
|
||||
foreach (request()->images['files'] as $key => $file) {
|
||||
if (Str::contains($key, 'image_')) {
|
||||
$this->rules = array_merge($this->rules, [
|
||||
'images.files.' . $key => ['required', 'mimes:bmp,jpeg,jpg,png,webp'],
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($product->getEditableAttributes() as $attribute) {
|
||||
if (
|
||||
in_array($attribute->code, ['sku', 'url_key'])
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -4925,6 +4925,15 @@ body {
|
|||
|
||||
.compare-products {
|
||||
width: unset !important;
|
||||
|
||||
tr {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
|
||||
td {
|
||||
width: 200px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mt-0 {
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -1437,7 +1437,7 @@ modal {
|
|||
margin-bottom: 20px;
|
||||
margin-top: 10px;
|
||||
display: inline-block;
|
||||
width: 200px;
|
||||
width: 100%;
|
||||
|
||||
.image-item {
|
||||
width: 200px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue