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