window.addEventListener('AddItemToCart', function(event) {
const productVariantId = event.detail;
// Perform AJAX request to add item to cart
fetch('/cart/add.js', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
items: [{
id: productVariantId,
quantity: 1,
}],
sections: 'cart-drawer,cart-icon-bubble'
})
})
.then(response => response.json())
.then(data => {
console.log('Item added to cart:', data);
document.documentElement.dispatchEvent(new CustomEvent('cart:refresh', {
bubbles: true
}));
})
.catch((error) => {
console.error('Error adding item to cart:', error);
});
});
$(document).ready(function() {
// Cache the main add to cart area and sticky add to cart button elements
var $mainAddToCart = $('.Product__Info'); // Replace with your actual selector for the main add to cart area
var $stickyAddToCart = $('#stickycart'); // Replace with your actual selector for the sticky add to cart button
// Initially hide the sticky add to cart button
$stickyAddToCart.hide();
// Function to check visibility of main add to cart area
function checkAddToCartVisibility() {
// Check if the main add to cart area is visible in the viewport
var isVisible = $mainAddToCart.is(':visible') &&
$mainAddToCart.offset().top < $(window).scrollTop() + $(window).height() &&
$mainAddToCart.offset().top + $mainAddToCart.outerHeight() > $(window).scrollTop();
// Toggle sticky add to cart button based on visibility
if (isVisible) {
$stickyAddToCart.hide();
} else {
$stickyAddToCart.show();
}
}
// Run the check on scroll and on load
$(window).on('scroll resize', checkAddToCartVisibility);
checkAddToCartVisibility(); // Initial check
});
$(document).ready(function() {
// Show the first tab content by default
$(".tab-content .tab").hide();
$(".tab-content .tab:first").show();
// Handle click on tab link
$(".tab-links li").click(function(event) {
event.preventDefault();
// Remove active class from all tabs and content
$(".tab-links li").removeClass("active");
$(".tab-content .tab").removeClass("active").hide();
// Add active class to clicked tab and show the corresponding content
$(this).addClass("active");
var target = $(this).find("a").attr("href");
$(target).addClass("active").show();
});
$('.recrecenttab a').on('click', function(){
$('.recrecenttab a').removeClass('active');
$(this).addClass('active');
var isssss = $(this).attr('data_title');
$('.producttab').each(function(){
var isssssss = $(this).attr('data_title');
if(isssssss == isssss){
$(this).show();
// alert(isssss);
}else{
$(this).hide();
}
});
});
});
{"id":9638600114480,"title":"Dove Short Suede Statement Ankle Boots","handle":"dove-short-suede-statement-ankle-boots","description":"\u003cp\u003e\u003cstrong\u003eMaterial: Premium Pu Leather \u003cbr data-mce-fragment=\"1\"\u003e\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003e \u003c\/p\u003e","published_at":"2024-11-06T21:38:52+05:30","created_at":"2024-10-29T17:38:46+05:30","vendor":"Alamode By Akanksha","type":"Shoes","tags":["Ankle boots for women","Boots for women","FAST","Footwear","india75","Ready to ship","Suede Boots","winter 2024","Winter boots for women","Winter Collection"],"price":329900,"price_min":329900,"price_max":329900,"available":false,"price_varies":false,"compare_at_price":425000,"compare_at_price_min":425000,"compare_at_price_max":425000,"compare_at_price_varies":false,"variants":[{"id":49200809836848,"title":"Nude Brown \/ 37","option1":"Nude Brown","option2":"37","option3":null,"sku":"SH_DOVE_NB_37","requires_shipping":true,"taxable":true,"featured_image":{"id":46989932134704,"product_id":9638600114480,"position":1,"created_at":"2024-10-29T17:39:09+05:30","updated_at":"2024-12-29T13:53:11+05:30","alt":null,"width":800,"height":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591","variant_ids":[49200809836848,49200809869616,49200809902384,49200809935152]},"available":false,"name":"Dove Short Suede Statement Ankle Boots - Nude Brown \/ 37","public_title":"Nude Brown \/ 37","options":["Nude Brown","37"],"price":329900,"weight":200,"compare_at_price":425000,"inventory_management":"shopify","barcode":null,"featured_media":{"alt":null,"id":39090192974128,"position":1,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":49200809869616,"title":"Nude Brown \/ 38","option1":"Nude Brown","option2":"38","option3":null,"sku":"SH_DOVE_NB_38","requires_shipping":true,"taxable":true,"featured_image":{"id":46989932134704,"product_id":9638600114480,"position":1,"created_at":"2024-10-29T17:39:09+05:30","updated_at":"2024-12-29T13:53:11+05:30","alt":null,"width":800,"height":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591","variant_ids":[49200809836848,49200809869616,49200809902384,49200809935152]},"available":false,"name":"Dove Short Suede Statement Ankle Boots - Nude Brown \/ 38","public_title":"Nude Brown \/ 38","options":["Nude Brown","38"],"price":329900,"weight":200,"compare_at_price":425000,"inventory_management":"shopify","barcode":null,"featured_media":{"alt":null,"id":39090192974128,"position":1,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":49200809902384,"title":"Nude Brown \/ 39","option1":"Nude Brown","option2":"39","option3":null,"sku":"SH_DOVE_NB_39","requires_shipping":true,"taxable":true,"featured_image":{"id":46989932134704,"product_id":9638600114480,"position":1,"created_at":"2024-10-29T17:39:09+05:30","updated_at":"2024-12-29T13:53:11+05:30","alt":null,"width":800,"height":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591","variant_ids":[49200809836848,49200809869616,49200809902384,49200809935152]},"available":false,"name":"Dove Short Suede Statement Ankle Boots - Nude Brown \/ 39","public_title":"Nude Brown \/ 39","options":["Nude Brown","39"],"price":329900,"weight":200,"compare_at_price":425000,"inventory_management":"shopify","barcode":null,"featured_media":{"alt":null,"id":39090192974128,"position":1,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":49200809935152,"title":"Nude Brown \/ 40","option1":"Nude Brown","option2":"40","option3":null,"sku":"SH_DOVE_NB_40","requires_shipping":true,"taxable":true,"featured_image":{"id":46989932134704,"product_id":9638600114480,"position":1,"created_at":"2024-10-29T17:39:09+05:30","updated_at":"2024-12-29T13:53:11+05:30","alt":null,"width":800,"height":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591","variant_ids":[49200809836848,49200809869616,49200809902384,49200809935152]},"available":false,"name":"Dove Short Suede Statement Ankle Boots - Nude Brown \/ 40","public_title":"Nude Brown \/ 40","options":["Nude Brown","40"],"price":329900,"weight":200,"compare_at_price":425000,"inventory_management":"shopify","barcode":null,"featured_media":{"alt":null,"id":39090192974128,"position":1,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591"}},"requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591","\/\/www.alamodelabel.in\/cdn\/shop\/files\/1905DDEC-3806-4681-9EBB-4DF41ED4622B.jpg?v=1735460591","\/\/www.alamodelabel.in\/cdn\/shop\/files\/2DDB1841-56A8-407E-B219-C38B33420093.jpg?v=1735460591"],"featured_image":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591","options":["Color","Size"],"media":[{"alt":null,"id":39090192974128,"position":1,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591"},"aspect_ratio":1.0,"height":800,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EF9296B2-11DB-4C7C-8411-66DE814521A2.jpg?v=1735460591","width":800},{"alt":null,"id":39090193236272,"position":2,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/1905DDEC-3806-4681-9EBB-4DF41ED4622B.jpg?v=1735460591"},"aspect_ratio":1.0,"height":800,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/1905DDEC-3806-4681-9EBB-4DF41ED4622B.jpg?v=1735460591","width":800},{"alt":null,"id":39090193301808,"position":3,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/2DDB1841-56A8-407E-B219-C38B33420093.jpg?v=1735460591"},"aspect_ratio":1.0,"height":800,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/2DDB1841-56A8-407E-B219-C38B33420093.jpg?v=1735460591","width":800}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cp\u003e\u003cstrong\u003eMaterial: Premium Pu Leather \u003cbr data-mce-fragment=\"1\"\u003e\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003e \u003c\/p\u003e"}