$product = {"id":7415023763555,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb82","description":null,"published_at":"2024-06-11T17:55:55+08:00","created_at":"2024-05-05T20:08:27+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"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":41911053189219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB82","requires_shipping":true,"taxable":true,"featured_image":{"id":31487953043555,"product_id":7415023763555,"position":1,"created_at":"2024-05-05T20:08:30+08:00","updated_at":"2024-05-05T20:08:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0544a2bd2446882a08bcaf135de8c073d91aafd_23b99906-d027-404e-92fe-e402222b0a07.webp?v=1714910910","variant_ids":[41911053189219]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB82","featured_media":{"alt":null,"id":23893297266787,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0544a2bd2446882a08bcaf135de8c073d91aafd_23b99906-d027-404e-92fe-e402222b0a07.webp?v=1714910910"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0544a2bd2446882a08bcaf135de8c073d91aafd_23b99906-d027-404e-92fe-e402222b0a07.webp?v=1714910910","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e07cd833b41b3df1285c94d3b010cfd072da02_b6de860c-f565-4fa1-96f2-35ba8697f8d0.webp?v=1714910912","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b6144b2c5f46eeb98bdd47c67be48c66d6edc6d_c4719741-3970-403c-8359-c4741b742f4d.webp?v=1714910914","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be149a2c228b341e36a2c946d17c8f3af2f34842_d3a34260-8c32-421d-90e4-7786dc7c4b92.webp?v=1714910917","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dedc51f7efc83169603330940a80d67f42c168ac_b2b764f8-c3c8-4a81-99fc-faea2435f0c2.webp?v=1714910919","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee251bbd32f623b0f991bd596c81846062cc46dd_ec29ed67-fb95-46e3-b2a3-c4e1748ee294.webp?v=1714910922","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee01bd9ffd253807d64dec2334f417335819dd7e_1bb9ce5c-5ffd-4f1c-8956-b94d563740be.webp?v=1714910925","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a07bf0b515bae8ffbbb1f40f869dfba217f74ce6_f58f9aaa-81e5-43d1-bc3f-0cda38e85d79.webp?v=1714910927","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09c3419670c9d49748b4a7dabae9c6d207be0d39_6846e966-3210-4fe3-b7eb-8b3a8a11c7a1.webp?v=1714910930","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ebf65dc408dabc798249857319cc48c8747eb14_d4dc38dc-552f-48cb-bf7e-87dfe0111034.webp?v=1714910932","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f48d38bdcd1f58dd4920c6ba7702ea0593e255a9_149832de-9ee8-4034-b7dc-8c1b39c850e4.webp?v=1714910935"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0544a2bd2446882a08bcaf135de8c073d91aafd_23b99906-d027-404e-92fe-e402222b0a07.webp?v=1714910910","options":["color"],"media":[{"alt":null,"id":23893297266787,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0544a2bd2446882a08bcaf135de8c073d91aafd_23b99906-d027-404e-92fe-e402222b0a07.webp?v=1714910910"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0544a2bd2446882a08bcaf135de8c073d91aafd_23b99906-d027-404e-92fe-e402222b0a07.webp?v=1714910910","width":2000},{"alt":null,"id":23893297725539,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e07cd833b41b3df1285c94d3b010cfd072da02_b6de860c-f565-4fa1-96f2-35ba8697f8d0.webp?v=1714910912"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23e07cd833b41b3df1285c94d3b010cfd072da02_b6de860c-f565-4fa1-96f2-35ba8697f8d0.webp?v=1714910912","width":2000},{"alt":null,"id":23893298446435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b6144b2c5f46eeb98bdd47c67be48c66d6edc6d_c4719741-3970-403c-8359-c4741b742f4d.webp?v=1714910914"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b6144b2c5f46eeb98bdd47c67be48c66d6edc6d_c4719741-3970-403c-8359-c4741b742f4d.webp?v=1714910914","width":2000},{"alt":null,"id":23893298905187,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be149a2c228b341e36a2c946d17c8f3af2f34842_d3a34260-8c32-421d-90e4-7786dc7c4b92.webp?v=1714910917"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be149a2c228b341e36a2c946d17c8f3af2f34842_d3a34260-8c32-421d-90e4-7786dc7c4b92.webp?v=1714910917","width":2000},{"alt":null,"id":23893299626083,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dedc51f7efc83169603330940a80d67f42c168ac_b2b764f8-c3c8-4a81-99fc-faea2435f0c2.webp?v=1714910919"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dedc51f7efc83169603330940a80d67f42c168ac_b2b764f8-c3c8-4a81-99fc-faea2435f0c2.webp?v=1714910919","width":2000},{"alt":null,"id":23893300084835,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee251bbd32f623b0f991bd596c81846062cc46dd_ec29ed67-fb95-46e3-b2a3-c4e1748ee294.webp?v=1714910922"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee251bbd32f623b0f991bd596c81846062cc46dd_ec29ed67-fb95-46e3-b2a3-c4e1748ee294.webp?v=1714910922","width":2000},{"alt":null,"id":23893300936803,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee01bd9ffd253807d64dec2334f417335819dd7e_1bb9ce5c-5ffd-4f1c-8956-b94d563740be.webp?v=1714910925"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee01bd9ffd253807d64dec2334f417335819dd7e_1bb9ce5c-5ffd-4f1c-8956-b94d563740be.webp?v=1714910925","width":2000},{"alt":null,"id":23893301362787,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a07bf0b515bae8ffbbb1f40f869dfba217f74ce6_f58f9aaa-81e5-43d1-bc3f-0cda38e85d79.webp?v=1714910927"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a07bf0b515bae8ffbbb1f40f869dfba217f74ce6_f58f9aaa-81e5-43d1-bc3f-0cda38e85d79.webp?v=1714910927","width":2000},{"alt":null,"id":23893301952611,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09c3419670c9d49748b4a7dabae9c6d207be0d39_6846e966-3210-4fe3-b7eb-8b3a8a11c7a1.webp?v=1714910930"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09c3419670c9d49748b4a7dabae9c6d207be0d39_6846e966-3210-4fe3-b7eb-8b3a8a11c7a1.webp?v=1714910930","width":2000},{"alt":null,"id":23893302706275,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ebf65dc408dabc798249857319cc48c8747eb14_d4dc38dc-552f-48cb-bf7e-87dfe0111034.webp?v=1714910932"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ebf65dc408dabc798249857319cc48c8747eb14_d4dc38dc-552f-48cb-bf7e-87dfe0111034.webp?v=1714910932","width":2000},{"alt":null,"id":23893303459939,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f48d38bdcd1f58dd4920c6ba7702ea0593e255a9_149832de-9ee8-4034-b7dc-8c1b39c850e4.webp?v=1714910935"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f48d38bdcd1f58dd4920c6ba7702ea0593e255a9_149832de-9ee8-4034-b7dc-8c1b39c850e4.webp?v=1714910935","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911053189219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB82","requires_shipping":true,"taxable":true,"featured_image":{"id":31487953043555,"product_id":7415023763555,"position":1,"created_at":"2024-05-05T20:08:30+08:00","updated_at":"2024-05-05T20:08:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0544a2bd2446882a08bcaf135de8c073d91aafd_23b99906-d027-404e-92fe-e402222b0a07.webp?v=1714910910","variant_ids":[41911053189219]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB82","featured_media":{"alt":null,"id":23893297266787,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0544a2bd2446882a08bcaf135de8c073d91aafd_23b99906-d027-404e-92fe-e402222b0a07.webp?v=1714910910"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911053189219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB82","requires_shipping":true,"taxable":true,"featured_image":{"id":31487953043555,"product_id":7415023763555,"position":1,"created_at":"2024-05-05T20:08:30+08:00","updated_at":"2024-05-05T20:08:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0544a2bd2446882a08bcaf135de8c073d91aafd_23b99906-d027-404e-92fe-e402222b0a07.webp?v=1714910910","variant_ids":[41911053189219]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118424-PB82","featured_media":{"alt":null,"id":23893297266787,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0544a2bd2446882a08bcaf135de8c073d91aafd_23b99906-d027-404e-92fe-e402222b0a07.webp?v=1714910910"}},"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: "停產"
}