| Server IP : 54.94.228.101 / Your IP : 172.28.1.13 Web Server : Apache System : Linux ip-172-28-29-189 6.5.0-1014-aws #14~22.04.1-Ubuntu SMP Thu Feb 15 15:27:06 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.2.34-43+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /var/www/html/vinumday2_0/storage/framework/views/ |
Upload File : |
<?php $ofertas_esgotadas = isset($_COOKIE['ofertas_esgotadas']) ? $_COOKIE['ofertas_esgotadas'] : 0; ?>
<?php if (isset($listaOfertas) && count($listaOfertas) > 0) { ?>
<?php foreach ($listaOfertas as $objOferta) { ?>
<?php
if($objOferta->estoque <= 0 && $ofertas_esgotadas >= $canal->qtde_ofertas_encerradas){
continue;
}
if($objOferta->estoque > 0 && $objOferta->estoque < $objOferta->poucas_unidades){
$classItem = "outlet-item ultimas-unidades";
}else{
$classItem = "outlet-item";
}
?>
<div class="<?php echo e($classItem); ?> ofertas_esgotadas_<?php echo e($ofertas_esgotadas); ?>">
<figure class="figure-img">
<a href="<?php echo url('oferta/'.$objOferta->slug); ?>">
<img class="outlet-item__vinho" src="<?php echo $objOferta->thumbnail_principal; ?>" alt="<?php echo $objOferta->titulo;?> <?php echo $objOferta->sub_titulo;?>">
</a>
<?php if($objOferta->estoque > 0 && $objOferta->estoque < $objOferta->poucas_unidades): ?>
<div class="unidades">
<span>ÚLTIMAS UNIDADES 🔥</span>
</div>
<?php endif; ?>
</figure>
<?php if($objOferta->percentual_desconto > 0):?>
<div class="outlet-item__desconto"><?php echo number_format($objOferta->percentual_desconto,0);?>% <span>OFF</span></div>
<?php endif;?>
<h2 class="outlet-item__title"><a href="<?php echo url('oferta/'.$objOferta->slug); ?>" title="<?php echo $objOferta->titulo;?> <?php echo $objOferta->sub_titulo;?>"><?php echo $objOferta->titulo;?> <?php echo $objOferta->sub_titulo;?></a></h2>
<div class="outlet-item__absolute-bottom">
<div class="flex-between precos">
<div class="outlet-item__preco-velho">
<?php if($objOferta->preco_mercado != $objOferta->preco_oferta):?>
R$ <?php echo number_format($objOferta->preco_mercado,2,',','.');?>
<?php endif;?>
</div>
<div class="outlet-item__preco">
R$ <?php echo number_format($objOferta->preco_oferta,2,',','.');?>
</div>
</div>
<div class="flex-between compra-linha">
<?php if($objOferta->estoque > 0 && (!isset($ofertasCart[$objOferta->id]) || (isset($ofertasCart[$objOferta->id]) && $ofertasCart[$objOferta->id] < $objOferta->quantidade_maxima_por_cliente))): ?>
<select class="quantidade_oferta">
<option value="1" selected>1</option>
<?php if(isset($objOferta->quantidade_maxima_por_cliente)): ?>
<?php for($i = 2; $i <= $objOferta->quantidade_maxima_por_cliente; $i++): ?>
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
<?php endfor; ?>
<?php else: ?>
<?php for($a = 2; $a <= 10; $a++): ?>
<option value="<?php echo $a; ?>"><?php echo $a; ?></option>
<?php endfor; ?>
<?php endif; ?>
</select>
<?php endif; ?>
<?php
$classBtnCanal = "comprar";
$textBtnCanal = "Comprar";
if($objOferta->estoque <= 0 && empty($objOferta->oferta_reserva)){
$classBtnCanal = "esgotado";
$textBtnCanal = "Oferta Esgotada";
}elseif(($objOferta->oferta_reserva == 1 && $objOferta->estoque <= 0) || (isset($ofertasCart[$objOferta->id]) && $ofertasCart[$objOferta->id] >= $objOferta->quantidade_maxima_por_cliente)){
$classBtnCanal = "indisponivel";
$textBtnCanal = "Indisponível no momento";
}
?>
<button data-oferta="<?php echo $objOferta->id; ?>" class="btn-<?php echo $classBtnCanal; ?>-canal <?php echo ($objOferta->oferta_reserva == 1 ? "btn-indisponivel-canal--right" : "")?> <?php echo ($objOferta->estoque > 0 && (!isset($ofertasCart[$objOferta->id]) || (isset($ofertasCart[$objOferta->id]) && $ofertasCart[$objOferta->id] < $objOferta->quantidade_maxima_por_cliente))) > 0 ? "add-cart" : ""?>">
<?php echo $textBtnCanal; ?>
</button>
<input type="hidden" class="quantidade_by_client" val="<?php echo e($objOferta->quantidade_maxima_por_cliente); ?>">
</div>
</div>
</div>
<?php if($objOferta->estoque <= 0 && empty($objOferta->oferta_reserva)){ $ofertas_esgotadas++; } ?>
<?php } // endforeach ?>
<?php }else{ ?>
<div class="outlet-result">
<p>Nehum produto encontrado!</p>
</div>
<?php } // endif ?>