Skip to content

Commit

Permalink
issue bagisto#10517 fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
vikas214255 committed Jan 31, 2025
1 parent a437f67 commit 01a5ade
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions packages/Webkul/Product/src/Type/AbstractType.php
Original file line number Diff line number Diff line change
Expand Up @@ -532,20 +532,31 @@ public function canBeAddedToCartWithoutOptions()
public function getEditableAttributes($group = null, $skipSuperAttribute = true)
{
if ($skipSuperAttribute) {
$this->skipAttributes = array_merge(
$this->skipAttributes =array_merge(
$this->product->super_attributes->pluck('code')->toArray(),
$this->skipAttributes
);
}

if (! $group) {
return $this->product->attribute_family->custom_attributes()->whereNotIn(
'attributes.code',
$this->skipAttributes
)->get();
}

return $group->custom_attributes()->whereNotIn('code', $this->skipAttributes)->get();

return $group->custom_attributes()
->select(
'attributes.*',
'attribute_translations.name as admin_name',
'attribute_translations.locale',
)
->whereNotIn('code', $this->skipAttributes)
->leftJoin('attribute_translations', function ($join) {
$join->on('attributes.id', '=', 'attribute_translations.attribute_id')
->where('attribute_translations.locale', '=', app()->getLocale());
})
->get();
}

/**
Expand Down

0 comments on commit 01a5ade

Please sign in to comment.