Gigante Indústria Têxtil e os cookies: a gente usa cookies para personalizar anúncios e melhorar a sua experiência no site. Ao continuar navegando, você concorda com a nossa Política de Privacidade.
//Konduto
var __kdt = __kdt || [];
// Defina a sua chave pública para sabermos quem você é
__kdt.push({"public_key": "P3B971F2A00"}); (function() {
$('.user-loggedin').hide();
var carrinho = $('#cart-preview-area'); var kdtCall = function(u) {
if (u) {
__kdt.push({"customer_id": u});
}
var kdt = document.createElement('script');
kdt.id = 'kdtjs';
kdt.type = 'text/javascript';
kdt.async = true;
kdt.src = 'https://i.k-analytix.com/k.js';
var s = document.getElementsByTagName('body')[0];
s.parentNode.insertBefore(kdt, s);
}; var abortRequestInfoExtra = carrinho.length === 0; if (abortRequestInfoExtra) { kdtCall(); return;
}
if (Zord.cookie.get('carrinho') || Zord.cookie.get('PHPSESSID')) {
Zord.call('cliente', 'getInfoExtra', { }, function(response) {
if (response) {
if (response.carrinhoRapido) {
if (carrinho) {
carrinho.html(response.carrinhoRapido);
applySVG();
}
} if (response.carrinhoLength) {
Zord.set({'cart.size':response.carrinhoLength});
}
if (response.usuario) {
$('.user-loggedin').show();
$('.user-not-loggedin').hide();
if (response.usuario.pessoa && response.usuario.pessoa.nome) {
$('.user-name').text(response.usuario.pessoa.nome.split(" ")[0]);
} $('.adicionar-favorito').removeClass('fav-user-not-loggedin');
}
if (response.produtoFavorito === true){
$('.salvar-favoritos .adicionar-favorito').addClass('favorito-adicionado');
$('.salvar-favoritos .text').text('Salvo em favoritos');
} } if (response && response.usuario) {
kdtCall(response.usuario.pessoa.id);
}else {
kdtCall();
} }, null, false);
} else {
Zord.set({'cart.size':0}); $('.adicionar-favorito').addClass('fav-user-not-loggedin'); kdtCall(); } Zord.Tracking.trackSession();
Zord.Tracking.track(); $('#cart-preview-area').on('click',function() {
//vamos verificar se ja temos carregado os itens
Zord.checkout.atualizaPreview(false);
}); })();
/*
* Replace all SVG images with inline SVG
*/
function applySVG() {
jQuery.support.cors = true;
jQuery('img.svg').each(function(){
var $img = jQuery(this);
var imgID = $img.attr('id');
var imgClass = $img.attr('class');
var imgURL = $img.attr('src');
if (!imgURL){
var imgURL = $img.attr('data-src');
}
var isSvg = imgURL.split('.').pop() === 'svg' ? true : false;
if (isSvg) {
jQuery.get({
url: imgURL,
crossDomain: true,
dataType: 'xml',
success: function(data) {
// Get the SVG tag, ignore the rest
var $svg = jQuery(data).find('svg');
// Add replaced image's ID to the new SVG
if (typeof imgID !== 'undefined') {
$svg = $svg.attr('id', imgID);
}
// Add replaced image's classes to the new SVG
if (typeof imgClass !== 'undefined') {
$svg = $svg.attr('class', imgClass + ' replaced-svg');
}
// Remove any invalid XML tags as per http://validator.w3.org
$svg = $svg.removeAttr('xmlns:a');
// Check if the viewport is set, if the viewport is not set the SVG wont't scale.
if (!$svg.attr('viewBox') && $svg.attr('height') && $svg.attr('width')) {
$svg.attr('viewBox', '0 0 ' + $svg.attr('height') + ' ' + $svg.attr('width'));
}
// Replace image with new SVG
$img.replaceWith($svg);
}
});
}
});
}
$('ul.product-list li a').on('click', function(e){
if(this.hash){
var pathName = e.currentTarget.pathname;
var windowPathName = window.location.pathname;
if(pathName === windowPathName){
var derivacaoSelectAuto = this.hash.split('=')[1];
var variacoesLista1 = $('.variacao-area-1 li');
setTimeout(function () {
if(!jQuery.isNumeric(derivacaoSelectAuto)) {
$('li[data-derivacao-item-name="'+derivacaoSelectAuto+'"]',variacoesLista1.parent()).click();
}
else {
$('li[data-derivacao-item-id="'+derivacaoSelectAuto+'"]',variacoesLista1.parent()).click();
}
}, 1);
$('html,body').animate({
scrollTop: 0
}, 2000);
}
}
});
applySVG();