Change webkul product folder

This commit is contained in:
Amanmyrat 2023-09-14 23:11:25 +05:00
parent 4a4c65faef
commit b2389191f1
3 changed files with 5 additions and 2 deletions

View File

@ -223,7 +223,7 @@ class ProductFlat
'locale' => $locale->code, 'locale' => $locale->code,
]); ]);
} }
$productFlat->brand_id = $product->brand_id; // $productFlat->brand_id = $product->brand_id;
foreach ($familyAttributes[$product->attribute_family->id] as $attribute) { foreach ($familyAttributes[$product->attribute_family->id] as $attribute) {
if ($parentProduct && ! in_array($attribute->code, array_merge($superAttributes[$parentProduct->id], $this->fillableAttributeCodes))) { if ($parentProduct && ! in_array($attribute->code, array_merge($superAttributes[$parentProduct->id], $this->fillableAttributeCodes))) {
continue; continue;

View File

@ -35,7 +35,7 @@ class Product extends Model implements ProductContract
'attribute_family_id', 'attribute_family_id',
'sku', 'sku',
'parent_id', 'parent_id',
'brand_id' // 'brand_id'
]; ];
/** /**

View File

@ -51,8 +51,11 @@ class ProductMediaRepository extends Repository
$previousIds = $this->resolveFileTypeQueryBuilder($product, $uploadFileType)->pluck('id'); $previousIds = $this->resolveFileTypeQueryBuilder($product, $uploadFileType)->pluck('id');
if (isset($data[$uploadFileType]['files']) && $data[$uploadFileType]['files']) { if (isset($data[$uploadFileType]['files']) && $data[$uploadFileType]['files']) {
foreach ($data[$uploadFileType]['files'] as $indexOrModelId => $file) { foreach ($data[$uploadFileType]['files'] as $indexOrModelId => $file) {
if ($file instanceof UploadedFile) { if ($file instanceof UploadedFile) {
\Log::info("messageq: ".$file);
$this->create([ $this->create([
'type' => $uploadFileType, 'type' => $uploadFileType,
'path' => $file->store($this->getProductDirectory($product)), 'path' => $file->store($this->getProductDirectory($product)),