| 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 : |
<!-- Novos canais -->
<?php if($canaisLiberados && count($ofertasRelacionadas) > 0): ?>
<section class="canais2">
<script type="text/javascript">
$(document).on('click', '.canais2 .btn-comprar', function(){
var id = $(this).data('oferta');
var quantidade = $(this).closest('.product').find('.quantidade_oferta').val();
var variacao = $(this).closest('.product').find('.variacao').val();
var quantidade_by_client = $(this).closest('.product').find('.quantidade_by_client').val();
if(parseInt(quantidade) > parseInt(quantidade_by_client)){
alertUtil.alertError('Esta oferta possui um limite máximo de ' + quantidade_by_client + ' gr. por cliente.', '', true);
}else{
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url:'/add-oferta-cart',
type:'POST',
data:{
oferta_id: id,
quantidade: quantidade,
variacao: variacao
},
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
alertUtil.alertSuccess(data.message);
reloadCart();
}else{
alertUtil.alertError(data.message, '', true);
}
$('.carregando').fadeOut();
}
});
}
});
</script>
<div class="container">
<h2>CONHEÇA NOSSAS <b>OFERTAS ESPECIAIS</b></h2>
<div class="flex-canais">
<?php $__currentLoopData = $ofertasRelacionadas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $objOferta): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php $tag = (isset($objOferta->canalHasOferta->canal) ? $objOferta->canalHasOferta->canal->tag : ($objOferta->tipo == 'S' ? 'Oferta da Semana' : 'Oferta do Dia')); ?>
<?php $url_tag = (isset($objOferta->canalHasOferta->canal) ? url(tipo_canal($objOferta->canalHasOferta->canal->tipo).'/'.$objOferta->canalHasOferta->canal->slug) : ($objOferta->tipo == 'S' ? url('oferta-semana') : url('oferta-do-dia'))); ?>
<?php $url_oferta = url(($objOferta->tipo == 'S' ? 'oferta-semana' : 'oferta') . '/' . $objOferta->slug); ?>
<div class="product <?php echo e((count($objOferta->produtos) > 1 || $objOferta->grupo_tipo_produto != 'vinhos') ? 'sem-atributos' : ''); ?>">
<input type="hidden" class="quantidade_by_client" val="<?php echo e($objOferta->quantidade_maxima_por_cliente); ?>">
<a href="<?php echo e($url_tag); ?>">
<span class="faixa-top <?php echo e((count($objOferta->produtos) > 1 || $objOferta->grupo_tipo_produto != 'vinhos') ? 'azul' : ''); ?>"><?php echo e($tag); ?></span>
<?php if(isset($objOferta->canalHasOferta->canal) && ($objOferta->canalHasOferta->canal->tipo == 'PR' || $objOferta->canalHasOferta->canal->tipo == 'CR') && $objOferta->grupo_tipo_produto == 'vinhos'): ?>
<span class="premium">Premium</span>
<?php endif; ?>
</a>
<div class="cont">
<figure>
<a href="<?php echo e($url_oferta); ?>">
<img src="<?php echo e($objOferta->thumbnail_principal); ?>" class="img-prod" alt="<?php echo e($objOferta->titulo); ?> <?php echo e($objOferta->sub_titulo); ?>">
</a>
</figure>
<h3>
<a href="<?php echo e($url_oferta); ?>"><?php echo e($objOferta->titulo); ?> <?php echo e($objOferta->sub_titulo); ?></a>
</h3>
<?php if(count($objOferta->produtos) == 1 && $objOferta->grupo_tipo_produto == 'vinhos'): ?>
<div class="attrs">
<div class="atr">
<img src="<?php echo e(config('filesystems.path') . "/tipo-de-produto/{$objOferta->thumbnail_tipo_produto}"); ?>" width="17" height="17" alt="<?php echo e($objOferta->nome_tipo_produto); ?>">
<span><?php echo e($objOferta->nome_tipo_produto); ?></span>
</div>
<div class="atr">
<img src="<?php echo e(url('uploads/pais/'.$objOferta->thumbnail_pais)); ?>" alt="<?php echo e($objOferta->nome_pais); ?>" width="17" height="17">
<span><?php echo e($objOferta->nome_pais); ?></span>
</div>
</div>
<?php endif; ?>
<div class="prices">
<?php if($objOferta->preco_mercado != $objOferta->preco_oferta): ?>
<div class="preco-de">
<h4 class="old_price">R$ <?php echo e(number_format($objOferta->preco_mercado,2,',','.')); ?></h4>
</div>
<?php endif; ?>
<h4 class="new_price">R$ <?php echo e(number_format($objOferta->preco_oferta,2,',','.')); ?></h4>
</div>
<div class="quantidade_buy">
<select class="quantidade_oferta">
<?php for($i=1;$i<=$objOferta->quantidade_maxima_por_cliente;$i++): ?>
<option value="<?php echo e($i); ?>"><?php echo e($i); ?></option>
<?php endfor; ?>
</select>
<button class="btn-comprar" data-oferta="<?php echo e($objOferta->id); ?>">ADICIONAR</button>
</div>
</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
</section>
<?php endif; ?>