$product = {"id":7847991541859,"title":"iPhone X Mod NX 嗨小強 Bread Buds","handle":"iphone-x-mod-nx-bumper-crossover-design-fv63","description":null,"published_at":"2025-08-07T09:31:38+08:00","created_at":"2025-08-05T09:30:32+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-hijohnnn","device-iPhone X","merge","reseller-hijohnnn"],"price":90000,"price_min":90000,"price_max":90000,"available":true,"price_varies":false,"compare_at_price":null,"compare_at_price_min":0,"compare_at_price_max":0,"compare_at_price_varies":false,"variants":[{"id":43562683007075,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0106424-FV63","requires_shipping":true,"taxable":true,"featured_image":{"id":34287462023267,"product_id":7847991541859,"position":7,"created_at":"2025-08-05T09:30:39+08:00","updated_at":"2025-08-05T09:30:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0132c701e9181828be71127b2d17e4ef0369fb8c.webp?v=1754357442","variant_ids":[43562683007075]},"available":true,"name":"iPhone X Mod NX 嗨小強 Bread Buds - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0106424-FV63","featured_media":{"alt":null,"id":25888679428195,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0132c701e9181828be71127b2d17e4ef0369fb8c.webp?v=1754357442"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90fbb72b67fac8efe1e66a65335f49d72bacf84f.webp?v=1754357438","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72ff4f06e77060b59a09c71fdd002e2a281d5de4.webp?v=1754357439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04fd10567f03c7552b07b29b801734f5ce2f9a0c.webp?v=1754357439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cec4dadb25ecaa698d84e15ebd56c1b079576b9.webp?v=1754357440","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e80573ddd6764f22c10bd85509a81de0959709.webp?v=1754357441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18d371bdb9da450e15df66c063dd2e41e806f7f3.webp?v=1754357441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0132c701e9181828be71127b2d17e4ef0369fb8c.webp?v=1754357442","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9f4f85a4a3c2257b2d62972465a28713e217c11.webp?v=1754357442","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/325b7374184ffd6f2a28da155e39ec24a53c9a96.webp?v=1754357443","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9036cf400e54a8c6a15579d07786f0c7e2b54a8e.webp?v=1754357443"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90fbb72b67fac8efe1e66a65335f49d72bacf84f.webp?v=1754357438","options":["color"],"media":[{"alt":null,"id":25888677822563,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90fbb72b67fac8efe1e66a65335f49d72bacf84f.webp?v=1754357438"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90fbb72b67fac8efe1e66a65335f49d72bacf84f.webp?v=1754357438","width":2000},{"alt":null,"id":25888678084707,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72ff4f06e77060b59a09c71fdd002e2a281d5de4.webp?v=1754357439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72ff4f06e77060b59a09c71fdd002e2a281d5de4.webp?v=1754357439","width":2000},{"alt":null,"id":25888678314083,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04fd10567f03c7552b07b29b801734f5ce2f9a0c.webp?v=1754357439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04fd10567f03c7552b07b29b801734f5ce2f9a0c.webp?v=1754357439","width":2000},{"alt":null,"id":25888678543459,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cec4dadb25ecaa698d84e15ebd56c1b079576b9.webp?v=1754357440"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1cec4dadb25ecaa698d84e15ebd56c1b079576b9.webp?v=1754357440","width":2000},{"alt":null,"id":25888678805603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e80573ddd6764f22c10bd85509a81de0959709.webp?v=1754357441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64e80573ddd6764f22c10bd85509a81de0959709.webp?v=1754357441","width":2000},{"alt":null,"id":25888679198819,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18d371bdb9da450e15df66c063dd2e41e806f7f3.webp?v=1754357441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18d371bdb9da450e15df66c063dd2e41e806f7f3.webp?v=1754357441","width":2000},{"alt":null,"id":25888679428195,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0132c701e9181828be71127b2d17e4ef0369fb8c.webp?v=1754357442"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0132c701e9181828be71127b2d17e4ef0369fb8c.webp?v=1754357442","width":2000},{"alt":null,"id":25888679755875,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9f4f85a4a3c2257b2d62972465a28713e217c11.webp?v=1754357442"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9f4f85a4a3c2257b2d62972465a28713e217c11.webp?v=1754357442","width":2000},{"alt":null,"id":25888679919715,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/325b7374184ffd6f2a28da155e39ec24a53c9a96.webp?v=1754357443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/325b7374184ffd6f2a28da155e39ec24a53c9a96.webp?v=1754357443","width":2000},{"alt":null,"id":25888680116323,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9036cf400e54a8c6a15579d07786f0c7e2b54a8e.webp?v=1754357443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9036cf400e54a8c6a15579d07786f0c7e2b54a8e.webp?v=1754357443","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43562683007075,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0106424-FV63","requires_shipping":true,"taxable":true,"featured_image":{"id":34287462023267,"product_id":7847991541859,"position":7,"created_at":"2025-08-05T09:30:39+08:00","updated_at":"2025-08-05T09:30:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0132c701e9181828be71127b2d17e4ef0369fb8c.webp?v=1754357442","variant_ids":[43562683007075]},"available":true,"name":"iPhone X Mod NX 嗨小強 Bread Buds - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0106424-FV63","featured_media":{"alt":null,"id":25888679428195,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0132c701e9181828be71127b2d17e4ef0369fb8c.webp?v=1754357442"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43562683007075,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0106424-FV63","requires_shipping":true,"taxable":true,"featured_image":{"id":34287462023267,"product_id":7847991541859,"position":7,"created_at":"2025-08-05T09:30:39+08:00","updated_at":"2025-08-05T09:30:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0132c701e9181828be71127b2d17e4ef0369fb8c.webp?v=1754357442","variant_ids":[43562683007075]},"available":true,"name":"iPhone X Mod NX 嗨小強 Bread Buds - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0106424-FV63","featured_media":{"alt":null,"id":25888679428195,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0132c701e9181828be71127b2d17e4ef0369fb8c.webp?v=1754357442"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$type = "";
var sellingStatus
if ($isMerge) {
$(document).ready(function() {
var productImg = $product.images[0];
var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]);
var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate')
? [productImg, bumperImg]
: [bumperImg, productImg];
window.mergeProductImages(layers).then(function (mergedImg) {
$('.merged-img').attr('src', mergedImg);
});
});
};
var sellingStatusData
window.fetchSellingStatus().then(data => {
try {
sellingStatusData = data;
} catch (error) {
sellingStatusData = null
console.error('Unable to parse selling status', error)
}
$(document).ready(function() {
handleSellingStatus($defaultVariant.sku);
});
})
function handleSellingStatus(currentSku) {
if (!sellingStatusData) {
console.error('No selling status available!')
return
}
const sellingStatusElement = document.getElementById('selling-status')
const addToCartButton = document.getElementById('AddToCart-product-template')
const currentProductSku = currentSku.replace(/-(.*)$/, '-')
if ($variants) {
const flattenedSellingStatus = [...sellingStatusData.pending, ...sellingStatusData.preorder]
const matchSellingStatusProduct = flattenedSellingStatus.filter(product => currentProductSku === product.sku)
if (matchSellingStatusProduct.length > 0) {
const isProductPending = matchSellingStatusProduct[0].status === 'pending'
const matchDate = matchSellingStatusProduct[0].date
sellingStatus = isProductPending
? "缺貨中"
: "預購完成出貨日:" + matchDate
sellingStatusElement.textContent = sellingStatus
if (sellingStatus.includes("缺貨中")){
addToCartButton.disabled ='true';
addToCartButton.textContent = "缺貨中無法加入購物車"
} else {
addToCartButton.textContent = "加到購物車"
}
} else {
sellingStatusElement.textContent = ''
addToCartButton.textContent = "加到購物車"
};
};
};
document.addEventListener('DOMContentLoaded', function () {
var currentVariantSelect = document.getElementById('SingleOptionSelector-0')
currentVariantSelect.addEventListener('change', function() {
var currentSku = $('#current_sku').text()
var skuElement = document.getElementById('current-sku')
skuElement.textContent = currentSku
handleSellingStatus(currentSku)
});
});
// Override default values of shop.strings for each template.
// Alternate product templates can change values of
// add to cart button, sold out, and unavailable states here.
theme.productStrings = {
addToCart: "加到購物車",
soldOut: "售完",
unavailable: "停產"
}