$product = {"id":7408461348963,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-日文字系列","handle":"iphone-12-mini-mod-nx-printable-pb64","description":null,"published_at":"2024-06-11T16:37:52+08:00","created_at":"2024-05-03T15:31:11+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":41885739909219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB64","requires_shipping":true,"taxable":true,"featured_image":{"id":31472339746915,"product_id":7408461348963,"position":6,"created_at":"2024-05-03T15:31:25+08:00","updated_at":"2024-05-03T15:31:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f7e8cd8baae1f654783c7f02721276cc90cb178_528a9769-713e-4ea2-8bcb-bd9ecc7494a8.webp?v=1714721485","variant_ids":[41885739909219]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-日文字系列 - 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-PB64","featured_media":{"alt":null,"id":23877256446051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f7e8cd8baae1f654783c7f02721276cc90cb178_528a9769-713e-4ea2-8bcb-bd9ecc7494a8.webp?v=1714721485"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/042f73e9aa38852a52ec73de0dd4554de8617fb1_6b0b34ad-f577-4422-b6ed-2f9866a1aa0b.webp?v=1714721474","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05ed19019aeaa07a3e9d6e653c675efd317f2dae_2fd1dbe5-8123-474c-aa3e-45f33c2a6964.webp?v=1714721476","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d84e750564836fd2fcb6b205a460eedf7f3737f_3e63d84f-2735-4d5f-82c9-0002d85848db.webp?v=1714721479","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96f6a12dd24564d579beb7c48869d7fba0f2ee7a_701404f2-5a25-4e1f-bd40-50af37497670.webp?v=1714721481","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40d2ee2d4ed6a5c4551e98168591add5f97ebc6_10650db5-a791-4e8b-9503-56809c1ad422.webp?v=1714721483","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f7e8cd8baae1f654783c7f02721276cc90cb178_528a9769-713e-4ea2-8bcb-bd9ecc7494a8.webp?v=1714721485","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ccbf094dcfd4ce17de5914838405edabf2f28ef_ff6fc309-fb50-4ae9-9c72-9c045206196b.webp?v=1714721488","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76051227d61ce34f7d607482d71b7e2304198802_1731c983-1bce-4345-b310-b621b4a7e7ec.webp?v=1714721490","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4df5167ce489052589700979e25e97b753e69a3e_4ead6df5-d5e7-4629-b839-0bcc9da10837.webp?v=1714721493","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3546c14e269582cbcdc453ad1e8f85c9e287378_f8483250-c0dc-46c4-8f1b-5851b3948512.webp?v=1714721495","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f7f6384a60ea66db77de36c71d2831c1c18b13a_03fb18ea-e9f1-4eb2-82d0-63a484240389.webp?v=1714721497"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/042f73e9aa38852a52ec73de0dd4554de8617fb1_6b0b34ad-f577-4422-b6ed-2f9866a1aa0b.webp?v=1714721474","options":["color"],"media":[{"alt":null,"id":23877254053987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/042f73e9aa38852a52ec73de0dd4554de8617fb1_6b0b34ad-f577-4422-b6ed-2f9866a1aa0b.webp?v=1714721474"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/042f73e9aa38852a52ec73de0dd4554de8617fb1_6b0b34ad-f577-4422-b6ed-2f9866a1aa0b.webp?v=1714721474","width":2000},{"alt":null,"id":23877254545507,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05ed19019aeaa07a3e9d6e653c675efd317f2dae_2fd1dbe5-8123-474c-aa3e-45f33c2a6964.webp?v=1714721476"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/05ed19019aeaa07a3e9d6e653c675efd317f2dae_2fd1dbe5-8123-474c-aa3e-45f33c2a6964.webp?v=1714721476","width":2000},{"alt":null,"id":23877255135331,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d84e750564836fd2fcb6b205a460eedf7f3737f_3e63d84f-2735-4d5f-82c9-0002d85848db.webp?v=1714721479"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d84e750564836fd2fcb6b205a460eedf7f3737f_3e63d84f-2735-4d5f-82c9-0002d85848db.webp?v=1714721479","width":2000},{"alt":null,"id":23877255397475,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96f6a12dd24564d579beb7c48869d7fba0f2ee7a_701404f2-5a25-4e1f-bd40-50af37497670.webp?v=1714721481"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96f6a12dd24564d579beb7c48869d7fba0f2ee7a_701404f2-5a25-4e1f-bd40-50af37497670.webp?v=1714721481","width":2000},{"alt":null,"id":23877256020067,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40d2ee2d4ed6a5c4551e98168591add5f97ebc6_10650db5-a791-4e8b-9503-56809c1ad422.webp?v=1714721483"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d40d2ee2d4ed6a5c4551e98168591add5f97ebc6_10650db5-a791-4e8b-9503-56809c1ad422.webp?v=1714721483","width":2000},{"alt":null,"id":23877256446051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f7e8cd8baae1f654783c7f02721276cc90cb178_528a9769-713e-4ea2-8bcb-bd9ecc7494a8.webp?v=1714721485"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f7e8cd8baae1f654783c7f02721276cc90cb178_528a9769-713e-4ea2-8bcb-bd9ecc7494a8.webp?v=1714721485","width":2000},{"alt":null,"id":23877257003107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ccbf094dcfd4ce17de5914838405edabf2f28ef_ff6fc309-fb50-4ae9-9c72-9c045206196b.webp?v=1714721488"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ccbf094dcfd4ce17de5914838405edabf2f28ef_ff6fc309-fb50-4ae9-9c72-9c045206196b.webp?v=1714721488","width":2000},{"alt":null,"id":23877257592931,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76051227d61ce34f7d607482d71b7e2304198802_1731c983-1bce-4345-b310-b621b4a7e7ec.webp?v=1714721490"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76051227d61ce34f7d607482d71b7e2304198802_1731c983-1bce-4345-b310-b621b4a7e7ec.webp?v=1714721490","width":2000},{"alt":null,"id":23877257986147,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4df5167ce489052589700979e25e97b753e69a3e_4ead6df5-d5e7-4629-b839-0bcc9da10837.webp?v=1714721493"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4df5167ce489052589700979e25e97b753e69a3e_4ead6df5-d5e7-4629-b839-0bcc9da10837.webp?v=1714721493","width":2000},{"alt":null,"id":23877258412131,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3546c14e269582cbcdc453ad1e8f85c9e287378_f8483250-c0dc-46c4-8f1b-5851b3948512.webp?v=1714721495"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3546c14e269582cbcdc453ad1e8f85c9e287378_f8483250-c0dc-46c4-8f1b-5851b3948512.webp?v=1714721495","width":2000},{"alt":null,"id":23877258772579,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f7f6384a60ea66db77de36c71d2831c1c18b13a_03fb18ea-e9f1-4eb2-82d0-63a484240389.webp?v=1714721497"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f7f6384a60ea66db77de36c71d2831c1c18b13a_03fb18ea-e9f1-4eb2-82d0-63a484240389.webp?v=1714721497","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41885739909219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB64","requires_shipping":true,"taxable":true,"featured_image":{"id":31472339746915,"product_id":7408461348963,"position":6,"created_at":"2024-05-03T15:31:25+08:00","updated_at":"2024-05-03T15:31:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f7e8cd8baae1f654783c7f02721276cc90cb178_528a9769-713e-4ea2-8bcb-bd9ecc7494a8.webp?v=1714721485","variant_ids":[41885739909219]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-日文字系列 - 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-PB64","featured_media":{"alt":null,"id":23877256446051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f7e8cd8baae1f654783c7f02721276cc90cb178_528a9769-713e-4ea2-8bcb-bd9ecc7494a8.webp?v=1714721485"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885739909219,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB64","requires_shipping":true,"taxable":true,"featured_image":{"id":31472339746915,"product_id":7408461348963,"position":6,"created_at":"2024-05-03T15:31:25+08:00","updated_at":"2024-05-03T15:31:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f7e8cd8baae1f654783c7f02721276cc90cb178_528a9769-713e-4ea2-8bcb-bd9ecc7494a8.webp?v=1714721485","variant_ids":[41885739909219]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2-日文字系列 - 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-PB64","featured_media":{"alt":null,"id":23877256446051,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f7e8cd8baae1f654783c7f02721276cc90cb178_528a9769-713e-4ea2-8bcb-bd9ecc7494a8.webp?v=1714721485"}},"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: "停產"
}