Invisible update cart button issue in case downloadable product added with other into cart

This commit is contained in:
sanjeev 2022-07-23 17:16:10 +05:30
parent 6528c1b3f7
commit bc2b86c131
1 changed files with 11 additions and 2 deletions

View File

@ -54,12 +54,21 @@
<div class="cart-item-list">
@csrf
@php
$productOtherThanDownloadable = false;
@endphp
@foreach ($cart->items as $key => $item)
@php
$productBaseImage = $item->product->getTypeInstance()->getBaseImage($item);
$product = $item->product;
if ($item->product->type != "downloadable") {
$productOtherThanDownloadable = true;
}
$productPrice = $product->getTypeInstance()->getProductPrices();
if (is_null ($product->url_key)) {
@ -206,7 +215,7 @@
</button>
</form>
@if ($item->product->getTypeInstance()->showQuantityBox() === true)
@if ($productOtherThanDownloadable)
<button
type="submit"
class="theme-btn light unset">