$product = {"id":7416204230755,"title":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-黑","handle":"iphone-x-mod-nx-printable-pb09","description":null,"published_at":"2024-06-11T16:53:15+08:00","created_at":"2024-05-06T14:10:16+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 X","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":41917998399587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-PB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31491636527203,"product_id":7416204230755,"position":7,"created_at":"2024-05-06T14:10:34+08:00","updated_at":"2024-05-06T14:10:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b7897eea0827f60a61dd9e38f0754b6cabfe63_b449d2e7-2eb8-48f6-a224-0ecf58b20892.webp?v=1714975834","variant_ids":[41917998399587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-黑 - 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":"NPB0106424-PB09","featured_media":{"alt":null,"id":23897048547427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b7897eea0827f60a61dd9e38f0754b6cabfe63_b449d2e7-2eb8-48f6-a224-0ecf58b20892.webp?v=1714975834"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457b1334a287c91e2fd25f1fd6c1040996ecaa2d_b53e24fb-8317-4359-b42a-bcc3b834290e.webp?v=1714975819","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0175abbdeba65d505e21d67edbf8250e5414c9cc_f1d02a91-dc54-4fb5-9e65-0f23aca4e57c.webp?v=1714975822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8048c66dc626a5c78e14826161e8815f57333a2e_8c2278da-ed5a-4300-9d2f-25b796eb18a2.webp?v=1714975824","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10475195f85c16715ad20267aa9b85c82f602090_fcf5bb44-2bf3-48e3-ae8e-74b263cce58e.webp?v=1714975826","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4261cabf43a553013a592367482c90c6c9d78767_f765d253-f193-47f6-9553-9f3033876d76.webp?v=1714975829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98788b2542ed3e2f9d82613bd861a39b20efd914_7dcd5d4f-0282-4155-a6f4-826aa23ed54f.webp?v=1714975832","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b7897eea0827f60a61dd9e38f0754b6cabfe63_b449d2e7-2eb8-48f6-a224-0ecf58b20892.webp?v=1714975834","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61300329a5c2c118f4362b383dbc3422d93ce8ac_13453378-4010-4a88-b068-08725d5f046d.webp?v=1714975837","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0b99ad13df0cc6fadf4e2afd5b16900643e613d_1bf4fb26-607e-4afd-826b-ecc29cf70fb3.webp?v=1714975839","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef5eef074bc2c214ec98d0ac5b75786adef10c2c_d5af7844-f94f-4262-94c1-aa7e1ffdb207.webp?v=1714975841"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457b1334a287c91e2fd25f1fd6c1040996ecaa2d_b53e24fb-8317-4359-b42a-bcc3b834290e.webp?v=1714975819","options":["color"],"media":[{"alt":null,"id":23897045205091,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457b1334a287c91e2fd25f1fd6c1040996ecaa2d_b53e24fb-8317-4359-b42a-bcc3b834290e.webp?v=1714975819"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/457b1334a287c91e2fd25f1fd6c1040996ecaa2d_b53e24fb-8317-4359-b42a-bcc3b834290e.webp?v=1714975819","width":2000},{"alt":null,"id":23897045925987,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0175abbdeba65d505e21d67edbf8250e5414c9cc_f1d02a91-dc54-4fb5-9e65-0f23aca4e57c.webp?v=1714975822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0175abbdeba65d505e21d67edbf8250e5414c9cc_f1d02a91-dc54-4fb5-9e65-0f23aca4e57c.webp?v=1714975822","width":2000},{"alt":null,"id":23897046351971,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8048c66dc626a5c78e14826161e8815f57333a2e_8c2278da-ed5a-4300-9d2f-25b796eb18a2.webp?v=1714975824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8048c66dc626a5c78e14826161e8815f57333a2e_8c2278da-ed5a-4300-9d2f-25b796eb18a2.webp?v=1714975824","width":2000},{"alt":null,"id":23897046974563,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10475195f85c16715ad20267aa9b85c82f602090_fcf5bb44-2bf3-48e3-ae8e-74b263cce58e.webp?v=1714975826"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10475195f85c16715ad20267aa9b85c82f602090_fcf5bb44-2bf3-48e3-ae8e-74b263cce58e.webp?v=1714975826","width":2000},{"alt":null,"id":23897047367779,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4261cabf43a553013a592367482c90c6c9d78767_f765d253-f193-47f6-9553-9f3033876d76.webp?v=1714975829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4261cabf43a553013a592367482c90c6c9d78767_f765d253-f193-47f6-9553-9f3033876d76.webp?v=1714975829","width":2000},{"alt":null,"id":23897048055907,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98788b2542ed3e2f9d82613bd861a39b20efd914_7dcd5d4f-0282-4155-a6f4-826aa23ed54f.webp?v=1714975832"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98788b2542ed3e2f9d82613bd861a39b20efd914_7dcd5d4f-0282-4155-a6f4-826aa23ed54f.webp?v=1714975832","width":2000},{"alt":null,"id":23897048547427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b7897eea0827f60a61dd9e38f0754b6cabfe63_b449d2e7-2eb8-48f6-a224-0ecf58b20892.webp?v=1714975834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b7897eea0827f60a61dd9e38f0754b6cabfe63_b449d2e7-2eb8-48f6-a224-0ecf58b20892.webp?v=1714975834","width":2000},{"alt":null,"id":23897049170019,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61300329a5c2c118f4362b383dbc3422d93ce8ac_13453378-4010-4a88-b068-08725d5f046d.webp?v=1714975837"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61300329a5c2c118f4362b383dbc3422d93ce8ac_13453378-4010-4a88-b068-08725d5f046d.webp?v=1714975837","width":2000},{"alt":null,"id":23897049596003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0b99ad13df0cc6fadf4e2afd5b16900643e613d_1bf4fb26-607e-4afd-826b-ecc29cf70fb3.webp?v=1714975839"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0b99ad13df0cc6fadf4e2afd5b16900643e613d_1bf4fb26-607e-4afd-826b-ecc29cf70fb3.webp?v=1714975839","width":2000},{"alt":null,"id":23897050153059,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef5eef074bc2c214ec98d0ac5b75786adef10c2c_d5af7844-f94f-4262-94c1-aa7e1ffdb207.webp?v=1714975841"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef5eef074bc2c214ec98d0ac5b75786adef10c2c_d5af7844-f94f-4262-94c1-aa7e1ffdb207.webp?v=1714975841","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41917998399587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-PB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31491636527203,"product_id":7416204230755,"position":7,"created_at":"2024-05-06T14:10:34+08:00","updated_at":"2024-05-06T14:10:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b7897eea0827f60a61dd9e38f0754b6cabfe63_b449d2e7-2eb8-48f6-a224-0ecf58b20892.webp?v=1714975834","variant_ids":[41917998399587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-黑 - 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":"NPB0106424-PB09","featured_media":{"alt":null,"id":23897048547427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b7897eea0827f60a61dd9e38f0754b6cabfe63_b449d2e7-2eb8-48f6-a224-0ecf58b20892.webp?v=1714975834"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41917998399587,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0106424-PB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31491636527203,"product_id":7416204230755,"position":7,"created_at":"2024-05-06T14:10:34+08:00","updated_at":"2024-05-06T14:10:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b7897eea0827f60a61dd9e38f0754b6cabfe63_b449d2e7-2eb8-48f6-a224-0ecf58b20892.webp?v=1714975834","variant_ids":[41917998399587]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone X - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - POP全載具1-黑 - 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":"NPB0106424-PB09","featured_media":{"alt":null,"id":23897048547427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b7897eea0827f60a61dd9e38f0754b6cabfe63_b449d2e7-2eb8-48f6-a224-0ecf58b20892.webp?v=1714975834"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null
var sellingStatus
if ($bumper) {
$(document).ready(function() {
var productImg = $product.images[0]
var bumperVariants = $bumper.variants;
var bumperColors = new Object();
var currentVariant = '';
var productType = '';
bumperVariants.forEach(variant => {
bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src;
});
if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') {
mergeImages(
[productImg, bumperColors[currentVariant]],
{ crossOrigin: 'anonymous' }
).then(mergedImg => {
$('.merged-img').attr('src', mergedImg);
});
} else {
mergeImages(
[bumperColors[currentVariant], productImg],
{ crossOrigin: 'anonymous' }
).then(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: "停產"
}