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();
}
});
});
});
Get the app now
🎉Save 5% on your first order📱
Looks like you don't have the app installed
DOWNLOAD APP
Get our app now!
Scan the QR code below!
{"id":9632783565104,"title":"Violetta Premium Winter Capes with Fur Detailing","handle":"violetta-premium-winter-capes-with-fur-detailing","description":"\u003cp\u003e\u003cstrong\u003eMaterial: Faux Fur\u003c\/strong\u003e \u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003eInvest in Alamode's Bestsellers this Season\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003eGoes well with both Western and Ethnic Looks -\u003c\/p\u003e\n\u003cp\u003eShop Now!\u003c\/p\u003e","published_at":"2024-10-24T10:38:22+05:30","created_at":"2024-10-23T01:35:07+05:30","vendor":"Alamode By Akanksha","type":"Jackets and Coats","tags":["cape for women","Christmas Collection for women","FAST","india75","Outerwear","Ready to ship","SHIPS IN 24-48 HOURS","Western wear for women","winter 2024","Winter Collection","Woolen"],"price":289900,"price_min":289900,"price_max":289900,"available":true,"price_varies":false,"compare_at_price":349900,"compare_at_price_min":349900,"compare_at_price_max":349900,"compare_at_price_varies":false,"variants":[{"id":49182901240112,"title":"Pink \/ Free Size","option1":"Pink","option2":"Free Size","option3":null,"sku":"DR_Violet_PK_FS","requires_shipping":true,"taxable":true,"featured_image":{"id":46898585698608,"product_id":9632783565104,"position":4,"created_at":"2024-10-23T01:37:02+05:30","updated_at":"2024-12-29T13:55:15+05:30","alt":null,"width":800,"height":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EC5A4570-E7ED-4410-B05E-EB202FEE4CA3.jpg?v=1735460715","variant_ids":[49182901240112]},"available":true,"name":"Violetta Premium Winter Capes with Fur Detailing - Pink \/ Free Size","public_title":"Pink \/ Free Size","options":["Pink","Free Size"],"price":289900,"weight":200,"compare_at_price":349900,"inventory_management":"shopify","barcode":null,"featured_media":{"alt":null,"id":39028204306736,"position":4,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EC5A4570-E7ED-4410-B05E-EB202FEE4CA3.jpg?v=1735460715"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":49182901371184,"title":"Beige \/ Free Size","option1":"Beige","option2":"Free Size","option3":null,"sku":"DR_Violet_BG_FS","requires_shipping":true,"taxable":true,"featured_image":{"id":46898585600304,"product_id":9632783565104,"position":2,"created_at":"2024-10-23T01:37:02+05:30","updated_at":"2024-12-29T13:55:15+05:30","alt":null,"width":800,"height":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/D2CB66CA-EF0B-4850-8EDE-7132B28DA884.jpg?v=1735460715","variant_ids":[49182901371184]},"available":true,"name":"Violetta Premium Winter Capes with Fur Detailing - Beige \/ Free Size","public_title":"Beige \/ Free Size","options":["Beige","Free Size"],"price":289900,"weight":200,"compare_at_price":349900,"inventory_management":"shopify","barcode":null,"featured_media":{"alt":null,"id":39028204241200,"position":2,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/D2CB66CA-EF0B-4850-8EDE-7132B28DA884.jpg?v=1735460715"}},"requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/www.alamodelabel.in\/cdn\/shop\/files\/4986BBA9-9D14-44AE-9884-17E0CC38C060.jpg?v=1735460715","\/\/www.alamodelabel.in\/cdn\/shop\/files\/D2CB66CA-EF0B-4850-8EDE-7132B28DA884.jpg?v=1735460715","\/\/www.alamodelabel.in\/cdn\/shop\/files\/98D2AA2D-697F-41E8-B816-5492E2483DB1.jpg?v=1735460715","\/\/www.alamodelabel.in\/cdn\/shop\/files\/EC5A4570-E7ED-4410-B05E-EB202FEE4CA3.jpg?v=1735460715","\/\/www.alamodelabel.in\/cdn\/shop\/files\/980A4B8B-DC28-44E9-BA26-2905A1FB7876.jpg?v=1735460715"],"featured_image":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/4986BBA9-9D14-44AE-9884-17E0CC38C060.jpg?v=1735460715","options":["Color","Size"],"media":[{"alt":null,"id":39028204208432,"position":1,"preview_image":{"aspect_ratio":1.0,"height":960,"width":960,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/4986BBA9-9D14-44AE-9884-17E0CC38C060.jpg?v=1735460715"},"aspect_ratio":1.0,"height":960,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/4986BBA9-9D14-44AE-9884-17E0CC38C060.jpg?v=1735460715","width":960},{"alt":null,"id":39028204241200,"position":2,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/D2CB66CA-EF0B-4850-8EDE-7132B28DA884.jpg?v=1735460715"},"aspect_ratio":1.0,"height":800,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/D2CB66CA-EF0B-4850-8EDE-7132B28DA884.jpg?v=1735460715","width":800},{"alt":null,"id":39028204273968,"position":3,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/98D2AA2D-697F-41E8-B816-5492E2483DB1.jpg?v=1735460715"},"aspect_ratio":1.0,"height":800,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/98D2AA2D-697F-41E8-B816-5492E2483DB1.jpg?v=1735460715","width":800},{"alt":null,"id":39028204306736,"position":4,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EC5A4570-E7ED-4410-B05E-EB202FEE4CA3.jpg?v=1735460715"},"aspect_ratio":1.0,"height":800,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/EC5A4570-E7ED-4410-B05E-EB202FEE4CA3.jpg?v=1735460715","width":800},{"alt":null,"id":39028204437808,"position":5,"preview_image":{"aspect_ratio":1.0,"height":800,"width":800,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/980A4B8B-DC28-44E9-BA26-2905A1FB7876.jpg?v=1735460715"},"aspect_ratio":1.0,"height":800,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/980A4B8B-DC28-44E9-BA26-2905A1FB7876.jpg?v=1735460715","width":800}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cp\u003e\u003cstrong\u003eMaterial: Faux Fur\u003c\/strong\u003e \u003c\/p\u003e\n\u003cp\u003e\u003cspan\u003eInvest in Alamode's Bestsellers this Season\u003c\/span\u003e\u003c\/p\u003e\n\u003cp\u003eGoes well with both Western and Ethnic Looks -\u003c\/p\u003e\n\u003cp\u003eShop Now!\u003c\/p\u003e"}