mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-10 23:36:08 -06:00
Merge pull request #1156 from openclassify/mua
product options error fixed
This commit is contained in:
commit
4bbd7b85ea
@ -16,10 +16,13 @@ class OptionConfigurationFormFields
|
||||
if(request()->has('ad') || $builder->getEntry())
|
||||
{
|
||||
$ad = $advRepository->find(request('ad') ?? $builder->getEntry());
|
||||
$options = $productOptionRepository->getWithCategoryId($ad->cat1);
|
||||
|
||||
$options_fields = array();
|
||||
|
||||
if($ad)
|
||||
{
|
||||
$options = $productOptionRepository->getWithCategoryId($ad->cat1);
|
||||
|
||||
foreach ($options as $option)
|
||||
{
|
||||
if($optionValue = $productoptionsValueRepository->getWithOptionsId([$option->id]))
|
||||
@ -34,6 +37,8 @@ class OptionConfigurationFormFields
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$fields = array_merge($options_fields, ['price', 'currency', 'stock']);
|
||||
|
||||
$builder->setFields($fields);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user