$product = {"id":7848103149667,"title":"iPhone 12 mini Mod NX (MagSafe 兼容) 嗨小強 It's Your Day","handle":"iphone-12-mini-mod-nx-magsafe-bumper-crossover-design-fv64","description":null,"published_at":"2025-08-07T09:00:23+08:00","created_at":"2025-08-05T09:49:49+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-hijohnnn","device-iPhone 12 Mini","merge","reseller-hijohnnn"],"price":110000,"price_min":110000,"price_max":110000,"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":43563054366819,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-FV64","requires_shipping":true,"taxable":true,"featured_image":{"id":34288108142691,"product_id":7848103149667,"position":3,"created_at":"2025-08-05T09:49:54+08:00","updated_at":"2025-08-05T09:49:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c32c9af370ebc42bc47b759d5eea6dc382e080b6.webp?v=1754358596","variant_ids":[43563054366819]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) 嗨小強 It's Your Day - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-FV64","featured_media":{"alt":null,"id":25889004060771,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c32c9af370ebc42bc47b759d5eea6dc382e080b6.webp?v=1754358596"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/456b0f60ad09ff5f63109c04298e81ecccd22ff4.webp?v=1754358595","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/586881ac6370b9305cf547458d71fdfc5beb181b.webp?v=1754358596","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c32c9af370ebc42bc47b759d5eea6dc382e080b6.webp?v=1754358596","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/254d6f06c5ba8a5650ff32c702e0e28a3c4c2a23.webp?v=1754358597","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cd67c6b1dd5fe8c721e4d812fe11f0dca8d78ae.webp?v=1754358598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9287d3926a46fef8544d267e98457f1bb931326c.webp?v=1754358599","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f4931b1bbc63f6fdd2bd762deb21556435d5f01.webp?v=1754358600","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5aa5599b318395b849cf458a7d1e20c7e5b08dc.webp?v=1754358601","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c8726f26c36a46b237bfefa4a8023b7fb559660.webp?v=1754358602","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a08a32d8fe1c2a296a9581eb4f73905b98eb25a.webp?v=1754358602","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdfbb4dcf69ac4e7b032da7dffec53bfc4038345.webp?v=1754358603"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/456b0f60ad09ff5f63109c04298e81ecccd22ff4.webp?v=1754358595","options":["color"],"media":[{"alt":null,"id":25889003765859,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/456b0f60ad09ff5f63109c04298e81ecccd22ff4.webp?v=1754358595"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/456b0f60ad09ff5f63109c04298e81ecccd22ff4.webp?v=1754358595","width":2000},{"alt":null,"id":25889003929699,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/586881ac6370b9305cf547458d71fdfc5beb181b.webp?v=1754358596"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/586881ac6370b9305cf547458d71fdfc5beb181b.webp?v=1754358596","width":2000},{"alt":null,"id":25889004060771,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c32c9af370ebc42bc47b759d5eea6dc382e080b6.webp?v=1754358596"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c32c9af370ebc42bc47b759d5eea6dc382e080b6.webp?v=1754358596","width":2000},{"alt":null,"id":25889004257379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/254d6f06c5ba8a5650ff32c702e0e28a3c4c2a23.webp?v=1754358597"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/254d6f06c5ba8a5650ff32c702e0e28a3c4c2a23.webp?v=1754358597","width":2000},{"alt":null,"id":25889004388451,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cd67c6b1dd5fe8c721e4d812fe11f0dca8d78ae.webp?v=1754358598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9cd67c6b1dd5fe8c721e4d812fe11f0dca8d78ae.webp?v=1754358598","width":2000},{"alt":null,"id":25889004650595,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9287d3926a46fef8544d267e98457f1bb931326c.webp?v=1754358599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9287d3926a46fef8544d267e98457f1bb931326c.webp?v=1754358599","width":2000},{"alt":null,"id":25889004879971,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f4931b1bbc63f6fdd2bd762deb21556435d5f01.webp?v=1754358600"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f4931b1bbc63f6fdd2bd762deb21556435d5f01.webp?v=1754358600","width":2000},{"alt":null,"id":25889005043811,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5aa5599b318395b849cf458a7d1e20c7e5b08dc.webp?v=1754358601"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5aa5599b318395b849cf458a7d1e20c7e5b08dc.webp?v=1754358601","width":2000},{"alt":null,"id":25889005207651,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c8726f26c36a46b237bfefa4a8023b7fb559660.webp?v=1754358602"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c8726f26c36a46b237bfefa4a8023b7fb559660.webp?v=1754358602","width":2000},{"alt":null,"id":25889005502563,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a08a32d8fe1c2a296a9581eb4f73905b98eb25a.webp?v=1754358602"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a08a32d8fe1c2a296a9581eb4f73905b98eb25a.webp?v=1754358602","width":2000},{"alt":null,"id":25889005797475,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdfbb4dcf69ac4e7b032da7dffec53bfc4038345.webp?v=1754358603"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bdfbb4dcf69ac4e7b032da7dffec53bfc4038345.webp?v=1754358603","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43563054366819,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-FV64","requires_shipping":true,"taxable":true,"featured_image":{"id":34288108142691,"product_id":7848103149667,"position":3,"created_at":"2025-08-05T09:49:54+08:00","updated_at":"2025-08-05T09:49:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c32c9af370ebc42bc47b759d5eea6dc382e080b6.webp?v=1754358596","variant_ids":[43563054366819]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) 嗨小強 It's Your Day - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-FV64","featured_media":{"alt":null,"id":25889004060771,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c32c9af370ebc42bc47b759d5eea6dc382e080b6.webp?v=1754358596"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43563054366819,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118424-FV64","requires_shipping":true,"taxable":true,"featured_image":{"id":34288108142691,"product_id":7848103149667,"position":3,"created_at":"2025-08-05T09:49:54+08:00","updated_at":"2025-08-05T09:49:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c32c9af370ebc42bc47b759d5eea6dc382e080b6.webp?v=1754358596","variant_ids":[43563054366819]},"available":true,"name":"iPhone 12 mini Mod NX (MagSafe 兼容) 嗨小強 It's Your Day - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-FV64","featured_media":{"alt":null,"id":25889004060771,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c32c9af370ebc42bc47b759d5eea6dc382e080b6.webp?v=1754358596"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$brand_handle = null;
$type = "";
var sellingStatus
// 只有設計款(SKU 含 '-')才需要合圖
if ($isMerge && $defaultVariant.sku.includes('-')) {
$(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: "停產"
}