Free Shipping, Returns & Sizing Book Your Appointment

Experts since 1975

Free Shipping, Returns & Sizing Book Your Appointment

Price

price - slider
$19.00$9409.00

Type

Type

Period

Period

Material

Material

Birthstone

Birthstone

Need Help?

Vintage Brooches

Showing 21–26 of 26 results

X

Price

price - slider
$19.00$9409.00

Type

Type

Period

Period

Material

Material

Birthstone

Birthstone

Need Help?

jQuery(document).ready(function ($) { // Listen for changes in the size dropdown $('select[name="attribute_pa_size"]').on('change', function () { var selectedSize = $(this).val(); // Get the selected size var productId = $('input[name="add-to-cart"]').val(); // Get the product ID // Ensure both values are present if (!selectedSize || !productId) { console.error("Missing selected size or product ID"); return; } // Send the selected size to the server via AJAX $.ajax({ url: '/wp-admin/admin-ajax.php', // AJAX handler URL type: 'POST', data: { action: 'update_selected_size', // Action defined in PHP selected_size: selectedSize, product_id: productId }, success: function (response) { if (response.success) { console.log('Size updated successfully:', response.data.selected_size); } else { console.error('Failed to update size:', response.data.message); } }, error: function (xhr, status, error) { console.error('AJAX Error:', error); } }); }); });