Emine

Collection
Ricca Sposa Couture
Number
R24-023
Price
Book an appointment Cooperation
+ basePrice.toFixed(2)); if (accessoriesPrice > 0) { $('.accessories-total').show().find('.item-price').text(' }); + accessoriesPrice.toFixed(2)); } else { $('.accessories-total').hide(); } if (quantity > 1) { $('.quantity-calc').show().find('.qty-number').text(quantity); } else { $('.quantity-calc').hide(); } $('.final-amount').text(' }); + finalTotal.toFixed(2)); // Enable add to cart button $addToCartBtn.prop('disabled', false).find('span').text('Add to Cart'); $addToCartBtn.data('variation-id', currentVariation.id); console.log('Total calculated:', { basePrice: basePrice, accessoriesPrice: accessoriesPrice, quantity: quantity, finalTotal: finalTotal }); } else { $variationInfo.hide(); $addToCartBtn.prop('disabled', true).find('span').text('Combination not available'); } } else { $variationInfo.hide(); $addToCartBtn.prop('disabled', true).find('span').text('Select options to add to cart'); } } // Add delay to ensure DOM is ready setTimeout(function() { $colorOptions.on('change', function() { $('.color-option').removeClass('selected'); $(this).closest('.color-option').addClass('selected'); calculateTotal(); }); $sizeSelect.on('change', calculateTotal); $quantityInput.on('input change', calculateTotal); $accessoryInputs.on('change', calculateTotal); $addToCartBtn.on('click', function(e) { e.preventDefault(); var variationId = $(this).data('variation-id'); var selectedAccessories = []; $accessoryInputs.filter(':checked').each(function() { selectedAccessories.push({ name: $(this).val(), price: $(this).data('price') }); }); if (variationId) { console.log('Adding to cart:', { variation_id: variationId, quantity: $quantityInput.val(), accessories: selectedAccessories, total: $('.final-amount').text() }); alert('Added to cart! Total: ' + $('.final-amount').text()); } }); console.log('Event handlers attached'); // Debug log }, 100); });