| Server IP : 54.233.248.239 / 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 $__env->startSection('content'); ?>
<script type="text/javascript">
/** TESTE A/B ATIVAÇÃO OPÇÃO 3 **/
$(document).on('ready', function(){
$('.crossell.op1').addClass('hidden');
$('.crossell.op3').removeClass('hidden');
$('.register-section__title.op1').addClass('hidden');
$('.register-section__title.op3').removeClass('hidden');
});
</script>
<div class="container">
<?php if (count($ofertasRelacionadas) > 0): ?>
<?php if (count($ofertasRelacionadas) > 0): ?>
<h3 class="register-section__title op1">
VEJA TAMBÉM
<?php if (count($ofertasRelacionadas) > 1): ?>
<b>ESTAS OFERTAS</b>
<?php elseif (count($ofertasRelacionadas) == 1 && $ofertasRelacionadas[0]->tipo == 'S'): ?>
A <b>OFERTA DA SEMANA</b>
<?php elseif (count($ofertasRelacionadas) == 1 && $ofertasRelacionadas[0]->tipo == 'D'): ?>
A <b>OFERTA DO DIA</b>
<?php elseif (count($ofertasRelacionadas) == 1 && $ofertasRelacionadas[0]->tipo == 'EQ'): ?>
A <b>OFERTA DA EQUIPE</b>
<?php elseif (count($ofertasRelacionadas) == 1): ?>
<b>ESTA OFERTA</b>
<?php endif ?>
</h3>
<h3 class="register-section__title op2 op3 op4 hidden">APROVEITE E <b>LEVE JUNTO</b></h3>
<?php endif ?>
<div id="produtos-relacionados" class="crossell produtos-relacionados op1 hide-mobile">
<div class="flex-between justify-start">
<?php foreach ($ofertasRelacionadas as $oferta): ?>
<div class="produtos-relacionados__item<?php echo e(($oferta->grupo_tipo_produto == 'vestuario' ? " produtos-relacionados__item--{$oferta->grupo_tipo_produto} ": '')); ?><?php echo e(($oferta->resolucao_imagem == 'resolucao-6' && $oferta->grupo_tipo_produto == 'vinhos' ? " produtos-relacionados__item--collection ": '')); ?> box <?php echo ($oferta->tipo == 'L' ? 'solidaria-check' : '');?>">
<?php if (isset($oferta->canalHasOferta->canal)): ?>
<?php
$canal = $oferta->canalHasOferta->canal;
$tipoCanal = tipo_canal($canal->tipo);
?>
<span class="ribbon oferta-<?php echo e($tipoCanal); ?>">
<?php if($tipoCanal == 'individual'): ?>
<span><?php echo $oferta->canalHasOferta->canal->tag; ?></span>
<?php else: ?>
<a href="<?php echo url($tipoCanal.'/'.$oferta->canalHasOferta->canal->slug); ?>">
<span><?php echo $oferta->canalHasOferta->canal->tag; ?></span>
</a>
<?php endif; ?>
</span>
<?php elseif ($oferta->tipo == 'S'): ?>
<span class="ribbon oferta-semana">
<a href="<?php echo url('oferta-semana'); ?>">
<span>SEMANA</span>
</a>
</span>
<?php elseif ($oferta->tipo == 'D'): ?>
<span class="ribbon oferta-semana">
<a href="<?php echo url('oferta-do-dia'); ?>">
<span>DIA</span>
</a>
</span>
<?php elseif ($oferta->tipo == 'D'): ?>
<span class="ribbon oferta-semana">
<a href="<?php echo url('oferta-solidaria'); ?>">
<span>SOLIDÁRIA</span>
</a>
</span>
<?php elseif ($oferta->tipo == 'EQ'): ?>
<span class="ribbon oferta-semana">
<a href="<?php echo url('oferta-da-equipe'); ?>">
<span>EQUIPE</span>
</a>
</span>
<?php endif ?>
<?php if($oferta->grupo_tipo_produto == 'vestuario'): ?>
<img src="<?php echo e($oferta->thumbnail_principal); ?>" alt="<?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?>"><br>
<div class="informacoes">
<h3 class="produtos-relacionados__title">
<?php $url_oferta = url(($oferta->tipo == 'S' ? 'oferta-semana' : 'oferta') . '/' . $oferta->slug); ?>
<a href="<?php echo $url_oferta; ?>"><?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?></a>
</h3>
<div class="outlet-item__absolute-bottom">
<div class="flex-between">
<p>
<?php if($oferta->tipo == 'L'): ?>
<span class="saiba-mais-solid">Saiba mais <img src="img/site/solidaria.svg" class="solid-img" alt="Saiba mais"></span>
<?php else: ?>
<span class="produtos-relacionados__valor-old">
<?php if($oferta->preco_mercado != $oferta->preco_oferta && $oferta->tipo != 'S'):?>
R$ <?php echo number_format($oferta->preco_mercado, 2, ',', '.'); ?>
<?php endif;?>
</span>
<br>
<?php endif; ?>
<span class="produtos-relacionados__valor-new">
R$ <?php echo number_format($oferta->preco_oferta, 2, ',', '.'); ?>
<input type="hidden" class="quantidade_by_client" value="<?php echo $oferta->quantidade_maxima_por_cliente; ?>">
</span>
</p>
<?php if($oferta->tipo == 'C' && $tipoCanal == 'individual'): ?>
<p class="produtos-relacionados__individual">
SOMENTE <br> AGORA
<div class="produtos-relacionados__individual--img">
<img src="<?php echo url('img/site/hourglass-half-solid.png') ?>" alt="Somente Agora" />
</div>
</p>
<?php endif; ?>
</div>
<div class="flex-between">
<input type="number" class="quantidade" value="1">
<button data-oferta="<?php echo e($oferta->id); ?>" class="btn-comprar add-cart" data-versao="op1">Comprar</button>
</div>
</div>
</div>
<?php else: ?>
<img src="<?php echo e($oferta->thumbnail_principal); ?>" alt="<?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?>"><br>
<div class="informacoes">
<h3 class="produtos-relacionados__title">
<?php $url_oferta = url(($oferta->tipo == 'S' ? 'oferta-semana' : 'oferta') . '/' . $oferta->slug); ?>
<a href="<?php echo $url_oferta; ?>"><?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?></a>
</h3>
<div class="outlet-item__absolute-bottom">
<div class="flex-between">
<p>
<span class="produtos-relacionados__valor-old">
<?php if($oferta->preco_mercado != $oferta->preco_oferta && $oferta->tipo != 'S'):?>
R$ <?php echo number_format($oferta->preco_mercado, 2, ',', '.'); ?>
<?php endif;?>
</span>
<br>
<span class="produtos-relacionados__valor-new">
R$ <?php echo number_format($oferta->preco_oferta, 2, ',', '.'); ?>
<input type="hidden" class="quantidade_by_client" value="<?php echo $oferta->quantidade_maxima_por_cliente; ?>">
</span>
</p>
<?php if($oferta->tipo == 'C' && $tipoCanal == 'individual'): ?>
<p class="produtos-relacionados__individual">
SOMENTE <br> AGORA
<div class="produtos-relacionados__individual--img">
<img src="<?php echo url('img/site/hourglass-half-solid.png') ?>" alt="Somente Agora" />
</div>
</p>
<?php endif; ?>
</div>
<div class="flex-between">
<input type="number" class="quantidade" value="1">
<button data-oferta="<?php echo e($oferta->id); ?>" class="btn-comprar add-cart" data-versao="op1">Comprar</button>
</div>
</div>
</div>
<?php endif; ?>
</div>
<?php endforeach ?>
</div>
</div>
<?php else: ?>
<div class="spacer">
</div>
<?php endif ?>
<?php if (count($ofertasRelacionadas) > 0): ?>
<div class="produtos-relacionados crossell hide-desktop op1">
<div class="flex-between justify-start owl-carousel owl-theme">
<?php foreach ($ofertasRelacionadas as $oferta): ?>
<div class="produtos-relacionados__item<?php echo e(($oferta->grupo_tipo_produto == 'vestuario' ? " produtos-relacionados__item--{$oferta->grupo_tipo_produto} ": '')); ?><?php echo e(($oferta->resolucao_imagem == 'resolucao-6' && $oferta->grupo_tipo_produto == 'vinhos' ? " produtos-relacionados__item--collection ": '')); ?> box">
<?php if (isset($oferta->canalHasOferta->canal)): ?>
<?php
$canal = $oferta->canalHasOferta->canal;
$tipoCanal = tipo_canal($canal->tipo);
?>
<span class="ribbon oferta-<?php echo e($tipoCanal); ?>">
<?php if($tipoCanal == 'individual'): ?>
<span><?php echo $oferta->canalHasOferta->canal->tag; ?></span>
<?php else: ?>
<a href="<?php echo url($tipoCanal.'/'.$oferta->canalHasOferta->canal->slug); ?>">
<span><?php echo $oferta->canalHasOferta->canal->tag; ?></span>
</a>
<?php endif; ?>
</span>
<?php elseif ($oferta->tipo == 'S'): ?>
<span class="ribbon oferta-semana">
<a href="<?php echo url('oferta-semana'); ?>">
<span>SEMANA</span>
</a>
</span>
<?php elseif ($oferta->tipo == 'D'): ?>
<span class="ribbon oferta-semana">
<a href="<?php echo url('oferta-do-dia'); ?>">
<span>DIA</span>
</a>
</span>
<?php elseif ($oferta->tipo == 'EQ'): ?>
<span class="ribbon oferta-semana">
<a href="<?php echo url('oferta-da-equipe'); ?>">
<span>DIA</span>
</a>
</span>
<?php endif ?>
<?php if($oferta->grupo_tipo_produto == 'vestuario'): ?>
<img src="<?php echo e($oferta->thumbnail_principal); ?>" alt="<?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?>" class="<?php echo e($oferta->grupo_tipo_produto); ?>"><br>
<h3 class="produtos-relacionados__title produtos-relacionados__title--variacao">
<?php $url_oferta = url(($oferta->tipo == 'S' ? 'oferta-semana' : 'oferta') . '/' . $oferta->slug); ?>
<a href="<?php echo $url_oferta; ?>"><?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?></a>
</h3>
<div class="informacoes">
<div class="produtos-relacionados__exclusividade--img">
<img src="<?php echo url('img/site/exclusivo.png') ?>" alt="Exclusividade VinumDay" class="exclusividade" />
</div>
<div class="produtos-relacionados__exclusividade">
EXCLUSIVIDADE <br> VINUMDAY
</div>
<div class="flex-between">
<button data-url="<?php echo e($url_oferta); ?>" class="btn-comprar quero-conhecer">Quero <br> Conhecer</button>
</div>
</div>
<?php else: ?>
<img src="<?php echo e($oferta->thumbnail_principal); ?>" alt="<?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?>" class="<?php echo e(($oferta->resolucao_imagem == 'resolucao-6' && $oferta->grupo_tipo_produto == 'vinhos' ? 'collection': '')); ?>"><br>
<div class="informacoes">
<h3 class="produtos-relacionados__title">
<?php $url_oferta = url(($oferta->tipo == 'S' ? 'oferta-semana' : 'oferta') . '/' . $oferta->slug); ?>
<a href="<?php echo $url_oferta; ?>"><?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?></a>
</h3>
<div class="outlet-item__absolute-bottom">
<div class="flex-between-mobile">
<p>
<span class="produtos-relacionados__valor-old">
<?php if($oferta->preco_mercado != $oferta->preco_oferta && $oferta->tipo != 'S'):?>
R$ <?php echo number_format($oferta->preco_mercado, 2, ',', '.'); ?>
<?php endif ?>
</span>
<br>
<span class="produtos-relacionados__valor-new">
R$ <?php echo number_format($oferta->preco_oferta, 2, ',', '.'); ?>
<input type="hidden" class="quantidade_by_client" value="<?php echo $oferta->quantidade_maxima_por_cliente; ?>">
</span>
</p>
<?php if($oferta->tipo == 'C' && $tipoCanal == 'individual'): ?>
<p class="produtos-relacionados__individual" style="text-align: center;">
SOMENTE <br> AGORA
<div class="produtos-relacionados__individual--img">
<img src="<?php echo url('img/site/hourglass-half-solid.png') ?>" alt="Somente Agora" style="width: 20px;" />
</div>
</p>
<?php endif; ?>
</div>
<div class="flex-between">
<input type="number" class="quantidade" value="1">
<button data-oferta="<?php echo e($oferta->id); ?>" class="btn-comprar add-cart" data-versao="op1">Comprar</button>
</div>
</div>
</div>
<?php endif; ?>
</div>
<?php endforeach ?>
</div>
</div>
<div class="crossell op3 hidden">
<div class="somente"><img src="img/site/somente.png" alt="Somente agora">Somente agora</div>
<div class="flex-between justify-start list-itens">
<?php $__currentLoopData = $ofertasRelacionadas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $oferta): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<div class="produtos-relacionados__item<?php echo e(($oferta->grupo_tipo_produto == 'vestuario' ? " produtos-relacionados__item--{$oferta->grupo_tipo_produto} ": '')); ?><?php echo e(($oferta->resolucao_imagem == 'resolucao-6' && $oferta->grupo_tipo_produto == 'vinhos' ? " produtos-relacionados__item--collection ": '')); ?> box <?php echo ($oferta->tipo == 'L' ? 'solidaria-check' : '');?>">
<?php if (isset($oferta->canalHasOferta->canal)): ?>
<?php
$canal = $oferta->canalHasOferta->canal;
$tipoCanal = tipo_canal($canal->tipo);
?>
<span class="top-faixa oferta-<?php echo e($tipoCanal); ?>">
<?php if($tipoCanal == 'individual'): ?>
<span><?php echo $oferta->canalHasOferta->canal->tag; ?></span>
<?php else: ?>
<a href="<?php echo url($tipoCanal.'/'.$oferta->canalHasOferta->canal->slug); ?>">
<span><?php echo $oferta->canalHasOferta->canal->tag; ?></span>
</a>
<?php endif; ?>
</span>
<?php elseif ($oferta->tipo == 'S'): ?>
<span class="top-faixa oferta-semana">
<a href="<?php echo url('oferta-semana'); ?>">
<span>OFERTA DA SEMANA</span>
</a>
</span>
<?php elseif ($oferta->tipo == 'D'): ?>
<span class="top-faixa oferta-semana">
<a href="<?php echo url('oferta-do-dia'); ?>">
<span>OFERTA DO DIA</span>
</a>
</span>
<?php elseif ($oferta->tipo == 'L'): ?>
<span class="top-faixa oferta-semana">
<a href="<?php echo url('oferta-solidaria'); ?>">
<span>OFERTA SOLIDÁRIA</span>
</a>
</span>
<?php elseif ($oferta->tipo == 'EQ'): ?>
<span class="top-faixa oferta-semana">
<a href="<?php echo url('oferta-da-equipe'); ?>">
<span>OFERTA DA EQUIPE</span>
</a>
</span>
<?php endif ?>
<?php if($oferta->grupo_tipo_produto == 'vestuario'): ?>
<img src="<?php echo e($oferta->thumbnail_principal); ?>" alt="<?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?>" class="<?php echo e(($oferta->resolucao_imagem == 'resolucao-6' && $oferta->grupo_tipo_produto == 'vinhos' ? 'collection': '')); ?>"><br>
<div class="informacoes">
<h3 class="produtos-relacionados__title">
<?php $url_oferta = url(($oferta->tipo == 'S' ? 'oferta-semana' : 'oferta') . '/' . $oferta->slug); ?>
<a href="<?php echo $url_oferta; ?>"><?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?></a>
</h3>
<div class="outlet-item__absolute-bottom">
<div class="flex-between-mobile">
<p>
<span class="produtos-relacionados__valor-old">
<?php if($oferta->preco_mercado != $oferta->preco_oferta && $oferta->tipo != 'S'):?>
R$ <?php echo number_format($oferta->preco_mercado, 2, ',', '.'); ?>
<?php endif ?>
</span>
<?php if($oferta->preco_mercado != $oferta->preco_oferta && $oferta->tipo != 'S'):?>
<span class="desconto"><?php echo number_format($oferta->percentual_desconto,0); ?>% OFF</span>
<?php endif ?>
<br>
<span class="produtos-relacionados__valor-new">
R$ <?php echo number_format($oferta->preco_oferta, 2, ',', '.'); ?>
<input type="hidden" class="quantidade_by_client" value="<?php echo $oferta->quantidade_maxima_por_cliente; ?>">
</span>
</p>
</div>
<div class="flex-between flex-cross">
<select class="quantidade_oferta">
<option value="1" selected>1</option>
<?php if(isset($oferta->quantidade_maxima_por_cliente)): ?>
<?php for($i = 2; $i <= $oferta->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>
<button data-oferta="<?php echo e($oferta->id); ?>" class="btn-comprar add-cart" data-versao="op3">Adicionar</button>
</div>
</div>
</div>
<?php else: ?>
<img src="<?php echo e($oferta->thumbnail_principal); ?>" alt="<?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?>" class="<?php echo e(($oferta->resolucao_imagem == 'resolucao-6' && $oferta->grupo_tipo_produto == 'vinhos' ? 'collection': '')); ?>"><br>
<div class="informacoes">
<h3 class="produtos-relacionados__title">
<?php $url_oferta = url(($oferta->tipo == 'S' ? 'oferta-semana' : 'oferta') . '/' . $oferta->slug); ?>
<a href="<?php echo $url_oferta; ?>"><?php echo $oferta->titulo; ?> <?php echo $oferta->sub_titulo; ?></a>
</h3>
<div class="outlet-item__absolute-bottom">
<div class="flex-between-mobile">
<p>
<?php if($oferta->tipo == 'L'): ?>
<span class="saiba-mais-solid">Saiba mais <img src="img/site/solidaria.svg" class="solid-img" alt="Saiba mais"></span>
<?php else: ?>
<span class="produtos-relacionados__valor-old">
<?php if($oferta->preco_mercado != $oferta->preco_oferta && $oferta->tipo != 'S'):?>
R$ <?php echo number_format($oferta->preco_mercado, 2, ',', '.'); ?>
<?php endif ?>
</span>
<?php if($oferta->preco_mercado != $oferta->preco_oferta && $oferta->tipo != 'S'):?>
<span class="desconto"><?php echo number_format($oferta->percentual_desconto,0); ?>% OFF</span>
<?php endif ?>
<br>
<?php endif; ?>
<span class="produtos-relacionados__valor-new">
R$ <?php echo number_format($oferta->preco_oferta, 2, ',', '.'); ?>
<input type="hidden" class="quantidade_by_client" value="<?php echo $oferta->quantidade_maxima_por_cliente; ?>">
</span>
</p>
</div>
<div class="flex-between flex-cross">
<select class="quantidade_oferta">
<option value="1" selected>1</option>
<?php if(isset($oferta->quantidade_maxima_por_cliente)): ?>
<?php for($i = 2; $i <= $oferta->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>
<button data-oferta="<?php echo e($oferta->id); ?>" class="btn-comprar add-cart" data-versao="op3">Adicionar</button>
</div>
</div>
</div>
<?php endif; ?>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</div>
</div>
<?php endif ?>
<script>
$(document).ready(function(){
$('.owl-carousel').owlCarousel({
loop:false,
margin:5,
nav:true,
responsive:{
0:{
items:1
},
600:{
items:2
},
1000:{
items:1
}
}
})
});
</script>
<?php $__currentLoopData = $ofertas_casadas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $oferta_casada): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if(isset($oferta_casada) && $oferta_casada && $oferta_casada->estoque > 0): ?>
<div class="combo-oferta">
<div class="container">
<div class="combo-box">
<div class="left">
<h3><strong>Economize mais R$<?php echo e(number_format($oferta_casada->valor_desconto, 0, ',', '.')); ?></strong> na compra do combo</h3>
<div class="vinhos-lista">
<a href="<?php echo e(url('/oferta-casada/' . $oferta_casada->slug)); ?>"><span><?php echo e($oferta_casada->titulo); ?> <?php echo e($oferta_casada->sub_titulo); ?></span></a>
<!--
<?php $__currentLoopData = $oferta_casada->produtos; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<a href="<?php echo e(url('/oferta-casada/' . $oferta_casada->slug)); ?>"><span><?php echo e($item->produto->nome); ?></span></a>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
-->
</div>
</div>
<div class="right">
<figure>
<a href="<?php echo e(url('/oferta-casada/' . $oferta_casada->slug)); ?>">
<img class="main-img" src="<?php echo e($oferta_casada->thumbnail_principal); ?>" alt="<?php echo e($oferta_casada->titulo); ?> <?php echo e($oferta_casada->sub_titulo); ?>">
</a>
<!-- <img class="main-img" src="img/site/teste-combo.png" alt="Combo oferta"> -->
</figure>
<div class="buy-box">
<div class="line">
<span class="old">de R$ <?php echo e(number_format($oferta_casada->preco_mercado, 2, ',', '.')); ?></span>
<span class="promo hidden"><?php echo e(number_format($oferta_casada->percentual_desconto, 0, ',', '.')); ?>% Off</span>
</div>
<strong>R$ <?php echo e(number_format($oferta_casada->preco_oferta, 2, ',', '.')); ?></strong>
<button class="btn-comprar add-cart" type="button" data-oferta="<?php echo e($oferta_casada->id); ?>">Adicionar</button>
</div>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<div id="listagem-cart">
<?php echo $htmlListagemCart; ?>
</div>
<?php if($oferta_relampago && isset($oferta_relampago->slug)): ?>
<div class="oferta-relampago-checkout hide-mobile">
<div class="oferta-relampago-checkout-title">ADEGA RELÂMPAGO</div>
<div class="oferta-relampago-checkout-itens">
<div class="oferta-relampago-checkout-info">
<div class="oferta-relampago-checkout-img">
<a href="/adega-relampago">
<img src="<?php echo e($oferta_relampago->thumbnail_principal); ?>" />
</a>
</div>
<div class="oferta-relampago-checkout-valores">
<div class="oferta-relampago-checkout-valor-riscado">
<h5>R$ <?php echo e(str_replace('.', ',', $oferta_relampago->preco_mercado)); ?></h5> <span>R$ <?php echo e(str_replace('.', ',', $oferta_relampago->preco_mercado - $oferta_relampago->preco_oferta)); ?> OFF</span>
</div>
<div class="oferta-relampago-checkout-valor">
<span>R$ <?php echo e(str_replace('.', ',', $oferta_relampago->preco_oferta)); ?></span>
</div>
<div class="oferta-relampago-checkout-buttons">
<div class="inline">
<select class="quantidade_relampago quantidade_oferta">
<option value="1" selected>1</option>
<?php if(isset($oferta_relampago->quantidade_maxima_por_cliente)): ?>
<?php for($i = 2; $i <= $oferta->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>
<button data-oferta="<?php echo e($oferta_relampago->id_oferta); ?>" class="oferta-relampago-btn btn-comprar" type="button">ADICIONAR</button>
</div>
</div>
</div>
</div>
<div class="oferta-relampago-checkout-contador">
<div>
<span>Encerra em:</span>
<div class="timer-checkout">
<div class="icon-oferta-relampago-checkout">
<img class="img-relogio-relampago-checkout" src="img/relogio-icon-se.png" />
</div>
<div class="oferta-relampago-timer-item-checkout">
<div class="oferta-relampago-timer-hora-1-checkout">0</div>
<div class="oferta-relampago-timer-hora-2-checkout">0</div>
</div>
<div class="oferta-relampago-timer-pontos-checkout">:</div>
<div class="oferta-relampago-timer-item-checkout">
<div class="oferta-relampago-timer-minuto-1-checkout">0</div>
<div class="oferta-relampago-timer-minuto-2-checkout">0</div>
</div>
<div class="oferta-relampago-timer-pontos-checkout">:</div>
<div class="oferta-relampago-timer-item-checkout">
<div class="oferta-relampago-timer-segundo-1-checkout">0</div>
<div class="oferta-relampago-timer-segundo-2-checkout">0</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="oferta-relampago-checkout hide-desktop">
<div class="oferta-relampago-checkout-title">ADEGA RELÂMPAGO</div>
<div class="oferta-relampago-checkout-itens">
<div class="oferta-relampago-checkout-img">
<a href="/oferta/<?php echo e($oferta_relampago->slug); ?>">
<img src="<?php echo e($oferta_relampago->thumbnail_principal); ?>" />
</a>
</div>
<div class="oferta-relampago-checkout-info">
<div>
<div class="oferta-relampago-checkout-valor-riscado">
<h5>R$ <?php echo e(str_replace('.', ',', $oferta_relampago->preco_mercado)); ?></h5> <span>R$ <?php echo e(str_replace('.', ',', $oferta_relampago->preco_mercado - $oferta_relampago->preco_oferta)); ?> OFF</span>
</div>
<div class="oferta-relampago-checkout-valor">
<span>R$ <?php echo e(str_replace('.', ',', $oferta_relampago->preco_oferta)); ?></span>
</div>
</div>
<div class="oferta-relampago-checkout-buttons">
<div class="inline">
<select class="quantidade_relampago quantidade_oferta">
<option value="1" selected>1</option>
<?php if(isset($oferta_relampago->quantidade_maxima_por_cliente)): ?>
<?php for($i = 2; $i <= $oferta->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>
<button data-oferta="<?php echo e($oferta_relampago->id_oferta); ?>" class="oferta-relampago-btn btn-comprar" type="button">ADICIONAR</button>
</div>
</div>
<div class="oferta-relampago-checkout-contador">
<div>
<span>Encerra em:</span>
<div class="timer-checkout">
<div class="oferta-relampago-timer-item-checkout">
<div class="oferta-relampago-timer-hora-1-checkout">0</div>
<div class="oferta-relampago-timer-hora-2-checkout">0</div>
</div>
<div class="oferta-relampago-timer-pontos-checkout">:</div>
<div class="oferta-relampago-timer-item-checkout">
<div class="oferta-relampago-timer-minuto-1-checkout">0</div>
<div class="oferta-relampago-timer-minuto-2-checkout">0</div>
</div>
<div class="oferta-relampago-timer-pontos-checkout">:</div>
<div class="oferta-relampago-timer-item-checkout">
<div class="oferta-relampago-timer-segundo-1-checkout">0</div>
<div class="oferta-relampago-timer-segundo-2-checkout">0</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script>
$(document).on('ready', function(){
// timer countdown
let dataFinal = "<?php echo e($oferta_relampago->data_fim); ?>";
dataFinal = new Date(dataFinal.replace(/-/g, "/"));
$('.oferta-relampago-timer-item-checkout').countdown(dataFinal, function (event){
$('.oferta-relampago-timer-hora-1-checkout').text(event.strftime('%I').slice(0, -1));
$('.oferta-relampago-timer-hora-2-checkout').text(event.strftime('%I').slice(1));
$('.oferta-relampago-timer-minuto-1-checkout').text(event.strftime('%M').slice(0, -1));
$('.oferta-relampago-timer-minuto-2-checkout').text(event.strftime('%M').slice(1));
$('.oferta-relampago-timer-segundo-1-checkout').text(event.strftime('%S').slice(0, -1));
$('.oferta-relampago-timer-segundo-2-checkout').text(event.strftime('%S').slice(1));
});
});
</script>
<?php endif; ?>
<div id="cupom-desconto" <?php echo count($cartItems) ? '' : 'class="hidden"'; ?>>
<?php echo $htmlCupomDesconto; ?>
</div>
<?php if(isset($htmlRegulamentoAdegaVirada)): ?>
<div id="regulamento-adega-virada">
<?php echo $htmlRegulamentoAdegaVirada; ?>
</div>
<?php endif; ?>
<div id="cupom-adega-virada" <?php echo count($cartItems) ? '' : 'class="hidden"'; ?>>
<?php echo $htmlCupomAdegaVirada; ?>
</div>
<div id="identificacao">
<?php echo $htmlIdentificacao; ?>
</div>
<div id="adega">
<?php //if(!$primeira_compra): ?>
<div class="box">
<div class="tabela-adega-virtual">
<div class="tabela-adega-virtual__left">
<i class="fa fa-th" style="
font-size: 70px;
color: #e0583f;
position: relative;
">
<img src="/img/site/como-funciona_logo-blue.png" style="
position: absolute;
left: calc((100% - 50px)/2);
width: 45px;
position: absolute;
top: calc((100% - 50px)/2);
left: calc((100% - 45px)/2);
">
</i>
<div class="tabela-adega-virtual__title">ADEGA<br> VIRTUAL</div>
</div>
<div class="tabela-adega-virtual__right">
<p class="tabela-adega-virtual__description">Os produtos adquiridos na VinumDay são enviados para a sua adega virtual. Você poderá solicitar
a entrega a qualquer momento, <a href="#" class="clique-aqui">clique aqui</a> para entender nossa política de frete.</p>
<p class="frete-gratuito">Total adega para frete gratuito:</p>
<div class="flex-between">
<?php foreach ($regioes as $regiao): ?>
<div class="item">
<p class="item__regiao"><?php echo $regiao->nome; ?></p>
<p class="item__valor">R$ <?php echo number_format($regiao->valor_maximo_frete, 0,',','.'); ?></p>
</div>
<?php endforeach ?>
</div>
</div>
<div class="tabela-fretes">
<table class="tabela frete hide-mobile">
<tbody>
<?php //for ($i=0; $i < $max_fretes; $i++) { ?>
<?php foreach ($regioes as $key => $regiao): ?>
<tr>
<td rowspan="2" style="background: #e0583f;color:white;"><?php echo $regiao->nome; ?></td>
<td>Adega</td>
<?php for ($i=0; $i < $max_fretes; $i++) { ?>
<?php if ($i == 0){ ?>
<td>
<?php if (isset($fretes[$regiao->id][$i])): ?>
<?php echo 'até R$ '.number_format($fretes[$regiao->id][$i]->valor_final,2,',','.'); ?>
<?php endif ?>
</td>
<?php }else{ ?>
<td>
<?php if (isset($fretes[$regiao->id][$i])): ?>
R$ <?php echo number_format($fretes[$regiao->id][$i]->valor_inicial,2,',','.'); ?> <?php echo ($fretes[$regiao->id][$i]->valor_final > 0) ? ' <br>a R$ '.number_format($fretes[$regiao->id][$i]->valor_final,2,',','.') : '+'; ?>
<?php endif ?>
</td>
<?php } ?>
<?php } ?>
</tr>
<tr style="background: #e1e1e1;">
<td>Frete</td>
<?php for ($i=0; $i < $max_fretes; $i++) { ?>
<td>
<?php echo (isset($fretes[$regiao->id][$i]) && $fretes[$regiao->id][$i]->custo > 0 ) ? 'R$ '.number_format($fretes[$regiao->id][$i]->custo,2,',','.') : ((isset($fretes[$regiao->id][$i])) ? 'GRÁTIS' : ''); ?>
</td>
<?php } ?>
</tr>
<?php if ($key != count($regioes) - 1): ?>
<tr>
<?php for ($i=-2; $i < $max_fretes; $i++) { ?>
<td style="border-right: none;"></td>
<?php } ?>
</tr>
<?php endif ?>
<?php endforeach ?>
<?php //} ?>
</tbody>
</table>
<table class="tabela frete hide-desktop">
<tbody>
<?php //for ($i=0; $i < $max_fretes; $i++) { ?>
<?php foreach ($regioes as $key => $regiao): ?>
<tr>
<td rowspan="2" style="background: #e0583f;color:white;"><?php echo $regiao->nome; ?></td>
<td>Adega</td>
<?php for ($i=0; $i < $max_fretes; $i++) { ?>
<?php if ($i == 0){ ?>
<td>
<?php if (isset($fretes[$regiao->id][$i])): ?>
<?php echo 'até R$ '.number_format($fretes[$regiao->id][$i]->valor_final,0,',','.'); ?>
<?php endif ?>
</td>
<?php }else{ ?>
<td>
<?php if (isset($fretes[$regiao->id][$i])): ?>
R$ <?php echo number_format($fretes[$regiao->id][$i]->valor_inicial,0,',','.'); ?> <?php echo ($fretes[$regiao->id][$i]->valor_final > 0) ? ' <br>a R$ '.number_format($fretes[$regiao->id][$i]->valor_final,0,',','.') : '+'; ?>
<?php endif ?>
</td>
<?php } ?>
<?php } ?>
</tr>
<tr style="background: #e1e1e1;">
<td>Frete</td>
<?php for ($i=0; $i < $max_fretes; $i++) { ?>
<td>
<?php echo (isset($fretes[$regiao->id][$i]) && $fretes[$regiao->id][$i]->custo > 0 ) ? 'R$ '.number_format($fretes[$regiao->id][$i]->custo,0,',','.') : ((isset($fretes[$regiao->id][$i])) ? 'GRÁTIS' : ''); ?>
</td>
<?php } ?>
</tr>
<?php if ($key != count($regioes) - 1): ?>
<tr>
<?php for ($i=-2; $i < $max_fretes; $i++) { ?>
<td style="border-right: none;"></td>
<?php } ?>
</tr>
<?php endif ?>
<?php endforeach ?>
<?php //} ?>
</tbody>
</table>
</div>
</div>
</div>
<?php //endif; ?>
</div>
<?php $enableWhatsapp = FALSE; //Desabilitado temporariamente ?>
<?php if($enableWhatsapp && (!$clienteLogado || $clienteLogado && !$clienteLogado->whatsapp)): ?>
<div class="box">
<div class="whatsapp">
<div class="flex-between">
<div class="item-half">
<h2 class="whatsapp__title">
Desejo receber ofertas via Whatsapp <i class="fa fa-brands fa-whatsapp"></i>
</h2>
<p class="whatsapp__description">Deseja receber nossas ofertas diárias no WhatsApp?<br><br>
Informe seu celular e faça parte da nossa lista
de transmissão adicionando o número (54) 3419 0984 em seus contatos.</p>
<p class="whatsapp__description grey">Você pode se descadastrar a qualquer momento apenas excluindo
nosso contato do seu celular.</p>
</div>
<div class="item-half">
<div class="item">
<label for="">DIGITE O SEU CELULAR</label>
<div class="flex-between">
<input id="numeroWhatsapp" placeholder="Digite o número do seu celular" class="default-input" type="text">
<button id="cadastrarWhatsapp" class="btn-whatsapp">Cadastrar</button>
</div>
</div>
</div>
<script>
$('#cadastrarWhatsapp').click(function(){
$.ajax({
url: "/cadastro-whatsapp",
type: "post",
data: {
numero: $('#numeroWhatsapp').val(),
},
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
$('.carregando').fadeOut();
if(data.status){
alertUtil.alertSuccess(data.message);
}else{
alertUtil.alertError(data.message);
}
},
});
});
</script>
</div>
</div>
</div>
<?php endif; ?>
<script type="text/javascript" src="<?php echo e(url('js/jquery.card.js')); ?>"></script>
<script>
$(document).ready(function(){
/** Modal solidária */
$(document).on('click', '.saiba-mais-solid', function(){
$('body').addClass('modal-solidaria-active');
});
$(document).on('click', '.fechar-solidaria, .mask-solidaria', function(){
$('body').removeClass('modal-solidaria-active');
});
$(document).on('click', '.modal-solidaria .btn-comprar', function(){
$('body').removeClass('modal-solidaria-active');
$('.solidaria-check .add-cart').click();
});
$('#numeroWhatsapp')
.mask("(99) 99999-999?9")
.focusout(function (event) {
var target, phone, element;
target = (event.currentTarget) ? event.currentTarget : event.srcElement;
phone = target.value.replace(/\D/g, '');
element = $(target);
element.unmask();
if(phone.length > 10) {
element.mask("(99) 99999-999?9");
} else {
element.mask("(99) 9999-9999?9");
}
});
$(document).on('change', '[name="quantidade"]', function(){
var cart_item = $(this).closest('.cart-item');
cart_item.find('.quantidade').val($(this).val());
var quantidade = $(this).val();
var valor_unitario = cart_item.find('.valor_unitario').data('preco');
var preco_mercado = cart_item.find('.valor_unitario').data('preco-mercado');
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url:'/update-item-cart',
type:'POST',
data:{
row_id: cart_item.data('rowid'),
quantidade: quantidade
},
beforeSend:function(){
//$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
$('#listagem-cart').html(data.html);
$('#cupom-desconto').html(data.html_cupom);
reloadCart();
$('[name="parcelas"]').html(data.parcelas);
}else{
cart_item.find('.quantidade').val(data.quantidade);
alertUtil.alertError(data.message);
}
//$('.carregando').fadeOut();
}
});
});
$(document).on('change', '[name="variacao"]', function(){
var cart_item = $(this).closest('.cart-item');
var quantidade = cart_item.find('[name="quantidade"]').val();
var variacao = cart_item.find('[name="variacao"]').val();
var rowid = cart_item.data('rowid');
var ofertaid = cart_item.data('ofertaid');
if(rowid && ofertaid){
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url:'/update-oferta-cart',
type:'POST',
data:{
oferta_id: cart_item.data('ofertaid'),
row_id: cart_item.data('rowid'),
quantidade: quantidade,
variacao : variacao
},
beforeSend:function(){
//$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
$('#listagem-cart').html(data.html);
$('#cupom-desconto').html(data.html_cupom);
reloadCart();
$('[name="parcelas"]').html(data.parcelas);
}else{
alertUtil.alertError(data.message);
}
//$('.carregando').fadeOut();
}
});
}
});
$(document).on('click', '.quero-conhecer', function(){
var url = $(this).data('url');
window.location.href = url;
});
$('.comprar-solidaria').click(function(){
var id = $(this).data('oferta');
$('.comprar-solidaria').attr('disabled', true);
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url:'/add-oferta-cart',
type:'POST',
data:{
oferta_id: id,
quantidade: 1
},
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
$('.comprar-solidaria').attr('disabled', false);
if(data.status){
window.location.href = '<?php echo e(url('/checkout')); ?>';
}else{
alertUtil.alertError(data.message);
}
$('.carregando').fadeOut();
}
});
});
$(document).on('click', '.op2 .add-cart, .op3 .add-cart, .op4 .add-cart, .combo-box .add-cart, .oferta-relampago-btn', function(){
var id = $(this).data('oferta');
var versao = $(this).data('versao');
var quant = $(this).siblings('.quantidade_oferta').val() || 1;
/** Evento Analytics */
ga('send', {
hitType: 'event',
eventCategory: 'AddCartCrossSell',
eventAction: 'click',
eventLabel: versao
});
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url:'/add-oferta-cart',
type:'POST',
data:{
oferta_id: id,
quantidade: quant
},
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
//reloadListagem();
$('#listagem-cart').html(data.html);
$('#cupom-desconto').html(data.html_cupom).removeClass('hidden');
$('#cart-empty').addClass('hidden');
$('#cart-section').removeClass('hidden');
$('#pagamento-section').removeClass('hidden');
$('[name="parcelas"]').html(data.parcelas);
alertUtil.alertSuccess(data.message);
reloadCart();
}else{
alertUtil.alertError(data.message);
}
$('.carregando').fadeOut();
}
});
});
$(document).on('click', '.op1 .add-cart', function(){
var id = $(this).data('oferta');
var quantidade = $(this).closest('.produtos-relacionados__item').find('.quantidade').val();
var quantidade_by_client = $(this).closest('.produtos-relacionados__item').find('.quantidade_by_client').val();
var versao = $(this).data('versao');
/** Evento Analytics */
ga('send', {
hitType: 'event',
eventCategory: 'AddCartCrossSell',
eventAction: 'click',
eventLabel: versao
});
if(parseInt(quantidade) > parseInt(quantidade_by_client)){
alertUtil.alertWarning('Oferta limitada a ' + quantidade_by_client + ' gr. por cliente');
}else{
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url:'/add-oferta-cart',
type:'POST',
data:{
oferta_id: id,
quantidade: quantidade
},
beforeSend:function(){
//$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
//reloadListagem();
$('#listagem-cart').html(data.html);
$('#cupom-desconto').html(data.html_cupom).removeClass('hidden');
$('#cart-empty').addClass('hidden');
$('#cart-section').removeClass('hidden');
$('#pagamento-section').removeClass('hidden');
$('[name="parcelas"]').html(data.parcelas);
alertUtil.alertSuccess(data.message);
reloadCart();
}else{
alertUtil.alertError(data.message);
}
//$('.carregando').fadeOut();
}
});
}
});
$(document).on('click', '.remover-cart', function(){
var cart_item = $(this).closest('.cart-item');
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url:'/delete-item-cart',
type:'POST',
data:{
row_id: cart_item.data('rowid'),
},
beforeSend:function(){
//$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
cart_item.remove();
calcularTotal();
$('[name="parcelas"]').html(data.parcelas);
if($('.cart-item').length == 0){
$('#pagamento-section').addClass('hidden');
$('#cart-section').addClass('hidden');
$('#cart-empty').removeClass('hidden');
$('#cupom-desconto').html(data.html_cupom).addClass('hidden');
}else{
$('#cupom-desconto').html(data.html_cupom);
}
$('#listagem-cart').html(data.html);
reloadCart();
}else{
alertUtil.alertError(data.message);
}
//$('.carregando').fadeOut();
}
});
});
$('.tabela-adega-virtual__right .clique-aqui').click(function(e){
e.preventDefault();
$('.tabela-fretes').slideToggle();
});
});
function calcularTotal(){
var soma = 0;
var quantidade = 0;
var economizado = 0;
$('.cart-item').each(function(){
soma += parseFloat($(this).find('.item-total').val());
quantidade += parseInt($(this).find('.quantidade_vinhos').val()) * parseInt($(this).find('.quantidade').val());
economizado += parseInt($(this).find('.item-total-economizado').val());
});
$('.total').html('R$ '+number_format(soma, 2, ',', '.'));
$('.total_unidades').html(quantidade+' Gr');
$('.voce-economizou b').html('R$ '+number_format(economizado, 2, ',', '.'));
}
function getTipoAdega(tipo_adega){
if(tipo_adega == 'confraria'){
$('.enviar-comprovante span').html(`
Sim, basta acessar sua confraria, ir em <b>ADEGA DA CONFRARIA</b>, localizar seu pedido e clicar em "Enviar comprovante".
`);
} else{
$('.enviar-comprovante span').html(`
Sim, basta acessar sua conta, ir em <b>MEUS PAGAMENTOS</b>, localizar seu pedido e clicar em "Enviar comprovante".
`);
}
$.ajax({
url:'/checkout/tipo-adega',
type:'POST',
data: {
tipo_adega : tipo_adega
},
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
$('.carregando').fadeOut();
if(data.status){
reloadCart();
}else{
alertUtil.alertError(data.message);
setTimeout(function(){
$('.alerta').fadeOut();
$('.alerta').removeClass('active');
}, 5000);
}
},
complete:function(){
$('.carregando').fadeOut();
}
});
}
function checkoutAtualizarSaldo(usar_saldo){
$.ajax({
url:'/checkout/utilizar-saldo',
type:'POST',
data: {
usar_saldo : usar_saldo
},
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
reloadCart();
}else{
alertUtil.alertError(data.message);
setTimeout(function(){
$('.alerta').fadeOut();
$('.alerta').removeClass('active');
}, 5000);
}
},
complete:function(){
$('.carregando').fadeOut();
}
});
}
function checkoutAdicionarCupom(codigo_cupom){
var meio_pagamento = $('.meio-pagamento__forma-pagamento.active').data('id');
$.ajax({
url:'/adicionar-cupom',
type:'POST',
data: {
codigo : codigo_cupom,
meio_pagamento : meio_pagamento
},
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
$('#cupom-desconto').html(data.html_cupom);
$('.adicionarCupom').addClass('hidden');
$('.removerCupom').removeClass('hidden');
// $('#listagem-cart').html(data.html);
// $('[name="parcelas"]').html(data.parcelas);
setTimeout(function() {
reloadCart();
}, 500);
}else{
alertUtil.alertError(data.message);
setTimeout(function(){
$('.alerta').fadeOut();
$('.alerta').removeClass('active');
}, 5000);
}
},
complete:function(){
$('.carregando').fadeOut();
}
});
}
function checkoutRemoverCupom(){
$.ajax({
url:'/remover-cupom',
type:'POST',
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
$('#cupom-desconto').html(data.html_cupom);
$('.removerCupom').addClass('hidden');
$('.adicionarCupom').removeClass('hidden');
// $('.aplicado').addClass('hidden');
setTimeout(function() {
reloadCart();
}, 500);
}else{
alertUtil.alertError(data.message);
}
},
complete:function(){
$('.carregando').fadeOut();
}
});
}
function checkoutAdicionarCupomAdegaVirada(codigo_cupom){
$.ajax({
url:'/adicionar-cupom-adega-virada',
type:'POST',
data: {
codigo : codigo_cupom
},
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
$('#cupom-adega-virada').html(data.html_adega_virada);
$('.adicionarCupomAdegaVirada').addClass('hidden');
$('.removerCupomAdegaVirada').removeClass('hidden');
setTimeout(function() {
reloadCart();
}, 500);
}else{
alertUtil.alertError(data.message);
setTimeout(function(){
$('.alerta').fadeOut();
$('.alerta').removeClass('active');
}, 5000);
}
},
complete:function(){
$('.carregando').fadeOut();
}
});
}
function checkoutRemoverCupomAdegaVirada(){
$.ajax({
url:'/remover-cupom-adega-virada',
type:'POST',
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
$('#cupom-adega-virada').html(data.html_adega_virada);
$('.removerCupomAdegaVirada').addClass('hidden');
$('.adicionarCupomAdegaVirada').removeClass('hidden');
setTimeout(function() {
reloadCart();
}, 500);
}else{
alertUtil.alertError(data.message);
}
},
complete:function(){
$('.carregando').fadeOut();
}
});
}
$(document).on('click', '#adicionarCupomButton', function(){
var codigo_cupom = $('[name="codigo_cupom"]').val();
checkoutAdicionarCupom(codigo_cupom);
});
$(document).on('click', '.removerCupom', function(){
checkoutRemoverCupom();
});
$(document).on('click', '#adicionarCupomButtonAdegaVirada', function(){
var codigo_cupom = $('[name="codigo_cupom_adega_virada"]').val();
checkoutAdicionarCupomAdegaVirada(codigo_cupom);
});
$(document).on('click', '.removerCupomAdegaVirada', function(){
checkoutRemoverCupomAdegaVirada();
});
</script>
<script>
fbq('track', 'InitiateCheckout');
</script>
</div>
<?php if(isset($oferta_solidaria) && $oferta_solidaria && isset($oferta_solidaria->instituicao)): ?>
<div class="modal-solidaria">
<img src="img/site/fechar-solidaria.svg" alt="Fechar" class="fechar-solidaria">
<div class="cont-solidaria">
<div class="topo-solidaria">
<img src="img/site/maos-solidarias.svg" alt="Oferta solidária">
<p>Refletindo sobre como a VinumDay poderia fazer a sua parte para ajudar causas nobres - em especial aquelas mais afetadas pela pandemia - decidimos criar um novo tipo de oferta. A cada mês traremos um rótulo selecionado pela nossa curadoria, cujo lucro das vendas será integralmente destinado para uma ou mais instituições sociais.</p>
</div>
<div class="l-sol">
<figure>
<img src="<?php echo (isset($oferta_solidaria->instituicao) && $oferta_solidaria->instituicao->thumbnail_principal != '') ? get_file_s3($oferta_solidaria->instituicao->thumbnail_principal, 'instituicao') : 'http://placehold.it/100x100'; ?>" alt="<?php echo e($oferta_solidaria->instituicao->nome); ?>">
</figure>
<div class="cont-l">
<h4 class="inst-title"><?php echo e($oferta_solidaria->instituicao->nome); ?></h4>
<p><?php echo $oferta_solidaria->instituicao->descricao; ?></p>
</div>
</div>
<div class="r-sol">
<a href="<?php echo e(url('oferta-solidaria')); ?>" title="<?php echo $oferta_solidaria->titulo; ?>">
<img src="<?php echo $oferta_solidaria->thumbnail_principal; ?>" alt="<?php echo $oferta_solidaria->titulo; ?>">
</a>
<div class="cont-rsol">
<span class="tit1"><?php echo e($oferta_solidaria->titulo); ?></span>
<span class="tit2"><?php echo e($oferta_solidaria->sub_titulo); ?></span>
<div class="resumo-texto"><?php echo strip_tags($oferta_solidaria->resumo_texto, '<strong>'); ?></div>
<a href="<?php echo e(url('oferta-solidaria')); ?>" class="leia-mais">Leia mais</a>
<div class="prices-box">
<div class="texts">
<?php
$preco_oferta_solidaria = number_format($oferta_solidaria->preco_oferta,2,',','.');
$preco_oferta_solidaria = explode(",", $preco_oferta_solidaria);
?>
<span class="psol">R$ <strong><?php echo e($preco_oferta_solidaria[0]); ?></strong>,<?php echo e($preco_oferta_solidaria[1]); ?></span>
</div>
<a href="javascript:void(0)" class="btn-comprar comprar-solidaria" data-oferta="<?php echo e($oferta_solidaria->id); ?>">ADICIONAR AO CARRINHO</a>
</div>
</div>
</div>
</div>
</div>
<div class="mask-solidaria"></div>
<?php endif; ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make($current_template, array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>