$product = {"id":7408398368867,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機","handle":"iphone-12-mini-mod-nx-printable-pb28","description":null,"published_at":"2024-06-11T16:36:09+08:00","created_at":"2024-05-03T15:18:41+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","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":41885032448099,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31472163029091,"product_id":7408398368867,"position":11,"created_at":"2024-05-03T15:19:08+08:00","updated_at":"2024-05-03T15:19:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e81d2be9d27d5dadb8b991f1793b6f25caf2f42_96a12c60-6c28-4254-82a1-02bb1ae50fb4.webp?v=1714720748","variant_ids":[41885032448099]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 - 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":"NPB0118424-PB28","featured_media":{"alt":null,"id":23877078712419,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e81d2be9d27d5dadb8b991f1793b6f25caf2f42_96a12c60-6c28-4254-82a1-02bb1ae50fb4.webp?v=1714720748"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d0b75c1f02edb7a0e2cdb8b1c820bc9a1696d6_7a437d19-9ddc-4860-8a5b-7a4244b6121b.webp?v=1714720724","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc2e5d166f90e9b49ff69d26497e46a54e893aa_8fb35877-5547-435d-840f-4475ddeaf739.webp?v=1714720726","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfe7ead271ab7779d1130b04e69ab9a97306245_0183215c-d8ec-4e79-a04b-8f1925c6f386.webp?v=1714720729","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37bb40dd2394c21b74476790ddde5e70449a2687_1319fc7e-c06e-4ee8-84ae-c8376bb8283a.webp?v=1714720731","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c7f0b9af40c79f0863a5f4a930ea20d23fe9b5_d5811c71-2831-4e18-94a7-d6423220fc9e.webp?v=1714720733","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8e05fbeeb7f8003aeffaa986e94d29df58a3eb3_622af913-00b4-44b6-9976-706a757db8a7.webp?v=1714720736","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7de6f2f27bbe5cf7a6ae0117214921d7c3483d70_7f744bd4-f9e4-4e3d-803c-94e8b1a6866f.webp?v=1714720738","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4cadff07ce1fd62a536466cf853da74a67b843d_121335bd-d476-48a1-b672-1e1a6ffc7d56.webp?v=1714720741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d21c5b1cb1e5e870a3d47c4c9a0f0b9bdfca105c_50f1f932-5ed0-41b3-996a-43eab6f01cdc.webp?v=1714720743","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71976967b04f334df8b2461777c7be41348b8a3d_6b905196-24e7-4cac-a91c-f5521b55dc6b.webp?v=1714720745","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e81d2be9d27d5dadb8b991f1793b6f25caf2f42_96a12c60-6c28-4254-82a1-02bb1ae50fb4.webp?v=1714720748"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d0b75c1f02edb7a0e2cdb8b1c820bc9a1696d6_7a437d19-9ddc-4860-8a5b-7a4244b6121b.webp?v=1714720724","options":["color"],"media":[{"alt":null,"id":23877072486499,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d0b75c1f02edb7a0e2cdb8b1c820bc9a1696d6_7a437d19-9ddc-4860-8a5b-7a4244b6121b.webp?v=1714720724"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86d0b75c1f02edb7a0e2cdb8b1c820bc9a1696d6_7a437d19-9ddc-4860-8a5b-7a4244b6121b.webp?v=1714720724","width":2000},{"alt":null,"id":23877072945251,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc2e5d166f90e9b49ff69d26497e46a54e893aa_8fb35877-5547-435d-840f-4475ddeaf739.webp?v=1714720726"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afc2e5d166f90e9b49ff69d26497e46a54e893aa_8fb35877-5547-435d-840f-4475ddeaf739.webp?v=1714720726","width":2000},{"alt":null,"id":23877073535075,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfe7ead271ab7779d1130b04e69ab9a97306245_0183215c-d8ec-4e79-a04b-8f1925c6f386.webp?v=1714720729"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5cfe7ead271ab7779d1130b04e69ab9a97306245_0183215c-d8ec-4e79-a04b-8f1925c6f386.webp?v=1714720729","width":2000},{"alt":null,"id":23877074157667,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37bb40dd2394c21b74476790ddde5e70449a2687_1319fc7e-c06e-4ee8-84ae-c8376bb8283a.webp?v=1714720731"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37bb40dd2394c21b74476790ddde5e70449a2687_1319fc7e-c06e-4ee8-84ae-c8376bb8283a.webp?v=1714720731","width":2000},{"alt":null,"id":23877074747491,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c7f0b9af40c79f0863a5f4a930ea20d23fe9b5_d5811c71-2831-4e18-94a7-d6423220fc9e.webp?v=1714720733"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/79c7f0b9af40c79f0863a5f4a930ea20d23fe9b5_d5811c71-2831-4e18-94a7-d6423220fc9e.webp?v=1714720733","width":2000},{"alt":null,"id":23877075206243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8e05fbeeb7f8003aeffaa986e94d29df58a3eb3_622af913-00b4-44b6-9976-706a757db8a7.webp?v=1714720736"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b8e05fbeeb7f8003aeffaa986e94d29df58a3eb3_622af913-00b4-44b6-9976-706a757db8a7.webp?v=1714720736","width":2000},{"alt":null,"id":23877075828835,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7de6f2f27bbe5cf7a6ae0117214921d7c3483d70_7f744bd4-f9e4-4e3d-803c-94e8b1a6866f.webp?v=1714720738"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7de6f2f27bbe5cf7a6ae0117214921d7c3483d70_7f744bd4-f9e4-4e3d-803c-94e8b1a6866f.webp?v=1714720738","width":2000},{"alt":null,"id":23877076353123,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4cadff07ce1fd62a536466cf853da74a67b843d_121335bd-d476-48a1-b672-1e1a6ffc7d56.webp?v=1714720741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e4cadff07ce1fd62a536466cf853da74a67b843d_121335bd-d476-48a1-b672-1e1a6ffc7d56.webp?v=1714720741","width":2000},{"alt":null,"id":23877077368931,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d21c5b1cb1e5e870a3d47c4c9a0f0b9bdfca105c_50f1f932-5ed0-41b3-996a-43eab6f01cdc.webp?v=1714720743"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d21c5b1cb1e5e870a3d47c4c9a0f0b9bdfca105c_50f1f932-5ed0-41b3-996a-43eab6f01cdc.webp?v=1714720743","width":2000},{"alt":null,"id":23877077958755,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71976967b04f334df8b2461777c7be41348b8a3d_6b905196-24e7-4cac-a91c-f5521b55dc6b.webp?v=1714720745"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71976967b04f334df8b2461777c7be41348b8a3d_6b905196-24e7-4cac-a91c-f5521b55dc6b.webp?v=1714720745","width":2000},{"alt":null,"id":23877078712419,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e81d2be9d27d5dadb8b991f1793b6f25caf2f42_96a12c60-6c28-4254-82a1-02bb1ae50fb4.webp?v=1714720748"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e81d2be9d27d5dadb8b991f1793b6f25caf2f42_96a12c60-6c28-4254-82a1-02bb1ae50fb4.webp?v=1714720748","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885032448099,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31472163029091,"product_id":7408398368867,"position":11,"created_at":"2024-05-03T15:19:08+08:00","updated_at":"2024-05-03T15:19:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e81d2be9d27d5dadb8b991f1793b6f25caf2f42_96a12c60-6c28-4254-82a1-02bb1ae50fb4.webp?v=1714720748","variant_ids":[41885032448099]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 - 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":"NPB0118424-PB28","featured_media":{"alt":null,"id":23877078712419,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e81d2be9d27d5dadb8b991f1793b6f25caf2f42_96a12c60-6c28-4254-82a1-02bb1ae50fb4.webp?v=1714720748"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885032448099,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31472163029091,"product_id":7408398368867,"position":11,"created_at":"2024-05-03T15:19:08+08:00","updated_at":"2024-05-03T15:19:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e81d2be9d27d5dadb8b991f1793b6f25caf2f42_96a12c60-6c28-4254-82a1-02bb1ae50fb4.webp?v=1714720748","variant_ids":[41885032448099]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機 - 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":"NPB0118424-PB28","featured_media":{"alt":null,"id":23877078712419,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e81d2be9d27d5dadb8b991f1793b6f25caf2f42_96a12c60-6c28-4254-82a1-02bb1ae50fb4.webp?v=1714720748"}},"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: "停產"
}