parent
81da5bd1d1
commit
e526af061e
|
|
@ -150,22 +150,22 @@ class AttributeDataGrid
|
|||
'type' => 'string',
|
||||
'label' => 'Type',
|
||||
], [
|
||||
'name' => 'is_required',
|
||||
'column' => 'is_required',
|
||||
'alias' => 'attributeIsRequired',
|
||||
'type' => 'boolean',
|
||||
'label' => 'Required',
|
||||
], [
|
||||
'name' => 'is_unique',
|
||||
'column' => 'is_unique',
|
||||
'alias' => 'attributeIsUnique',
|
||||
'type' => 'boolean',
|
||||
'label' => 'Unique',
|
||||
], [
|
||||
'name' => 'value_per_locale',
|
||||
'column' => 'value_per_locale',
|
||||
'alias' => 'attributeValuePerLocale',
|
||||
'type' => 'boolean',
|
||||
'label' => 'Locale based',
|
||||
], [
|
||||
'name' => 'value_per_channel',
|
||||
'column' => 'value_per_channel',
|
||||
'alias' => 'attributeValuePerChannel',
|
||||
'type' => 'boolean',
|
||||
'label' => 'Channel based',
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ class ProductDataGrid
|
|||
'type' => 'string',
|
||||
'label' => 'Product Quantity',
|
||||
'sortable' => true,
|
||||
],
|
||||
]
|
||||
],
|
||||
|
||||
'filterable' => [
|
||||
|
|
@ -149,7 +149,7 @@ class ProductDataGrid
|
|||
'type' => 'string',
|
||||
'label' => 'Product Type',
|
||||
], [
|
||||
'name' => 'prods.status',
|
||||
'column' => 'prods.status',
|
||||
'alias' => 'ProductStatus',
|
||||
'type' => 'boolean',
|
||||
'label' => 'Status'
|
||||
|
|
|
|||
|
|
@ -73,6 +73,10 @@ class Product {
|
|||
|
||||
$variants = [];
|
||||
|
||||
$found = $this->productGrid->findOneByField('product_id', $product->id);
|
||||
|
||||
//extra measure to stop duplicate entries
|
||||
if($found == null) {
|
||||
$this->productGrid->create($gridObject);
|
||||
|
||||
if($product->type == 'configurable') {
|
||||
|
|
@ -93,6 +97,7 @@ class Product {
|
|||
$this->productGrid->create($variantObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -142,7 +142,6 @@ class ProductController extends Controller
|
|||
'sku' => ['required', 'unique:products,sku', new \Webkul\Core\Contracts\Validations\Slug]
|
||||
]);
|
||||
|
||||
|
||||
//before store of the product
|
||||
Event::fire('catalog.product.create.before');
|
||||
|
||||
|
|
|
|||
|
|
@ -631,7 +631,7 @@ class DataGrid
|
|||
throw new \Exception('Multiple Sort keys Found, Please Resolve the URL Manually.');
|
||||
}
|
||||
} elseif ($key=="search") {
|
||||
|
||||
// dd($this->searchable, $parsed);
|
||||
$count_keys = count(array_keys($value));
|
||||
if($count_keys==1)
|
||||
$this->query->where(function ($query) use ($parsed) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue