Merge pull request #3608 from devansh-webkul/inactive_child_product_isssue

Fixed inactive child product shouldn't visible in grouped product #3575
This commit is contained in:
Jitendra Singh 2020-08-05 11:07:00 +05:30 committed by GitHub
commit 07a9d8588a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 28 deletions

View File

@ -10,22 +10,24 @@
<span>{{ __('shop::app.products.qty') }}</span>
</li>
@foreach ($product->grouped_products as $groupedProduct)
<li>
<span class="name">
{{ $groupedProduct->associated_product->name }}
@if($groupedProduct->associated_product->getTypeInstance()->isSaleable())
<li>
<span class="name">
{{ $groupedProduct->associated_product->name }}
@include ('shop::products.price', ['product' => $groupedProduct->associated_product])
</span>
@include ('shop::products.price', ['product' => $groupedProduct->associated_product])
</span>
<span class="qty">
<quantity-changer
:control-name="'qty[{{$groupedProduct->associated_product_id}}]'"
:validations="'required|numeric|min_value:0'"
quantity="{{ $groupedProduct->qty }}"
min-quantity="0">
</quantity-changer>
</span>
</li>
<span class="qty">
<quantity-changer
:control-name="'qty[{{$groupedProduct->associated_product_id}}]'"
:validations="'required|numeric|min_value:0'"
quantity="{{ $groupedProduct->qty }}"
min-quantity="0">
</quantity-changer>
</span>
</li>
@endif
@endforeach
</ul>
</div>

View File

@ -10,22 +10,24 @@
<span>{{ __('shop::app.products.qty') }}</span>
</li>
@foreach ($product->grouped_products as $groupedProduct)
<li>
<span class="name">
{{ $groupedProduct->associated_product->name }}
@if($groupedProduct->associated_product->getTypeInstance()->isSaleable())
<li>
<span class="name">
{{ $groupedProduct->associated_product->name }}
@include ('shop::products.price', ['product' => $groupedProduct->associated_product])
</span>
@include ('shop::products.price', ['product' => $groupedProduct->associated_product])
</span>
<span class="qty">
<quantity-changer
:control-name="'qty[{{$groupedProduct->associated_product_id}}]'"
:validations="'required|numeric|min_value:0'"
quantity="{{ $groupedProduct->qty }}"
min-quantity="0">
</quantity-changer>
</span>
</li>
<span class="qty">
<quantity-changer
:control-name="'qty[{{$groupedProduct->associated_product_id}}]'"
:validations="'required|numeric|min_value:0'"
quantity="{{ $groupedProduct->qty }}"
min-quantity="0">
</quantity-changer>
</span>
</li>
@endif
@endforeach
</ul>
</div>