$product = {"id":7408555819107,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 史迪奇 - 夏威夷系列-每天搞怪","handle":"iphone-12-pro-max-mod-nx-printable-yf06","description":null,"published_at":"2024-06-11T16:40:35+08:00","created_at":"2024-05-03T15:49:56+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-stitch","Top50","type-Mod NX Printable"],"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":41886827741283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472582492259,"product_id":7408555819107,"position":7,"created_at":"2024-05-03T15:50:12+08:00","updated_at":"2024-05-03T15:50:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/570bdf22fb9204906e1d1415eef38f1f80697bc8_d590938b-29f7-45fa-9720-cf3997b03ca3.webp?v=1714722612","variant_ids":[41886827741283]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 史迪奇 - 夏威夷系列-每天搞怪 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-YF06","featured_media":{"alt":null,"id":23877499846755,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/570bdf22fb9204906e1d1415eef38f1f80697bc8_d590938b-29f7-45fa-9720-cf3997b03ca3.webp?v=1714722612"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fb2b1f4db8643002c6d59379b3b55f571638599_93c5444a-152d-4f3b-be4a-63c80b732920.webp?v=1714722598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cf357caf0f6aa18c70bbbd7fccc30e6b029888c_eec54459-ae3c-449d-9d11-b8543dc00b87.webp?v=1714722600","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2e91d5890b06ce9e0c09183944b174b5fe073c_1d3accfc-ff80-4c20-aab4-41d1a418c3b3.webp?v=1714722603","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee477eaf0dc2123bf547af0a1bee092e729ca187_eaedf9a9-872a-4261-af17-33922b2a5051.webp?v=1714722605","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cd5cc33ca9e9f5acb7dfd6a20dec69b2fc915f9_8a217e8f-f436-4d72-b526-a38a4e4306c5.webp?v=1714722607","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc560ab652f29261fc762d5e31806d322d92e93e_f2a532bd-ca4b-4036-99dd-06e5285e1154.webp?v=1714722609","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/570bdf22fb9204906e1d1415eef38f1f80697bc8_d590938b-29f7-45fa-9720-cf3997b03ca3.webp?v=1714722612","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be18127c9935fc4913b6d1327b3c71a3579641e7_9e8a74d4-df2e-4f2d-87ec-5647c86fccce.webp?v=1714722614","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06e5e27e6692ce769041e4ac30248d7913f731af_36c9008a-0e46-4a89-b1c9-946141df3f96.webp?v=1714722616","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecff38928f8f929c4abb2105d22b9f7eadc78ee2_df5e8c82-9b56-42dd-beb0-f6dd7049b790.webp?v=1714722619"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fb2b1f4db8643002c6d59379b3b55f571638599_93c5444a-152d-4f3b-be4a-63c80b732920.webp?v=1714722598","options":["color"],"media":[{"alt":null,"id":23877497028707,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fb2b1f4db8643002c6d59379b3b55f571638599_93c5444a-152d-4f3b-be4a-63c80b732920.webp?v=1714722598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fb2b1f4db8643002c6d59379b3b55f571638599_93c5444a-152d-4f3b-be4a-63c80b732920.webp?v=1714722598","width":2000},{"alt":null,"id":23877497487459,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cf357caf0f6aa18c70bbbd7fccc30e6b029888c_eec54459-ae3c-449d-9d11-b8543dc00b87.webp?v=1714722600"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cf357caf0f6aa18c70bbbd7fccc30e6b029888c_eec54459-ae3c-449d-9d11-b8543dc00b87.webp?v=1714722600","width":2000},{"alt":null,"id":23877497978979,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2e91d5890b06ce9e0c09183944b174b5fe073c_1d3accfc-ff80-4c20-aab4-41d1a418c3b3.webp?v=1714722603"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b2e91d5890b06ce9e0c09183944b174b5fe073c_1d3accfc-ff80-4c20-aab4-41d1a418c3b3.webp?v=1714722603","width":2000},{"alt":null,"id":23877498470499,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee477eaf0dc2123bf547af0a1bee092e729ca187_eaedf9a9-872a-4261-af17-33922b2a5051.webp?v=1714722605"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee477eaf0dc2123bf547af0a1bee092e729ca187_eaedf9a9-872a-4261-af17-33922b2a5051.webp?v=1714722605","width":2000},{"alt":null,"id":23877498798179,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cd5cc33ca9e9f5acb7dfd6a20dec69b2fc915f9_8a217e8f-f436-4d72-b526-a38a4e4306c5.webp?v=1714722607"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6cd5cc33ca9e9f5acb7dfd6a20dec69b2fc915f9_8a217e8f-f436-4d72-b526-a38a4e4306c5.webp?v=1714722607","width":2000},{"alt":null,"id":23877499256931,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc560ab652f29261fc762d5e31806d322d92e93e_f2a532bd-ca4b-4036-99dd-06e5285e1154.webp?v=1714722609"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dc560ab652f29261fc762d5e31806d322d92e93e_f2a532bd-ca4b-4036-99dd-06e5285e1154.webp?v=1714722609","width":2000},{"alt":null,"id":23877499846755,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/570bdf22fb9204906e1d1415eef38f1f80697bc8_d590938b-29f7-45fa-9720-cf3997b03ca3.webp?v=1714722612"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/570bdf22fb9204906e1d1415eef38f1f80697bc8_d590938b-29f7-45fa-9720-cf3997b03ca3.webp?v=1714722612","width":2000},{"alt":null,"id":23877500534883,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be18127c9935fc4913b6d1327b3c71a3579641e7_9e8a74d4-df2e-4f2d-87ec-5647c86fccce.webp?v=1714722614"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be18127c9935fc4913b6d1327b3c71a3579641e7_9e8a74d4-df2e-4f2d-87ec-5647c86fccce.webp?v=1714722614","width":2000},{"alt":null,"id":23877500829795,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06e5e27e6692ce769041e4ac30248d7913f731af_36c9008a-0e46-4a89-b1c9-946141df3f96.webp?v=1714722616"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06e5e27e6692ce769041e4ac30248d7913f731af_36c9008a-0e46-4a89-b1c9-946141df3f96.webp?v=1714722616","width":2000},{"alt":null,"id":23877501386851,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecff38928f8f929c4abb2105d22b9f7eadc78ee2_df5e8c82-9b56-42dd-beb0-f6dd7049b790.webp?v=1714722619"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecff38928f8f929c4abb2105d22b9f7eadc78ee2_df5e8c82-9b56-42dd-beb0-f6dd7049b790.webp?v=1714722619","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41886827741283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472582492259,"product_id":7408555819107,"position":7,"created_at":"2024-05-03T15:50:12+08:00","updated_at":"2024-05-03T15:50:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/570bdf22fb9204906e1d1415eef38f1f80697bc8_d590938b-29f7-45fa-9720-cf3997b03ca3.webp?v=1714722612","variant_ids":[41886827741283]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 史迪奇 - 夏威夷系列-每天搞怪 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-YF06","featured_media":{"alt":null,"id":23877499846755,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/570bdf22fb9204906e1d1415eef38f1f80697bc8_d590938b-29f7-45fa-9720-cf3997b03ca3.webp?v=1714722612"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41886827741283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YF06","requires_shipping":true,"taxable":true,"featured_image":{"id":31472582492259,"product_id":7408555819107,"position":7,"created_at":"2024-05-03T15:50:12+08:00","updated_at":"2024-05-03T15:50:12+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/570bdf22fb9204906e1d1415eef38f1f80697bc8_d590938b-29f7-45fa-9720-cf3997b03ca3.webp?v=1714722612","variant_ids":[41886827741283]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 史迪奇 - 夏威夷系列-每天搞怪 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-YF06","featured_media":{"alt":null,"id":23877499846755,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/570bdf22fb9204906e1d1415eef38f1f80697bc8_d590938b-29f7-45fa-9720-cf3997b03ca3.webp?v=1714722612"}},"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: "停產"
}