favoriteCount

This commit is contained in:
merdan 2022-04-30 10:29:51 +05:00
parent 83ece7a017
commit 9d957f7d12
1 changed files with 5 additions and 5 deletions

View File

@ -592,11 +592,11 @@ class ProductRepository extends WProductRepository
'url_key' => $parentProduct->sku, 'url_key' => $parentProduct->sku,
'short_description' => $desc, 'short_description' => $desc,
'description' => $desc, 'description' => $desc,
'favoritesCount' => $data['favorite_count'] 'favoritesCount' => $data['favoriteCount']
]; ];
if(isset($data['favorite_count'])){ if(isset($data['favorite_count'])){
$main_attributes['favoritesCount'] = $data['favorite_count']; $main_attributes['favoritesCount'] = $data['favoriteCount'];
} }
if (!empty($data['images'])) { if (!empty($data['images'])) {
@ -638,7 +638,7 @@ class ProductRepository extends WProductRepository
'source' => $colorVariant['url_key'], 'source' => $colorVariant['url_key'],
'description' => $description, 'description' => $description,
'short_description' => $description, 'short_description' => $description,
'favoritesCount' => $colorVariant['favorite_count'] 'favoritesCount' => $colorVariant['favoriteCount']
]; ];
// $attributes[] = $this->calculatePrice($sizeVariant['price']); // $attributes[] = $this->calculatePrice($sizeVariant['price']);
@ -662,7 +662,7 @@ class ProductRepository extends WProductRepository
'source' => $colorVariant['url_key'], 'source' => $colorVariant['url_key'],
'description' => $description, 'description' => $description,
'short_description' => $description, 'short_description' => $description,
'favoritesCount' => $colorVariant['favorite_count'] 'favoritesCount' => $colorVariant['favoriteCount']
]; ];
$this->assignAttributes($variant, array_merge($attributes,$this->calculatePrice($colorVariant['price']))); $this->assignAttributes($variant, array_merge($attributes,$this->calculatePrice($colorVariant['price'])));
@ -691,7 +691,7 @@ class ProductRepository extends WProductRepository
'source' => $data['url_key'], 'source' => $data['url_key'],
'description' => $desc, 'description' => $desc,
'short_description' => $desc, 'short_description' => $desc,
'favoritesCount' => $data['favorite_count'] 'favoritesCount' => $data['favoriteCount']
]; ];
if (!empty($data['color'])) { if (!empty($data['color'])) {