Merge pull request #3718 from vishal-webkul/issue3564
Issue #3564 resolved
This commit is contained in:
commit
4d00f4fcc5
|
|
@ -194,6 +194,21 @@ return [
|
|||
'type' => 'boolean',
|
||||
],
|
||||
],
|
||||
], [
|
||||
'key' => 'catalog.products.attribute',
|
||||
'name' => 'admin::app.admin.system.attribute',
|
||||
'sort' => 4,
|
||||
'fields' => [
|
||||
[
|
||||
'name' => 'image_attribute_upload_size',
|
||||
'title' => 'admin::app.admin.system.image-upload-size',
|
||||
'type' => 'text',
|
||||
], [
|
||||
'name' => 'file_attribute_upload_size',
|
||||
'title' => 'admin::app.admin.system.file-upload-size',
|
||||
'type' => 'text',
|
||||
]
|
||||
],
|
||||
], [
|
||||
'key' => 'catalog.inventory',
|
||||
'name' => 'admin::app.admin.system.inventory',
|
||||
|
|
|
|||
|
|
@ -1262,6 +1262,9 @@ return [
|
|||
'guest-checkout' => 'Guest Checkout',
|
||||
'allow-guest-checkout' => 'Allow Guest Checkout',
|
||||
'allow-guest-checkout-hint' => 'Hint: If turned on, this option can be configured for each product specifically.',
|
||||
'attribute' => 'Attribute',
|
||||
'image-upload-size' => 'Allowed Image Upload Size (in Kb)',
|
||||
'file-upload-size' => 'Allowed File Upload Size (in Kb)',
|
||||
'review' => 'Review',
|
||||
'allow-guest-review' => 'Allow Guest Review',
|
||||
'inventory' => 'Inventory',
|
||||
|
|
|
|||
|
|
@ -91,6 +91,16 @@
|
|||
array_push($validations, 'decimal');
|
||||
}
|
||||
|
||||
if ($attribute->type == 'file') {
|
||||
$retVal = (core()->getConfigData('catalog.products.attribute.file_attribute_upload_size')) ? core()->getConfigData('catalog.products.attribute.file_attribute_upload_size') : '2048' ;
|
||||
array_push($validations, 'size:' . $retVal);
|
||||
}
|
||||
|
||||
if ($attribute->type == 'image') {
|
||||
$retVal = (core()->getConfigData('catalog.products.attribute.image_attribute_upload_size')) ? core()->getConfigData('catalog.products.attribute.image_attribute_upload_size') : '2048' ;
|
||||
array_push($validations, 'size:' . $retVal . '|mimes:jpeg, bmp, png, jpg');
|
||||
}
|
||||
|
||||
array_push($validations, $attribute->validation);
|
||||
|
||||
$validations = implode('|', array_filter($validations));
|
||||
|
|
|
|||
Loading…
Reference in New Issue