placed variable outside loop

This commit is contained in:
sanjeev 2022-07-23 17:47:46 +05:30
parent b191962ee3
commit 57083e0c0c
1 changed files with 4 additions and 1 deletions

View File

@ -54,12 +54,15 @@
<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;
$productOtherThanDownloadable = false;
if ($item->product->type != "downloadable") {
$productOtherThanDownloadable = true;