X7 Motorcycle Alarm Lock
₦77,000
₦194,000
SAVE 60%
${(function() {
var variantData = data.variant;
var productData = data.product;
var hasDiscount = false;
var discountPercentage = 0;
var currentPrice = 0;
var comparePrice = 0;
// 关键修复:更全面地检查所有可能的原价字段
if (variantData) {
currentPrice = variantData.price;
// 按优先级尝试获取原价
comparePrice = variantData.compare_at_price
|| variantData.compareAtPrice
|| (productData && productData.compare_at_price_max)
|| (productData && productData.compareAtPriceMax)
|| 0;
// 确保 comparePrice 是数字
comparePrice = Number(comparePrice) || 0;
currentPrice = Number(currentPrice) || 0;
if (comparePrice > currentPrice && currentPrice > 0) {
hasDiscount = true;
discountPercentage = Math.round(((comparePrice - currentPrice) / comparePrice) * 100);
}
} else if (productData) {
// 产品级别的价格
currentPrice = productData.price || productData.price_min || productData.priceMin || 0;
comparePrice = productData.compare_at_price_max
|| productData.compareAtPriceMax
|| productData.compare_at_price
|| productData.compareAtPrice
|| 0;
// 确保是数字
comparePrice = Number(comparePrice) || 0;
currentPrice = Number(currentPrice) || 0;
if (comparePrice > currentPrice && currentPrice > 0) {
hasDiscount = true;
discountPercentage = Math.round(((comparePrice - currentPrice) / comparePrice) * 100);
}
}
// 调试信息(生产环境可删除)
console.log('Price Debug:', {
variantData: variantData,
productData: productData,
currentPrice: currentPrice,
comparePrice: comparePrice,
hasDiscount: hasDiscount,
discountPercentage: discountPercentage
});
var priceHtml = '';
priceHtml += '
';
priceHtml += '
';
priceHtml += '
';
if (variantData || productData) {
priceHtml += '';
if (hasDiscount && comparePrice > 0) {
priceHtml += '';
}
}
priceHtml += '
';
if (hasDiscount && discountPercentage > 0) {
priceHtml += '
SAVE ' + discountPercentage + '%
';
}
priceHtml += '
';
return priceHtml;
})()}
${function(){
const tipText = "Please select a {{ name }}".replace(/\{\{\s+name\s+\}\}/g, data);
return `${tipText}
`
}()}
Product was out of stock.
Product is unavailable.
Over 50,000 Motorcycles were stolen last year! Don't let your bike be another statistic, protect your bike with an Alarm Disc Lock!
Features:
- Made of high quality stainless steel and aluminum alloy
- Tamper proof battery door; alarm resets itself
- Water resistant with anti-damage lock core
- Super loud 110dB trigger alarm
- Comes with 2x Keys
It's obvious thieves don't like attention. This is why an Alarm Disc Lock is perfect to help protect your bike. In addition to immobilizing your motorcycle, the 110 decibel Alarm will automatically activate upon sensing any vibration or shock.