mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
#2607 Product options not showing fixed
This commit is contained in:
parent
9134817e11
commit
b56c775468
@ -144,7 +144,7 @@
|
||||
{{ trans('visiosoft.module.advs::field.product_option.name') }}
|
||||
</label>
|
||||
<div class="col-sm-10">
|
||||
{{ form.fields.product_options_value.input|raw }}
|
||||
{{ form.fields.product_options_value.configSet('cat1',adv.cat1).input|raw }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
@ -6,17 +6,6 @@ use Visiosoft\AdvsModule\ProductoptionsValue\Contract\ProductoptionsValueReposit
|
||||
|
||||
class ProductoptionTableBuilder extends TableBuilder
|
||||
{
|
||||
|
||||
public function setTableEntries(\Illuminate\Support\Collection $entries)
|
||||
{
|
||||
$option_repository = app(ProductoptionRepositoryInterface::class);
|
||||
$value_repository = app(ProductoptionsValueRepositoryInterface::class);
|
||||
|
||||
$options_id = $option_repository->getWithCategoryId(7)->pluck('id')->all();
|
||||
|
||||
$values = $value_repository->getWithOptionsId($options_id);
|
||||
return parent::setTableEntries($values);
|
||||
}
|
||||
/**
|
||||
* The table views.
|
||||
*
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
<?php namespace Visiosoft\AdvsModule\ProductoptionsValue\Support\MultipleFieldType;
|
||||
|
||||
use Anomaly\Streams\Platform\Ui\Table\Table;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Anomaly\MultipleFieldType\Command\GetConfiguration;
|
||||
|
||||
use Visiosoft\AdvsModule\Productoption\Contract\ProductoptionRepositoryInterface;
|
||||
use Visiosoft\AdvsModule\ProductoptionsValue\Contract\ProductoptionsValueRepositoryInterface;
|
||||
|
||||
@ -13,12 +16,18 @@ use Visiosoft\AdvsModule\ProductoptionsValue\Contract\ProductoptionsValueReposit
|
||||
*/
|
||||
class LookupTableBuilder extends \Anomaly\MultipleFieldType\Table\LookupTableBuilder
|
||||
{
|
||||
public function __construct(Table $table,ValueTableBuilder $valueTableBuilder)
|
||||
{
|
||||
$this->valueTableBuilder = $valueTableBuilder;
|
||||
parent::__construct($table);
|
||||
}
|
||||
|
||||
public function setTableEntries(\Illuminate\Support\Collection $entries)
|
||||
{
|
||||
$option_repository = app(ProductoptionRepositoryInterface::class);
|
||||
$value_repository = app(ProductoptionsValueRepositoryInterface::class);
|
||||
|
||||
$options_id = $option_repository->getWithCategoryId(7)->pluck('id')->all();
|
||||
$options_id = $option_repository->getWithCategoryId($this->config('cat1'))->pluck('id')->all();
|
||||
|
||||
$values = $value_repository->getWithOptionsId($options_id);
|
||||
return parent::setTableEntries($values);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user