GS-1 Digital Measuring Ruler | GadgetSpot
$45.00
// ---- buy it now (adds to cart first, then redirects to checkout) ----
const buyNowBtn = document.getElementById('buyNowBtn');
const buyNowLabel = document.getElementById('buyNowLabel');
function buyNow(){
const variantId = getSelectedVariantId();
const qty = parseInt(qtyVal.textContent);
if(!variantId){
showToast('Please choose a color and bundle', true);
return;
}
buyNowLabel.textContent = 'Redirecting…';
buyNowBtn.disabled = true;
// 1. Add item to cart via Shopify API
fetch('/cart/add.js', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({ items: [{ id: variantId, quantity: qty }] })
})
.then(r => {
if(!r.ok) return r.json().then(err => { throw new Error(err.description || 'Could not add to cart'); });
return r.json();
})
.then(() => {
// 2. Refresh cart count badge on header
refreshCartCount();
// 3. Immediately send user to checkout
window.location.href = '/checkout';
})
.catch(err => {
showToast(err.message || 'Something went wrong — try again', true);
buyNowLabel.textContent = buyNowBtn.dataset.defaultLabel || 'Buy it now';
buyNowBtn.disabled = false;
});
}
if(buyNowBtn) {
buyNowBtn.addEventListener('click', buyNow);
}
Overview:
- Mini size, convenient and practical.
- Lightweight to 35g, compact and portable.
- 8 functions, simple operation with three keys.
- 99 meters long distance measurement.
- Lithium battery direct charge, 200 days long standby.
Product information:
Shell material: aluminum alloy + silica gel
Screen: 1.8 inch va lcd display
Shell technology: fine polishing + frosted sandblasting
Screen coverage: 4h super hard
Size: 53*15mm (diameter * thickness)
Net weight: 35g
Single measurement distance: up to 9.99 meters
Cumulative scale: maximum 99.99 meters
Accuracy: 0.5%, stepless support adjustment
Backlight time: 30-180 seconds
Buzzer: On/Off
Battery: 200mah 0.74wh
Tips: The product function does not include laser and infrared
Packing list:
1 x electronic ruler
1 x type c charging cable