| 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/resources/views/site/ |
Upload File : |
@extends('layouts.website')
@section('content')
<script type="text/javascript">
$(document).on('ready', function(){
$('body').addClass('colecao-body colecao-confraria');
$('.banner-interno, .parallax-mirror').hide();
});
$(document).on('change', '.select-produtos-combo', function(){
var id = $(this).find('option:selected').val();
$.ajax({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
},
url:'/oferta-do-dia/change-produto-combo',
type:'POST',
data:{
id_produto: id,
premium : true
},
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
$('.ficha-tecnica_v2').html(data.html);
}else{
alertUtil.alertError(data.message);
}
$('.carregando').fadeOut();
}
});
});
$(document).on('click', '.slider-produtos .prod', function(){
var id = $(this).data('id');
$('.select-produtos-combo').val(id).trigger('change');
$('.slider-produtos .prod').removeClass('active');
$(this).addClass('active');
})
$(document).on('click', '.add-colecao', function(){
var id = $(this).data('oferta');
var quantidade = $(this).closest('.ref-prod').find('.quantidade_oferta').val();
var variacao = $(this).closest('.ref-prod').find('.variacao').val();
var quantidade_by_client = $(this).closest('.ref-prod').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,
video : '<?php echo (isset($oferta->url_video) && !empty($oferta->url_video) && (!isset($video) || isset($video) && $video == 'true')) ? 'true' : 'false'?>',
tag_video : '<?php echo (isset($video) ? 'true' : 'false')?>'
},
beforeSend:function(){
$('.carregando').fadeIn();
},
success:function(data){
if(data.status){
window.location.href = "/checkout";
}else{
alertUtil.alertError(data.message, '', true);
}
$('.carregando').fadeOut();
}
});
}
});
</script>
@if(!empty($canal->thumbnail_principal))
<style type="text/css">
.listagem-premium-body .colecao-topo, .listagem-premium-body .topo-listagem, .colecao-topo{
/*background-image: url('<?php echo config('filesystems.path') . "/canal/{$canal->thumbnail_principal}";?>')*/
}
</style>
@endif
<section class="colecao-topo colecao-topo-confraria ref-prod">
<div class="cont">
<div class="mob-title hide-desktop">
<span class="subtitulo"><?php echo $oferta->titulo; ?></span>
<h1><?php echo $oferta->sub_titulo; ?></h1>
</div>
<img src="{{ $oferta->thumbnail_principal }}" class="img-prod <?php echo $oferta->resolucao_imagem; ?>" alt="{{ $oferta->titulo.' '.$oferta->sub_titulo }}">
<div class="right hide-mobile">
<span class="subtitulo hide-mobile"><?php echo $oferta->titulo; ?></span>
<h1 class="hide-mobile"><?php echo $oferta->sub_titulo; ?></h1>
<?php if (($oferta->tipo == 'CF')): ?>
@if($kit_confraria == false)
<?php if($oferta->preco_mercado != $oferta->preco_oferta):?>
<span class="old-price">R$ <?php echo number_format($oferta->preco_mercado,2,',','.'); ?></span>
<?php endif;?>
<span class="new-price">R$ <?php echo number_format($oferta->preco_oferta,2,',','.'); ?></span>
<?php $economia = $oferta->preco_mercado - $oferta->preco_oferta; ?>
<?php if($economia > 0): ?>
<span class="economia">Você economiza <b>R$ <?php echo number_format($economia,2,',','.'); ?></b></span>
<?php endif; ?>
@endif
<div class="buy-quant">
@if($kit_confraria == false)
@if($oferta->estoque && $oferta->estoque > 0)
<div class="button_amount">
<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>
</div>
@endif
<div class="button_add">
@if($oferta->estoque && $oferta->estoque > 0)
<input type="hidden" class="quantidade_by_client" val="{{ $oferta->quantidade_maxima_por_cliente }}">
<button class="btn-comprar add-colecao" data-oferta="<?php echo $oferta->id; ?>">Comprar</button>
@elseif($oferta->estoque <= 0 && empty($oferta->oferta_reserva))
<button type="button" class="btn-esgotado">Oferta Esgotada</button>
@elseif($oferta->oferta_reserva == 1 && $oferta->estoque <= 0)
<button type="button" class="btn-indisponivel-canal">Indisponível no momento</button>
@endif
</div>
@endif
<!--<p class="hide-mobile descrip"><?php echo nl2br($oferta->texto) ?></p>-->
<script type="text/javascript">
$(document).on('ready', function(){
var pos = $('.colecao-topo .new-price').position().left;
$('.desc-colecao').attr('style', 'padding-left: ' + pos + 'px');
});
</script>
</div>
<?php else: ?>
<p style="color: #fff; margin-top: 10px;">Oferta encerrada em <b><?php echo (isset($oferta->data)) ? date('d/m/Y', strtotime($oferta->data)) : '00/00/0000'; ?></b>.
@if(isset($disponibilidade) && $disponibilidade >= 5)
Caso queira consultar a disponibilidade desse produto <a href="javascript:void(0)" class="check-disponibilidade" data-oferta="{{ $oferta->id }}" style="color: #CCC">clique aqui</a>
@elseif(isset($disponibilidade) && $disponibilidade < 5)
Não há disponibilidade em estoque deste produto.
@endif
</p>
<?php endif; ?>
</div>
</div>
</section>
<div class="desc-colecao">
<div class="right hide-desktop ref-prod">
<span class="subtitulo hide-mobile"><?php echo $oferta->titulo; ?></span>
<h1 class="hide-mobile"><?php echo $oferta->sub_titulo; ?></h1>
<?php if (($oferta->tipo == 'E' && $oferta->data >= $date_limite_exclusiva) || ($oferta->tipo == 'CF' && ($oferta->data == $data_oferta_confraria || $oferta->data == $data_fim_oferta_confraria)) || ($oferta->tipo == 'M' && $oferta->data == date('Y-m-d') || ($oferta->tipo == 'S' && $oferta->data == $data_oferta_semana)) || (isset($canal) && $canal->data_inicio <= date('Y-m-d H:i:s') && $canal->data_fim >= date('Y-m-d H:i:s'))): ?>
<?php if (($oferta->tipo == 'E' && $oferta->data >= $date_limite_exclusiva) || ($oferta->tipo == 'CF' && ($oferta->data == $data_oferta_confraria || $oferta->data == $data_fim_oferta_confraria)) || ($oferta->tipo == 'M' && $oferta->data == date('Y-m-d') || ($oferta->tipo == 'S' && $oferta->data == $data_oferta_semana)) || (isset($canal) && $oferta->canalHasOferta && $oferta->canalHasOferta->data_inicial <= date('Y-m-d') && $oferta->canalHasOferta->data_final >= date('Y-m-d')) ): ?>
<?php if($oferta->preco_mercado != $oferta->preco_oferta):?>
<span class="old-price">R$ <?php echo number_format($oferta->preco_mercado,2,',','.'); ?></span>
<?php endif;?>
<span class="new-price">R$ <?php echo number_format($oferta->preco_oferta,2,',','.'); ?></span>
<?php $economia = $oferta->preco_mercado - $oferta->preco_oferta; ?>
<?php if($economia > 0): ?>
<span class="economia">Você economiza <b>R$ <?php echo number_format($economia,2,',','.'); ?></b></span>
<?php endif;?>
<div class="buy-quant">
<div class="button_amount">
<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>
</div>
<div class="button_add">
<input type="hidden" class="quantidade_by_client" val="{{ $oferta->quantidade_maxima_por_cliente }}">
<button class="btn-comprar add-colecao" data-oferta="<?php echo $oferta->id; ?>">Comprar</button>
</div>
<p class="hide-mobile descrip">{{ $oferta->texto }}</p>
</div>
<?php else: ?>
<p style="color: #fff; margin-top: 10px;">Oferta encerrada em <b><?php echo (isset($oferta->data)) ? date('d/m/Y', strtotime($oferta->data)) : '00/00/0000'; ?></b>.
@if(isset($disponibilidade) && $disponibilidade >= 5)
Caso queira consultar a disponibilidade desse produto <a href="javascript:void(0)" class="check-disponibilidade" data-oferta="{{ $oferta->id }}" style="color: #CCC">clique aqui</a>
@elseif(isset($disponibilidade) && $disponibilidade < 5)
Não há disponibilidade em estoque deste produto.
@endif
</p>
<?php endif;?>
<?php else: ?>
<p style="color: #fff; margin-top: 10px;">Oferta encerrada em <b><?php echo (isset($oferta->data)) ? date('d/m/Y', strtotime($oferta->data)) : '00/00/0000'; ?></b>.
@if(isset($disponibilidade) && $disponibilidade >= 5)
Caso queira consultar a disponibilidade desse produto <a href="javascript:void(0)" class="check-disponibilidade" data-oferta="{{ $oferta->id }}" style="color: #CCC">clique aqui</a>
@elseif(isset($disponibilidade) && $disponibilidade < 5)
Não há disponibilidade em estoque deste produto.
@endif
</p>
<?php endif;?>
@if(isset($oferta->url_video) && !empty($oferta->url_video) && (!isset($video) || isset($video) && $video == 'true'))
<div class="fake-space-video"></div>
@endif
</div>
</div>
<div class="selecionar-combo selecionar-combo-colecao">
<select class="select-produtos-combo">
<?php foreach ($oferta->produtos as $produto): ?>
<option value="<?php echo $produto->produto->id; ?>"><?php echo $produto->produto->nome; ?></option>
<?php endforeach ?>
</select>
</div>
<div class="container container-white">
<div class="white-content">
@if(isset($oferta->url_video) && !empty($oferta->url_video) && (!isset($video) || isset($video) && $video == 'true'))
<script type="text/javascript">
$(document).on('ready', function(){
var limit = 0;
ga('send', {
hitType: 'event',
eventCategory: 'videoPremium',
eventAction: 'view',
eventLabel: 'comVideo'
});
$(document).on('click', '.add-colecao', function(){
if(limit == 0){
limit = 1;
ga('send', {
hitType: 'event',
eventCategory: 'videoPremium',
eventAction: 'addCart',
eventLabel: 'comVideo'
});
}
});
});
</script>
<div class="video-box video-box-premium">
<h3 class="title">Assista ao vídeo</h3>
<div class="video-embed">
<iframe src="{{ $oferta->url_video }}" frameborder="0"></iframe>
</div>
</div>
@else
<script type="text/javascript">
$(document).on('ready', function(){
var limit = 0;
ga('send', {
hitType: 'event',
eventCategory: 'videoPremium',
eventAction: 'view',
eventLabel: 'semVideo'
});
$(document).on('click', '.add-colecao', function(){
if(limit == 0){
limit = 1;
ga('send', {
hitType: 'event',
eventCategory: 'videoPremium',
eventAction: 'addCart',
eventLabel: 'semVideo'
});
}
});
});
</script>
@endif
<h3 class="title">Apresentação</h3>
<p class="premium-desc premium-desc-collection"><?php echo $oferta->texto; ?></p>
<h3 class="title">Vinhos da coleção</h3>
<div class="slider-produtos">
<?php foreach ($oferta->produtos as $key => $prod) { ?>
<div data-id="<?php echo $prod->produto->id; ?>" class="prod <?php echo ($key == 0) ? 'active' : ''; ?>" title="<?php echo $prod->produto->nome; ?>">
<figure>
<img src="<?php echo $prod->produto->thumbnail_principal; ?>">
</figure>
<span><?php echo $prod->produto->nome; ?></span>
</div>
<?php } ?>
</div>
<!-- ficha tecnica -->
<?php echo $html_ficha_tecnica; ?>
</div>
</div>
<script>
gtag('ec:addProduct', {
'id': '<?php echo $oferta->id; ?>',
'name': '<?php echo $oferta->titulo.' '.$oferta->sub_titulo; ?>',
'category': 'Oferta',
//'brand': '<?php //echo $produto->fornecedor->nome; ?>'
//'variant': 'black'
});
gtag('ec:setAction', 'detail');
gtag('send', 'pageview');
</script>
@if(isset($oferta) && $oferta != '' && $oferta->estoque > 0)
<?php if (($oferta->tipo == 'E' && $oferta->data >= $date_limite_exclusiva) || ($oferta->tipo == 'M' && $oferta->data == date('Y-m-d') || ($oferta->tipo == 'S' && $oferta->data == $data_oferta_semana)) || (isset($canal) && $canal->data_inicio <= date('Y-m-d H:i:s') && $canal->data_fim >= date('Y-m-d H:i:s'))): ?>
<?php if (($oferta->tipo == 'E' && $oferta->data >= $date_limite_exclusiva) || ($oferta->tipo == 'M' && $oferta->data == date('Y-m-d') || ($oferta->tipo == 'S' && $oferta->data == $data_oferta_semana)) || (isset($canal) && $oferta->canalHasOferta && $oferta->canalHasOferta->data_inicial <= date('Y-m-d') && $oferta->canalHasOferta->data_final >= date('Y-m-d')) ): ?>
<div class="fixed-buy">
<div class="price-content">
<?php if($oferta->preco_mercado != $oferta->preco_oferta):?>
<span class="prom">R$ <?php echo number_format($oferta->preco_mercado,2,',','.'); ?></span>
<b class="tag"><?php echo number_format($oferta->percentual_desconto,0); ?>% OFF</b>
<?php endif; ?>
<span class="preco">R$ <?php echo number_format($oferta->preco_oferta,2,',','.'); ?></span>
</div>
<button class="add-cart-mob">Adicionar</button>
</div>
<section class="buy_fixed_desk hide-mobile">
<script type="text/javascript">
$(document).on('ready', function(){
$(document).on('click', '.fixed-buy .add-cart-mob, .buy_fixed_desk .btn-comprar', function(){
$([document.documentElement, document.body]).animate({
scrollTop: 350
}, 0);
$(".add-colecao").click();
});
$('body').addClass('buy_fixed_desk_active');
});
</script>
<div class="container flex">
<div class="info_title">
<?php if($oferta->data): ?>
<h5 class="data">
<?php $dia_data_oferta = str_pad(date('j',strtotime($oferta->data)), 2, "0", STR_PAD_LEFT); ?>
<?php $dia_fim_data_oferta = str_pad(date('j',strtotime($data_fim_oferta)), 2, "0", STR_PAD_LEFT); ?>
<?php echo $dia_data_oferta; ?>
<?php echo (strftime('%b',strtotime($oferta->data)) != strftime('%b',strtotime($data_fim_oferta)) ? '/'.strftime('%b',strtotime($oferta->data)) : ''); ?>
A <?php echo $dia_fim_data_oferta; ?>/<?php echo strftime('%b',strtotime($data_fim_oferta)); ?>
</h5>
<?php endif; ?>
<h3 class="wine_title"><?php echo $oferta->sub_titulo; ?></h3>
<h4 class="wine_subtitle"><?php echo $oferta->titulo; ?></h4>
</div>
<div class="info_price_buttons">
<div class="info_price">
<div class="discount">
<?php if($oferta->preco_mercado != $oferta->preco_oferta):?>
<h4 class="old_price">R$ <?php echo number_format($oferta->preco_mercado,2,',','.'); ?></h4>
<div class="percent_off">
<h4 class="off_title .big"><?php echo number_format($oferta->percentual_desconto,0); ?>%</h4>
<h5 class="off_title .small">OFF</h5>
</div>
<?php endif; ?>
</div>
<h3 class="new_price">R$ <?php echo number_format($oferta->preco_oferta,2,',','.'); ?></h3>
</div>
<div class="info_buttons">
<div class="button_amount">
<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>
</div>
<div class="button_add">
<button class="btn-comprar add-oferta-dia" data-versao="op2">ADICIONAR</button>
</div>
</div>
</div>
</div>
</section>
<?php endif; ?>
<?php endif; ?>
@endif
@endsection