$product = {"id":7415987896419,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP X戰機","handle":"iphone-xs-max-mod-nx-printable-pb28","description":null,"published_at":"2024-06-11T16:49:44+08:00","created_at":"2024-05-06T12:37:37+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 XS Max","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":41916245999715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31490921332835,"product_id":7415987896419,"position":9,"created_at":"2024-05-06T12:38:01+08:00","updated_at":"2024-05-06T12:38:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3c7824ef3b8bbaf2bb0f20b7e97bfd1c7cfb13_3fe059d9-cd40-4f76-9a14-7f0d4bd32ef1.webp?v=1714970281","variant_ids":[41916245999715]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB28","featured_media":{"alt":null,"id":23896328405091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3c7824ef3b8bbaf2bb0f20b7e97bfd1c7cfb13_3fe059d9-cd40-4f76-9a14-7f0d4bd32ef1.webp?v=1714970281"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f6eca6e6205f115509a71da826b73dc00eb0342_be3aaa57-3ec8-4bc2-8f4d-dd8df75a8d01.webp?v=1714970260","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccde774f8686c4013da1908a68da8e34750fbfd2_30e2c080-ee9b-452b-8397-51b20fa0158b.webp?v=1714970263","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f09b3d867502fbf281a75f22a22bb785fbe6d7ff_a8acce62-59dd-418a-a17d-33ba61728097.webp?v=1714970265","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443f80474d07cba50d1cfbede62853f28969caee_aa9be3be-c09a-49df-91df-25673697f3cb.webp?v=1714970268","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b37358fdaaad81af0e3402ae7f8606c42506299_32b107f2-1df0-4f5e-b16f-06190b90d679.webp?v=1714970271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c23d98bc109bef699d635a9c2901aeb85e0bb6a_75e5856b-f6b6-4374-995a-e259dcaf853c.webp?v=1714970273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e70d6639c54f122fdeb200c716ef1fee82a5a35d_2a800c3d-4157-4fd6-8790-d56a160c72f9.webp?v=1714970276","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1dd385601b6bedf2b61b92677be75990d54022_41cd4ec6-1bde-438b-9274-2b2f0a46ae11.webp?v=1714970278","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3c7824ef3b8bbaf2bb0f20b7e97bfd1c7cfb13_3fe059d9-cd40-4f76-9a14-7f0d4bd32ef1.webp?v=1714970281","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a4781d8e710ae273856ef23fc17e0f061dc2506_e0ab465e-dc41-4095-bc1f-d997c643714d.webp?v=1714970283"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f6eca6e6205f115509a71da826b73dc00eb0342_be3aaa57-3ec8-4bc2-8f4d-dd8df75a8d01.webp?v=1714970260","options":["color"],"media":[{"alt":null,"id":23896322900067,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f6eca6e6205f115509a71da826b73dc00eb0342_be3aaa57-3ec8-4bc2-8f4d-dd8df75a8d01.webp?v=1714970260"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2f6eca6e6205f115509a71da826b73dc00eb0342_be3aaa57-3ec8-4bc2-8f4d-dd8df75a8d01.webp?v=1714970260","width":2000},{"alt":null,"id":23896323522659,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccde774f8686c4013da1908a68da8e34750fbfd2_30e2c080-ee9b-452b-8397-51b20fa0158b.webp?v=1714970263"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ccde774f8686c4013da1908a68da8e34750fbfd2_30e2c080-ee9b-452b-8397-51b20fa0158b.webp?v=1714970263","width":2000},{"alt":null,"id":23896323948643,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f09b3d867502fbf281a75f22a22bb785fbe6d7ff_a8acce62-59dd-418a-a17d-33ba61728097.webp?v=1714970265"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f09b3d867502fbf281a75f22a22bb785fbe6d7ff_a8acce62-59dd-418a-a17d-33ba61728097.webp?v=1714970265","width":2000},{"alt":null,"id":23896324571235,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443f80474d07cba50d1cfbede62853f28969caee_aa9be3be-c09a-49df-91df-25673697f3cb.webp?v=1714970268"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/443f80474d07cba50d1cfbede62853f28969caee_aa9be3be-c09a-49df-91df-25673697f3cb.webp?v=1714970268","width":2000},{"alt":null,"id":23896324997219,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b37358fdaaad81af0e3402ae7f8606c42506299_32b107f2-1df0-4f5e-b16f-06190b90d679.webp?v=1714970271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b37358fdaaad81af0e3402ae7f8606c42506299_32b107f2-1df0-4f5e-b16f-06190b90d679.webp?v=1714970271","width":2000},{"alt":null,"id":23896326111331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c23d98bc109bef699d635a9c2901aeb85e0bb6a_75e5856b-f6b6-4374-995a-e259dcaf853c.webp?v=1714970273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c23d98bc109bef699d635a9c2901aeb85e0bb6a_75e5856b-f6b6-4374-995a-e259dcaf853c.webp?v=1714970273","width":2000},{"alt":null,"id":23896326504547,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e70d6639c54f122fdeb200c716ef1fee82a5a35d_2a800c3d-4157-4fd6-8790-d56a160c72f9.webp?v=1714970276"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e70d6639c54f122fdeb200c716ef1fee82a5a35d_2a800c3d-4157-4fd6-8790-d56a160c72f9.webp?v=1714970276","width":2000},{"alt":null,"id":23896327127139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1dd385601b6bedf2b61b92677be75990d54022_41cd4ec6-1bde-438b-9274-2b2f0a46ae11.webp?v=1714970278"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2e1dd385601b6bedf2b61b92677be75990d54022_41cd4ec6-1bde-438b-9274-2b2f0a46ae11.webp?v=1714970278","width":2000},{"alt":null,"id":23896328405091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3c7824ef3b8bbaf2bb0f20b7e97bfd1c7cfb13_3fe059d9-cd40-4f76-9a14-7f0d4bd32ef1.webp?v=1714970281"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3c7824ef3b8bbaf2bb0f20b7e97bfd1c7cfb13_3fe059d9-cd40-4f76-9a14-7f0d4bd32ef1.webp?v=1714970281","width":2000},{"alt":null,"id":23896329027683,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a4781d8e710ae273856ef23fc17e0f061dc2506_e0ab465e-dc41-4095-bc1f-d997c643714d.webp?v=1714970283"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0a4781d8e710ae273856ef23fc17e0f061dc2506_e0ab465e-dc41-4095-bc1f-d997c643714d.webp?v=1714970283","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41916245999715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31490921332835,"product_id":7415987896419,"position":9,"created_at":"2024-05-06T12:38:01+08:00","updated_at":"2024-05-06T12:38:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3c7824ef3b8bbaf2bb0f20b7e97bfd1c7cfb13_3fe059d9-cd40-4f76-9a14-7f0d4bd32ef1.webp?v=1714970281","variant_ids":[41916245999715]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB28","featured_media":{"alt":null,"id":23896328405091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3c7824ef3b8bbaf2bb0f20b7e97bfd1c7cfb13_3fe059d9-cd40-4f76-9a14-7f0d4bd32ef1.webp?v=1714970281"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41916245999715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB28","requires_shipping":true,"taxable":true,"featured_image":{"id":31490921332835,"product_id":7415987896419,"position":9,"created_at":"2024-05-06T12:38:01+08:00","updated_at":"2024-05-06T12:38:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3c7824ef3b8bbaf2bb0f20b7e97bfd1c7cfb13_3fe059d9-cd40-4f76-9a14-7f0d4bd32ef1.webp?v=1714970281","variant_ids":[41916245999715]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0108624-PB28","featured_media":{"alt":null,"id":23896328405091,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3c7824ef3b8bbaf2bb0f20b7e97bfd1c7cfb13_3fe059d9-cd40-4f76-9a14-7f0d4bd32ef1.webp?v=1714970281"}},"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: "停產"
}