$product = {"id":7408446275683,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 史迪奇 - 經典系列-史迪奇大臉款","handle":"iphone-12-pro-max-mod-nx-printable-yf01","description":null,"published_at":"2024-06-11T16:37:27+08:00","created_at":"2024-05-03T15:28:01+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":41885565976675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472298721379,"product_id":7408446275683,"position":2,"created_at":"2024-05-03T15:28:06+08:00","updated_at":"2024-05-03T15:28:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a9c68759e007e1d0bffe2cd63b0cd40dd5c001_21b32f4f-e393-4222-8ad9-afeb0ed65d45.webp?v=1714721286","variant_ids":[41885565976675]},"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-YF01","featured_media":{"alt":null,"id":23877215092835,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a9c68759e007e1d0bffe2cd63b0cd40dd5c001_21b32f4f-e393-4222-8ad9-afeb0ed65d45.webp?v=1714721286"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8469fb552d5f721a5fdd85f762091436743d38cb_336f2558-5f8b-4b7c-85b5-224b52cd7a84.webp?v=1714721284","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a9c68759e007e1d0bffe2cd63b0cd40dd5c001_21b32f4f-e393-4222-8ad9-afeb0ed65d45.webp?v=1714721286","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a00afee620bc254d816c50e283d663cb120dd3b0_a4734925-9bdb-430e-9b18-4041709250bd.webp?v=1714721289","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6152a5122f4057b43c0f8ae76b37b9542087ef41_3b7dbffb-d08c-48b4-be3b-beb4feb73ecc.webp?v=1714721292","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a5faa9cfd1c1a8ca73941c8d73fc74d006dc2a6_8a7a22ed-c81a-4db8-8806-dcf1d8e67c4c.webp?v=1714721294","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6481310357171df90870b0602e24e53b59b5957_657e7392-7c30-4147-badd-a8427ab9dd0a.webp?v=1714721296","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf3cf4b1d96a6c4020693d99fc3f7baec302881a_b7232a78-5216-4baf-8c2e-15c86cc7e0aa.webp?v=1714721298","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3c780fced0ea6b496dac9c04afcd07b09ff098d_413fb05d-21d7-4b6a-9369-e30e6b5d874c.webp?v=1714721301","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0205eceb5424196257576f070357eb764f96970d_ce5b91ca-8d39-48c3-bf8b-d26537bcb10a.webp?v=1714721303","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcbb06c06e3aac69ecc2796fdfee956e8282b87b_a07276dd-6724-4c0a-9513-dca625e82acb.webp?v=1714721305"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8469fb552d5f721a5fdd85f762091436743d38cb_336f2558-5f8b-4b7c-85b5-224b52cd7a84.webp?v=1714721284","options":["color"],"media":[{"alt":null,"id":23877214535779,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8469fb552d5f721a5fdd85f762091436743d38cb_336f2558-5f8b-4b7c-85b5-224b52cd7a84.webp?v=1714721284"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8469fb552d5f721a5fdd85f762091436743d38cb_336f2558-5f8b-4b7c-85b5-224b52cd7a84.webp?v=1714721284","width":2000},{"alt":null,"id":23877215092835,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a9c68759e007e1d0bffe2cd63b0cd40dd5c001_21b32f4f-e393-4222-8ad9-afeb0ed65d45.webp?v=1714721286"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a9c68759e007e1d0bffe2cd63b0cd40dd5c001_21b32f4f-e393-4222-8ad9-afeb0ed65d45.webp?v=1714721286","width":2000},{"alt":null,"id":23877215715427,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a00afee620bc254d816c50e283d663cb120dd3b0_a4734925-9bdb-430e-9b18-4041709250bd.webp?v=1714721289"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a00afee620bc254d816c50e283d663cb120dd3b0_a4734925-9bdb-430e-9b18-4041709250bd.webp?v=1714721289","width":2000},{"alt":null,"id":23877216272483,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6152a5122f4057b43c0f8ae76b37b9542087ef41_3b7dbffb-d08c-48b4-be3b-beb4feb73ecc.webp?v=1714721292"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6152a5122f4057b43c0f8ae76b37b9542087ef41_3b7dbffb-d08c-48b4-be3b-beb4feb73ecc.webp?v=1714721292","width":2000},{"alt":null,"id":23877216731235,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a5faa9cfd1c1a8ca73941c8d73fc74d006dc2a6_8a7a22ed-c81a-4db8-8806-dcf1d8e67c4c.webp?v=1714721294"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a5faa9cfd1c1a8ca73941c8d73fc74d006dc2a6_8a7a22ed-c81a-4db8-8806-dcf1d8e67c4c.webp?v=1714721294","width":2000},{"alt":null,"id":23877217321059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6481310357171df90870b0602e24e53b59b5957_657e7392-7c30-4147-badd-a8427ab9dd0a.webp?v=1714721296"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6481310357171df90870b0602e24e53b59b5957_657e7392-7c30-4147-badd-a8427ab9dd0a.webp?v=1714721296","width":2000},{"alt":null,"id":23877217845347,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf3cf4b1d96a6c4020693d99fc3f7baec302881a_b7232a78-5216-4baf-8c2e-15c86cc7e0aa.webp?v=1714721298"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf3cf4b1d96a6c4020693d99fc3f7baec302881a_b7232a78-5216-4baf-8c2e-15c86cc7e0aa.webp?v=1714721298","width":2000},{"alt":null,"id":23877218205795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3c780fced0ea6b496dac9c04afcd07b09ff098d_413fb05d-21d7-4b6a-9369-e30e6b5d874c.webp?v=1714721301"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b3c780fced0ea6b496dac9c04afcd07b09ff098d_413fb05d-21d7-4b6a-9369-e30e6b5d874c.webp?v=1714721301","width":2000},{"alt":null,"id":23877218631779,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0205eceb5424196257576f070357eb764f96970d_ce5b91ca-8d39-48c3-bf8b-d26537bcb10a.webp?v=1714721303"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0205eceb5424196257576f070357eb764f96970d_ce5b91ca-8d39-48c3-bf8b-d26537bcb10a.webp?v=1714721303","width":2000},{"alt":null,"id":23877219123299,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcbb06c06e3aac69ecc2796fdfee956e8282b87b_a07276dd-6724-4c0a-9513-dca625e82acb.webp?v=1714721305"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dcbb06c06e3aac69ecc2796fdfee956e8282b87b_a07276dd-6724-4c0a-9513-dca625e82acb.webp?v=1714721305","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885565976675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472298721379,"product_id":7408446275683,"position":2,"created_at":"2024-05-03T15:28:06+08:00","updated_at":"2024-05-03T15:28:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a9c68759e007e1d0bffe2cd63b0cd40dd5c001_21b32f4f-e393-4222-8ad9-afeb0ed65d45.webp?v=1714721286","variant_ids":[41885565976675]},"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-YF01","featured_media":{"alt":null,"id":23877215092835,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a9c68759e007e1d0bffe2cd63b0cd40dd5c001_21b32f4f-e393-4222-8ad9-afeb0ed65d45.webp?v=1714721286"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885565976675,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-YF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472298721379,"product_id":7408446275683,"position":2,"created_at":"2024-05-03T15:28:06+08:00","updated_at":"2024-05-03T15:28:06+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a9c68759e007e1d0bffe2cd63b0cd40dd5c001_21b32f4f-e393-4222-8ad9-afeb0ed65d45.webp?v=1714721286","variant_ids":[41885565976675]},"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-YF01","featured_media":{"alt":null,"id":23877215092835,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98a9c68759e007e1d0bffe2cd63b0cd40dd5c001_21b32f4f-e393-4222-8ad9-afeb0ed65d45.webp?v=1714721286"}},"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: "停產"
}