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":9723686388016,"title":"Kamilla Embellished Party Dress","handle":"kamilla-embellished-party-dress","description":"\u003cmeta charset=\"UTF-8\"\u003e\n\u003cp\u003e\u003cstrong\u003eMaterial: Premium Sheath\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003e \u003c\/p\u003e","published_at":"2025-01-25T18:52:54+05:30","created_at":"2025-01-22T15:42:04+05:30","vendor":"Alamode By Akanksha","type":"Dress","tags":["Birthday outfits for women","Black dresses for women","Black party dresses for women","Club dresses for women","Cocktail dresses for women","Dress","embellished","FAST","Mesh dresses for women","Mini dress for women","party collection","Party Wear","party wear dresses for women","Ready to ship","Sexy dresses for women","shimmered Sleeveless dress","Sleeveless dresses for women","Statement dresses for women","Valentine's Day Dresses","Western wear for women"],"price":235000,"price_min":235000,"price_max":235000,"available":true,"price_varies":false,"compare_at_price":299900,"compare_at_price_min":299900,"compare_at_price_max":299900,"compare_at_price_varies":false,"variants":[{"id":49478221300016,"title":"XS","option1":"XS","option2":null,"option3":null,"sku":"DR_KAMIL_XS","requires_shipping":true,"taxable":true,"featured_image":{"id":48303634481456,"product_id":9723686388016,"position":2,"created_at":"2025-01-22T15:48:11+05:30","updated_at":"2025-01-22T15:48:13+05:30","alt":null,"width":959,"height":1280,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093","variant_ids":[49478221300016,49478221332784,49478221365552,49478221398320,49478221431088]},"available":true,"name":"Kamilla Embellished Party Dress - XS","public_title":"XS","options":["XS"],"price":235000,"weight":200,"compare_at_price":299900,"inventory_management":"shopify","barcode":null,"featured_media":{"alt":null,"id":40033786102064,"position":2,"preview_image":{"aspect_ratio":0.749,"height":1280,"width":959,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":49478221332784,"title":"S","option1":"S","option2":null,"option3":null,"sku":"DR_KAMIL_S","requires_shipping":true,"taxable":true,"featured_image":{"id":48303634481456,"product_id":9723686388016,"position":2,"created_at":"2025-01-22T15:48:11+05:30","updated_at":"2025-01-22T15:48:13+05:30","alt":null,"width":959,"height":1280,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093","variant_ids":[49478221300016,49478221332784,49478221365552,49478221398320,49478221431088]},"available":true,"name":"Kamilla Embellished Party Dress - S","public_title":"S","options":["S"],"price":235000,"weight":200,"compare_at_price":299900,"inventory_management":"shopify","barcode":null,"featured_media":{"alt":null,"id":40033786102064,"position":2,"preview_image":{"aspect_ratio":0.749,"height":1280,"width":959,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":49478221365552,"title":"M","option1":"M","option2":null,"option3":null,"sku":"DR_KAMIL_M","requires_shipping":true,"taxable":true,"featured_image":{"id":48303634481456,"product_id":9723686388016,"position":2,"created_at":"2025-01-22T15:48:11+05:30","updated_at":"2025-01-22T15:48:13+05:30","alt":null,"width":959,"height":1280,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093","variant_ids":[49478221300016,49478221332784,49478221365552,49478221398320,49478221431088]},"available":true,"name":"Kamilla Embellished Party Dress - M","public_title":"M","options":["M"],"price":235000,"weight":200,"compare_at_price":299900,"inventory_management":"shopify","barcode":null,"featured_media":{"alt":null,"id":40033786102064,"position":2,"preview_image":{"aspect_ratio":0.749,"height":1280,"width":959,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":49478221398320,"title":"L","option1":"L","option2":null,"option3":null,"sku":"DR_KAMIL_L","requires_shipping":true,"taxable":true,"featured_image":{"id":48303634481456,"product_id":9723686388016,"position":2,"created_at":"2025-01-22T15:48:11+05:30","updated_at":"2025-01-22T15:48:13+05:30","alt":null,"width":959,"height":1280,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093","variant_ids":[49478221300016,49478221332784,49478221365552,49478221398320,49478221431088]},"available":true,"name":"Kamilla Embellished Party Dress - L","public_title":"L","options":["L"],"price":235000,"weight":200,"compare_at_price":299900,"inventory_management":"shopify","barcode":null,"featured_media":{"alt":null,"id":40033786102064,"position":2,"preview_image":{"aspect_ratio":0.749,"height":1280,"width":959,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093"}},"requires_selling_plan":false,"selling_plan_allocations":[]},{"id":49478221431088,"title":"XL","option1":"XL","option2":null,"option3":null,"sku":"DR_KAMIL_XL","requires_shipping":true,"taxable":true,"featured_image":{"id":48303634481456,"product_id":9723686388016,"position":2,"created_at":"2025-01-22T15:48:11+05:30","updated_at":"2025-01-22T15:48:13+05:30","alt":null,"width":959,"height":1280,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093","variant_ids":[49478221300016,49478221332784,49478221365552,49478221398320,49478221431088]},"available":true,"name":"Kamilla Embellished Party Dress - XL","public_title":"XL","options":["XL"],"price":235000,"weight":200,"compare_at_price":299900,"inventory_management":"shopify","barcode":null,"featured_media":{"alt":null,"id":40033786102064,"position":2,"preview_image":{"aspect_ratio":0.749,"height":1280,"width":959,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093"}},"requires_selling_plan":false,"selling_plan_allocations":[]}],"images":["\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0128.jpg?v=1737541093","\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093","\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0130.jpg?v=1737541093","\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0131.jpg?v=1737541093","\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0132.jpg?v=1737541093","\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0133.jpg?v=1737541093"],"featured_image":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0128.jpg?v=1737541093","options":["Size"],"media":[{"alt":null,"id":40033786069296,"position":1,"preview_image":{"aspect_ratio":0.749,"height":1280,"width":959,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0128.jpg?v=1737541093"},"aspect_ratio":0.749,"height":1280,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0128.jpg?v=1737541093","width":959},{"alt":null,"id":40033786102064,"position":2,"preview_image":{"aspect_ratio":0.749,"height":1280,"width":959,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093"},"aspect_ratio":0.749,"height":1280,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0129.jpg?v=1737541093","width":959},{"alt":null,"id":40033786134832,"position":3,"preview_image":{"aspect_ratio":0.75,"height":1280,"width":960,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0130.jpg?v=1737541093"},"aspect_ratio":0.75,"height":1280,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0130.jpg?v=1737541093","width":960},{"alt":null,"id":40033786167600,"position":4,"preview_image":{"aspect_ratio":0.749,"height":1280,"width":959,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0131.jpg?v=1737541093"},"aspect_ratio":0.749,"height":1280,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0131.jpg?v=1737541093","width":959},{"alt":null,"id":40033786200368,"position":5,"preview_image":{"aspect_ratio":0.749,"height":1280,"width":959,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0132.jpg?v=1737541093"},"aspect_ratio":0.749,"height":1280,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0132.jpg?v=1737541093","width":959},{"alt":null,"id":40033786233136,"position":6,"preview_image":{"aspect_ratio":0.749,"height":1280,"width":959,"src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0133.jpg?v=1737541093"},"aspect_ratio":0.749,"height":1280,"media_type":"image","src":"\/\/www.alamodelabel.in\/cdn\/shop\/files\/IMG-20250120-WA0133.jpg?v=1737541093","width":959}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cmeta charset=\"UTF-8\"\u003e\n\u003cp\u003e\u003cstrong\u003eMaterial: Premium Sheath\u003c\/strong\u003e\u003c\/p\u003e\n\u003cp\u003e \u003c\/p\u003e"}