{"id":8547,"date":"2026-07-30T19:49:32","date_gmt":"2026-07-30T22:49:32","guid":{"rendered":"https:\/\/larubeta.com.ar\/remate2026\/?p=8547"},"modified":"2026-08-05T20:39:56","modified_gmt":"2026-08-05T23:39:56","slug":"vaquillonas-lote-15","status":"publish","type":"post","link":"https:\/\/larubeta.com.ar\/remate2026\/vaquillonas-lote-15\/","title":{"rendered":"Vaquillonas PP Lote 15"},"content":{"rendered":"\n<div class=\"vicino-auction-container\" data-lot-id=\"8547\">\n    <h2 class=\"vicino-auction-title\">Vaquillonas PP Lote 15<\/h2>\n\n    <div class=\"vicino-auction-details\">\n                    <div class=\"vicino-auction-status vicino-auction-inactive\">\n                <span class=\"status-icon\">\u26aa<\/span> Preoferta Cerrada            <\/div>\n        \n        <!-- Auction Time Information -->\n        <div class=\"vicino-auction-time-info\">\n            \n            <div class=\"vicino-auction-dates\">\n                \n                <div class=\"vicino-auction-start-date\">\n                    <span class=\"label\">Fecha de Inicio:<\/span>\n                    <span class=\"date\">agosto 6, 2026 10:00 am<\/span>\n                <\/div>\n\n                <div class=\"vicino-auction-end-date\">\n                    <span class=\"label\">Fecha de Finalizaci\u00f3n:<\/span>\n                    <span class=\"date\" id=\"vicino-end-date\" data-end=\"2026-08-07 23:00:00\">\n                        agosto 7, 2026 8:00 pm                    <\/span>\n                                    <\/div>\n            <\/div>\n\n                    <\/div>\n\n        <div class=\"vicino-auction-price-info\">\n                            <div class=\"vicino-auction-starting-price\">\n                    <span class=\"label\">Precio Inicial:<\/span>\n                    <span class=\"price\">10.000.000<\/span>\n                <\/div>\n\n                <div class=\"vicino-auction-current-bid\">\n                    <span class=\"label\">Preoferta Actual:<\/span>\n                    <span class=\"price\">10.000.000<\/span>\n                <\/div>\n                    <\/div>\n\n        <!-- Bid History Table (hidden for unique bid lots) -->\n                <div class=\"vicino-auction-bid-history\">\n            <h3>Historial de Preofertas<\/h3>\n                            <p class=\"no-bids-message\">A\u00fan no se han realizado Preofertas.<\/p>\n                    <\/div>\n        \n            <\/div>\n<\/div>\n\n<script>\njQuery(document).ready(function($) {\n    \/\/ Format number with thousand separators\n    function formatNumber(num) {\n        return num.toString().replace(\/\\B(?=(\\d{3})+(?!\\d))\/g, \".\");\n    }\n\n    \/\/ Parse formatted number back to raw number\n    function parseFormattedNumber(str) {\n        return parseInt(str.replace(\/\\.\/g, ''));\n    }\n\n    \/\/ Detect unique bid mode\n    var isUniqueBid = $('#vicino-place-bid-form').data('unique-bid') === 1;\n    var minBid = 0;\n\n    if (!isUniqueBid && $('#bid_amount').length > 0) {\n        \/\/ Initialize with minimum value (only for normal auction forms)\n        minBid = parseInt($('#bid_amount').data('min'));\n        $('#bid_amount').val(formatNumber(minBid));\n        $('#bid_amount_raw').val(minBid);\n\n        \/\/ Format the input when user types\n        $('#bid_amount').on('input', function() {\n            var rawValue = parseFormattedNumber($(this).val());\n            if (!isNaN(rawValue)) {\n                $('#bid_amount_raw').val(rawValue);\n                $(this).val(formatNumber(rawValue));\n            }\n        });\n    }\n\n    \/\/ Unified countdown timer functionality\n    function updateCountdown() {\n        $('.countdown-timer').each(function() {\n            var $timer = $(this);\n            var $countdown = $timer.closest('#vicino-countdown');\n            var endDateStr = $countdown.length > 0 ? $countdown.data('end') : $timer.data('end');\n\n            if (!endDateStr) {\n                $timer.html('Error: No end date set');\n                return;\n            }\n\n            try {\n                \/\/ Parse end date string stored in UTC - browser will convert to local timezone automatically\n                var endDate = new Date(endDateStr + 'Z'); \/\/ Treat stored date as UTC, browser handles timezone conversion\n                var now = new Date();\n\n                \/\/ Calculate time difference in milliseconds\n                var diff = endDate.getTime() - now.getTime();\n\n                if (diff <= 0) {\n                    $timer.html('Preoferta finalizada');\n                    \/\/ Reload the page only once when the auction ends\n                    var lotId = $('.vicino-auction-container').data('lot-id') || 'default';\n                    var reloadKey = 'auctionEndReloaded_' + lotId;\n\n                    if (!sessionStorage.getItem(reloadKey)) {\n                        console.log('Auction ended, reloading page...');\n                        sessionStorage.setItem(reloadKey, 'true');\n                        setTimeout(function() {\n                            location.reload();\n                        }, 2000); \/\/ Wait 2 seconds then reload\n                    }\n                    return;\n                }\n\n                \/\/ Calculate time components\n                var days = Math.floor(diff \/ (1000 * 60 * 60 * 24));\n                var hours = Math.floor((diff % (1000 * 60 * 60 * 24)) \/ (1000 * 60 * 60));\n                var minutes = Math.floor((diff % (1000 * 60 * 60)) \/ (1000 * 60));\n                var seconds = Math.floor((diff % (1000 * 60)) \/ 1000);\n\n                \/\/ Format time string\n                var timeString = '';\n                if (days > 0) timeString += days + ' d\u00edas ';\n                timeString += hours.toString().padStart(2, '0') + ':' +\n                             minutes.toString().padStart(2, '0') + ':' +\n                             seconds.toString().padStart(2, '0');\n\n                $timer.html(timeString);\n\n                \/\/ Highlight countdown if less than 5 minutes remaining\n                if ($countdown.length > 0 && diff <= 5 * 60 * 1000) {\n                    $countdown.addClass('vicino-countdown-ending');\n                }\n            } catch (e) {\n                console.error('Error in countdown calculation:', e);\n                $timer.html('Error en el c\u00e1lculo del tiempo');\n            }\n        });\n    }\n\n    \/\/ Update countdown every second if there are any timers and the auction is not completed\/expired\n    var auctionStatus = '';\n    if ($('.countdown-timer').length > 0 && auctionStatus !== 'completed' && auctionStatus !== 'expired') {\n        updateCountdown();\n        setInterval(updateCountdown, 1000);\n    }\n\n    \/\/ Handle form submission\n    $('#vicino-place-bid-form').on('submit', function(e) {\n        e.preventDefault();\n\n        var $form = $(this);\n        var $message = $('.vicino-bid-message');\n\n        \/\/ Get bid amount based on form type\n        var rawBidAmount;\n        if (isUniqueBid) {\n            rawBidAmount = parseInt($form.find('input[name=\"bid_amount_raw\"]').val());\n        } else {\n            rawBidAmount = parseFormattedNumber($form.find('input[name=\"bid_amount\"]').val());\n        }\n\n        \/\/ Validate minimum bid (only for normal auctions)\n        if (!isUniqueBid && rawBidAmount < minBid) {\n            $message.html('<span class=\"error\">Tu Preoferta debe ser al menos ' + formatNumber(minBid) + '<\/span>');\n            return;\n        }\n\n        $message.html('<span class=\"loading\">' + (isUniqueBid ? 'Procesando tu compra...' : 'Procesando tu Preoferta...') + '<\/span>');\n\n        $.ajax({\n            url: vicino_auction_public.ajax_url,\n            type: 'POST',\n            data: {\n                action: 'vicino_auction_place_bid',\n                lot_id: $form.find('input[name=\"lot_id\"]').val(),\n                bid_amount: rawBidAmount,\n                nonce: vicino_auction_public.nonce\n            },\n            success: function(response) {\n                if (response.success) {\n                    $message.html('<span class=\"success\">' + response.data.message + '<\/span>');\n\n                    \/\/ Update the current bid display\n                    $('.vicino-auction-current-bid .price').text(formatNumber(rawBidAmount));\n\n                    if (!isUniqueBid) {\n                        \/\/ Update the minimum bid amount (only for normal auctions)\n                        var increment = parseInt($('#bid_amount').data('increment'));\n                        minBid = rawBidAmount + increment;\n                        $('#bid_amount').data('min', minBid);\n                        $('#bid_amount').val(formatNumber(minBid));\n                        $('#bid_amount_raw').val(minBid);\n\n                        \/\/ Update the has-bids attribute to indicate there are now bids\n                        $('#bid_amount').data('has-bids', '1');\n\n                        \/\/ Update the minimum bid message\n                        $('.min-bid-info').text('Preoferta m\u00ednima: ' + formatNumber(minBid) + ' (oferta actual + ' + increment + ' de incremento)')\n                    }\n\n                    \/\/ If the auction end time was extended\n                    if (response.data.new_end_date) {\n                        \/\/ Update the end date display\n                        var formattedDate = new Date(response.data.new_end_date.replace(\/-\/g, '\/'));\n                        var dateOptions = { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric' };\n                        var formattedDateStr = formattedDate.toLocaleDateString('es-ES', dateOptions);\n\n                        $('#vicino-end-date').text(formattedDateStr);\n                        $('#vicino-end-date').data('end', response.data.new_end_date);\n                        $('#vicino-countdown').data('end', response.data.new_end_date);\n\n                        \/\/ Add the time extended indicator if not already present\n                        if ($('.vicino-time-extended').length === 0) {\n                            $('#vicino-end-date').after('<span class=\"vicino-time-extended\">(Tiempo Extendido)<\/span>');\n                        }\n                    }\n\n                    \/\/ Reload the page to show updated bid history\n                    setTimeout(function() {\n                        location.reload();\n                    }, 2000);\n                } else {\n                    $message.html('<span class=\"error\">' + response.data + '<\/span>');\n                }\n            },\n            error: function() {\n                $message.html('<span class=\"error\">Ocurri\u00f3 un error. Por favor, int\u00e9ntalo de nuevo.<\/span>');\n            }\n        });\n    });\n});\n<\/script>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"vicino-auction-status-badge vicino-status-not-started\">\n    <span class=\"status-icon\">\u23f3<\/span>\n    <span class=\"status-text\">PREOFERTA NO INICIADA<\/span>\n<\/div>\n","protected":false},"author":496,"featured_media":8657,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[192],"tags":[],"class_list":["post-8547","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-vaquillonas-pp"],"_links":{"self":[{"href":"https:\/\/larubeta.com.ar\/remate2026\/wp-json\/wp\/v2\/posts\/8547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/larubeta.com.ar\/remate2026\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/larubeta.com.ar\/remate2026\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/larubeta.com.ar\/remate2026\/wp-json\/wp\/v2\/users\/496"}],"replies":[{"embeddable":true,"href":"https:\/\/larubeta.com.ar\/remate2026\/wp-json\/wp\/v2\/comments?post=8547"}],"version-history":[{"count":2,"href":"https:\/\/larubeta.com.ar\/remate2026\/wp-json\/wp\/v2\/posts\/8547\/revisions"}],"predecessor-version":[{"id":9150,"href":"https:\/\/larubeta.com.ar\/remate2026\/wp-json\/wp\/v2\/posts\/8547\/revisions\/9150"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/larubeta.com.ar\/remate2026\/wp-json\/wp\/v2\/media\/8657"}],"wp:attachment":[{"href":"https:\/\/larubeta.com.ar\/remate2026\/wp-json\/wp\/v2\/media?parent=8547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/larubeta.com.ar\/remate2026\/wp-json\/wp\/v2\/categories?post=8547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/larubeta.com.ar\/remate2026\/wp-json\/wp\/v2\/tags?post=8547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}