add_action('wp_ajax_custom_fast_add_to_cart', 'custom_fast_add_to_cart_handler'); add_action('wp_ajax_nopriv_custom_fast_add_to_cart', 'custom_fast_add_to_cart_handler'); function custom_fast_add_to_cart_handler() { if (!isset($_POST['product_id']) || !class_exists('WooCommerce')) { wp_send_json_error(['message' => 'Invalid request']); } $product_id = apply_filters('woocommerce_add_to_cart_product_id', absint($_POST['product_id'])); $quantity = empty($_POST['quantity']) ? 1 : wc_stock_amount($_POST['quantity']); // Check if the product is already in the cart BEFORE calling WooCommerce add_to_cart if (WC()->cart) { foreach (WC()->cart->get_cart() as $cart_item) { if ($cart_item['product_id'] == $product_id || $cart_item['variation_id'] == $product_id) { // Return success immediately to avoid "quantity limit reached" error wp_send_json_success(['already_in_cart' => true]); } } } $passed_validation = apply_filters('woocommerce_add_to_cart_validation', true, $product_id, $quantity); if ($passed_validation && WC()->cart->add_to_cart($product_id, $quantity)) { wp_send_json_success(); } wp_send_json_error(['message' => 'Could not add to cart']); } // 2. Register the Shortcode add_shortcode('fast_wc_buttons', 'fast_wc_buttons_shortcode'); function fast_wc_buttons_shortcode($atts) { if (!class_exists('WooCommerce')) return ''; global $product; $atts = shortcode_atts(['id' => ''], $atts, 'fast_wc_buttons'); $product_id = !empty($atts['id']) ? intval($atts['id']) : ($product ? $product->get_id() : 0); if (!$product_id) return ''; $checkout_url = wc_get_checkout_url(); // Check if product is already in the cart on initial page load $is_in_cart = false; if (WC()->cart) { foreach (WC()->cart->get_cart() as $cart_item) { if ($cart_item['product_id'] == $product_id || $cart_item['variation_id'] == $product_id) { $is_in_cart = true; break; } } } $add_btn_class = 'fwc-btn fwc-add-to-cart' . ($is_in_cart ? ' success-state is-in-cart' : ''); $add_btn_text = $is_in_cart ? 'In your Cart' : 'Add to Cart'; $add_btn_attr = $is_in_cart ? 'disabled' : ''; ob_start(); ?>
simplyartique.com
HAND-PICKED

Antique & Vintage Quilts

Antique and vintage quilts have their own story, with patterns, fabrics, and stitching that reflect different times and traditions. Our collection includes hand-selected quilts in a range of sizes, colors, and designs.

Best Seller

Cutter Quilts

Collectible Quilts

Vintage Quilts

OUR STORY

Bringing Old Quilts
To New Homes

Almost every kind of quilt deserves to be appreciated and used again. Some become part of a collection, while others find a place in everyday homes or are repurposed into something new. Along with vintage and antique quilts, we also offer cutter quilts for makers and repurposers.

two sunbonnet sue quilts in yellow and orange color
A picture contains a bundle of 11 cutter quilts.
two color quilts in blue/white, pink/white and yellow/white colots
official simply artique logo

Simply Artique

Antique & Vintage Quilts