$product = {"id":7408378118243,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-線稿風格","handle":"iphone-12-mini-mod-nx-printable-pb51","description":null,"published_at":"2024-06-11T16:35:35+08:00","created_at":"2024-05-03T15:14: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":41884812279907,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31472105652323,"product_id":7408378118243,"position":2,"created_at":"2024-05-03T15:14:45+08:00","updated_at":"2024-05-03T15:14:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db6e5e821427f42d56af876764f87ed9e3424df4_3d5c06d1-42c1-454c-83a4-dfcebf1caa2a.webp?v=1714720485","variant_ids":[41884812279907]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-線稿風格 - 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-PB51","featured_media":{"alt":null,"id":23877021040739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db6e5e821427f42d56af876764f87ed9e3424df4_3d5c06d1-42c1-454c-83a4-dfcebf1caa2a.webp?v=1714720485"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/484876939f521242ccf90a2e3a7f2bc42f9562c2_0820b1e3-e698-4885-803a-c5b6df229158.webp?v=1714720483","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db6e5e821427f42d56af876764f87ed9e3424df4_3d5c06d1-42c1-454c-83a4-dfcebf1caa2a.webp?v=1714720485","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03c91ca615ea101780d00e3463931d43ff2e27f8_bbd7a518-e99a-4454-8178-ace3277d92f7.webp?v=1714720488","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e745dd61d17dc968f6b961230118e8c05c3ecdfe_b43608e4-168c-4f4a-8874-666ef456277f.webp?v=1714720490","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb7933d7be7f421b1dde42d7951cdc7da69f90be_11d87b6b-c33e-4589-9f31-9a5265314e2c.webp?v=1714720492","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e29a85ec5bff8fde7a8520ca8a02100218db93b_09881723-e70c-4315-b303-3d74d7992d47.webp?v=1714720495","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93741e0813d5a5661222a434de0722eaaa910382_c73861ea-6932-4b7b-9065-8d054c1f87b6.webp?v=1714720497","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e76310b0f84c35db983be28694e59198e37c393f_cf052a1d-123e-4e72-920c-5f3dd3432263.webp?v=1714720499","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3116d91601e7beff1c691cc2e01718c898acb61f_91ae13ef-003a-4ec3-a1fc-ad50ea9c11ac.webp?v=1714720501","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33999fa650c1920dfb96e9bc6f1506c737eca9e5_048df145-4cd9-4d38-8ee4-0023b16fecab.webp?v=1714720504","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65cb5586d62233da0f91289993db12a87c707912_fb32cc4e-f699-4b05-a4c5-c045b634c13b.webp?v=1714720507"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/484876939f521242ccf90a2e3a7f2bc42f9562c2_0820b1e3-e698-4885-803a-c5b6df229158.webp?v=1714720483","options":["color"],"media":[{"alt":null,"id":23877020680291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/484876939f521242ccf90a2e3a7f2bc42f9562c2_0820b1e3-e698-4885-803a-c5b6df229158.webp?v=1714720483"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/484876939f521242ccf90a2e3a7f2bc42f9562c2_0820b1e3-e698-4885-803a-c5b6df229158.webp?v=1714720483","width":2000},{"alt":null,"id":23877021040739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db6e5e821427f42d56af876764f87ed9e3424df4_3d5c06d1-42c1-454c-83a4-dfcebf1caa2a.webp?v=1714720485"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db6e5e821427f42d56af876764f87ed9e3424df4_3d5c06d1-42c1-454c-83a4-dfcebf1caa2a.webp?v=1714720485","width":2000},{"alt":null,"id":23877021630563,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03c91ca615ea101780d00e3463931d43ff2e27f8_bbd7a518-e99a-4454-8178-ace3277d92f7.webp?v=1714720488"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03c91ca615ea101780d00e3463931d43ff2e27f8_bbd7a518-e99a-4454-8178-ace3277d92f7.webp?v=1714720488","width":2000},{"alt":null,"id":23877022056547,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e745dd61d17dc968f6b961230118e8c05c3ecdfe_b43608e4-168c-4f4a-8874-666ef456277f.webp?v=1714720490"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e745dd61d17dc968f6b961230118e8c05c3ecdfe_b43608e4-168c-4f4a-8874-666ef456277f.webp?v=1714720490","width":2000},{"alt":null,"id":23877022449763,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb7933d7be7f421b1dde42d7951cdc7da69f90be_11d87b6b-c33e-4589-9f31-9a5265314e2c.webp?v=1714720492"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb7933d7be7f421b1dde42d7951cdc7da69f90be_11d87b6b-c33e-4589-9f31-9a5265314e2c.webp?v=1714720492","width":2000},{"alt":null,"id":23877023137891,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e29a85ec5bff8fde7a8520ca8a02100218db93b_09881723-e70c-4315-b303-3d74d7992d47.webp?v=1714720495"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6e29a85ec5bff8fde7a8520ca8a02100218db93b_09881723-e70c-4315-b303-3d74d7992d47.webp?v=1714720495","width":2000},{"alt":null,"id":23877023563875,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93741e0813d5a5661222a434de0722eaaa910382_c73861ea-6932-4b7b-9065-8d054c1f87b6.webp?v=1714720497"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/93741e0813d5a5661222a434de0722eaaa910382_c73861ea-6932-4b7b-9065-8d054c1f87b6.webp?v=1714720497","width":2000},{"alt":null,"id":23877024088163,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e76310b0f84c35db983be28694e59198e37c393f_cf052a1d-123e-4e72-920c-5f3dd3432263.webp?v=1714720499"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e76310b0f84c35db983be28694e59198e37c393f_cf052a1d-123e-4e72-920c-5f3dd3432263.webp?v=1714720499","width":2000},{"alt":null,"id":23877024415843,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3116d91601e7beff1c691cc2e01718c898acb61f_91ae13ef-003a-4ec3-a1fc-ad50ea9c11ac.webp?v=1714720501"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3116d91601e7beff1c691cc2e01718c898acb61f_91ae13ef-003a-4ec3-a1fc-ad50ea9c11ac.webp?v=1714720501","width":2000},{"alt":null,"id":23877025366115,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33999fa650c1920dfb96e9bc6f1506c737eca9e5_048df145-4cd9-4d38-8ee4-0023b16fecab.webp?v=1714720504"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/33999fa650c1920dfb96e9bc6f1506c737eca9e5_048df145-4cd9-4d38-8ee4-0023b16fecab.webp?v=1714720504","width":2000},{"alt":null,"id":23877025824867,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65cb5586d62233da0f91289993db12a87c707912_fb32cc4e-f699-4b05-a4c5-c045b634c13b.webp?v=1714720507"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65cb5586d62233da0f91289993db12a87c707912_fb32cc4e-f699-4b05-a4c5-c045b634c13b.webp?v=1714720507","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41884812279907,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31472105652323,"product_id":7408378118243,"position":2,"created_at":"2024-05-03T15:14:45+08:00","updated_at":"2024-05-03T15:14:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db6e5e821427f42d56af876764f87ed9e3424df4_3d5c06d1-42c1-454c-83a4-dfcebf1caa2a.webp?v=1714720485","variant_ids":[41884812279907]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-線稿風格 - 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-PB51","featured_media":{"alt":null,"id":23877021040739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db6e5e821427f42d56af876764f87ed9e3424df4_3d5c06d1-42c1-454c-83a4-dfcebf1caa2a.webp?v=1714720485"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884812279907,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31472105652323,"product_id":7408378118243,"position":2,"created_at":"2024-05-03T15:14:45+08:00","updated_at":"2024-05-03T15:14:45+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db6e5e821427f42d56af876764f87ed9e3424df4_3d5c06d1-42c1-454c-83a4-dfcebf1caa2a.webp?v=1714720485","variant_ids":[41884812279907]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-線稿風格 - 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-PB51","featured_media":{"alt":null,"id":23877021040739,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db6e5e821427f42d56af876764f87ed9e3424df4_3d5c06d1-42c1-454c-83a4-dfcebf1caa2a.webp?v=1714720485"}},"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: "停產"
}