$product = {"id":7408388440163,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub!","handle":"iphone-12-mini-mod-nx-printable-pb81","description":null,"published_at":"2024-06-11T16:35:52+08:00","created_at":"2024-05-03T15:16:38+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":41884925067363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB81","requires_shipping":true,"taxable":true,"featured_image":{"id":31472133734499,"product_id":7408388440163,"position":7,"created_at":"2024-05-03T15:16:58+08:00","updated_at":"2024-05-03T15:16:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07384d7d7d475d442cdfdd0e6a449bd9cf65ed5b_0ab87283-8eec-4e97-b1ff-5bc58f7afdce.webp?v=1714720618","variant_ids":[41884925067363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub! - 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-PB81","featured_media":{"alt":null,"id":23877049385059,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07384d7d7d475d442cdfdd0e6a449bd9cf65ed5b_0ab87283-8eec-4e97-b1ff-5bc58f7afdce.webp?v=1714720618"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3038ac6cada652c8330003f7dfa10735dc77c18b_deda5c81-6731-4a44-a482-7081a4738882.webp?v=1714720604","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2fe97dc30e8433db7770ddbfd5fbe2c4cf9caa8_5cffaa07-6c24-4f98-83c3-46bb415d616c.webp?v=1714720606","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d88c49dd71a96a98216ddec681b9f6320e16b33b_1a1c0705-dd36-458a-b5c3-b7b9ebbd9c58.webp?v=1714720608","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a24aa75f02205904ab6802856bb51da47795cdee_7ad7b53c-a232-42e8-ad06-dd3986e7f84b.webp?v=1714720611","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/370b5684d3dc1d6045b49454a92112fa84127d1a_dc7dc400-57fd-459b-86e8-993e190aade3.webp?v=1714720613","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0657118b2a96c03242717bd8742a817547949669_eecf0258-68db-40d9-955c-ef37a24fd585.webp?v=1714720615","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07384d7d7d475d442cdfdd0e6a449bd9cf65ed5b_0ab87283-8eec-4e97-b1ff-5bc58f7afdce.webp?v=1714720618","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3da1e1aae7786bbfed29053cf98f09abd2a947dd_629a8180-c596-42be-a846-53350d1fbb02.webp?v=1714720620","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d04ac08e0661262459c5931f8fd74a81fb5fda82_30817cc1-ac0e-48d6-aece-63ce8f18da8e.webp?v=1714720622","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a63a5c9532045d9d683bcf73301d00586e30570_268dc24f-7db2-4f6b-8865-93ede41ba64a.webp?v=1714720625","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c76e1cd4d56b4a51f5a2b464e4288e85b5dd620a_187faf48-649f-41cf-8cf9-c97a37592132.webp?v=1714720627"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3038ac6cada652c8330003f7dfa10735dc77c18b_deda5c81-6731-4a44-a482-7081a4738882.webp?v=1714720604","options":["color"],"media":[{"alt":null,"id":23877045682275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3038ac6cada652c8330003f7dfa10735dc77c18b_deda5c81-6731-4a44-a482-7081a4738882.webp?v=1714720604"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3038ac6cada652c8330003f7dfa10735dc77c18b_deda5c81-6731-4a44-a482-7081a4738882.webp?v=1714720604","width":2000},{"alt":null,"id":23877046304867,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2fe97dc30e8433db7770ddbfd5fbe2c4cf9caa8_5cffaa07-6c24-4f98-83c3-46bb415d616c.webp?v=1714720606"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2fe97dc30e8433db7770ddbfd5fbe2c4cf9caa8_5cffaa07-6c24-4f98-83c3-46bb415d616c.webp?v=1714720606","width":2000},{"alt":null,"id":23877046960227,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d88c49dd71a96a98216ddec681b9f6320e16b33b_1a1c0705-dd36-458a-b5c3-b7b9ebbd9c58.webp?v=1714720608"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d88c49dd71a96a98216ddec681b9f6320e16b33b_1a1c0705-dd36-458a-b5c3-b7b9ebbd9c58.webp?v=1714720608","width":2000},{"alt":null,"id":23877047484515,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a24aa75f02205904ab6802856bb51da47795cdee_7ad7b53c-a232-42e8-ad06-dd3986e7f84b.webp?v=1714720611"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a24aa75f02205904ab6802856bb51da47795cdee_7ad7b53c-a232-42e8-ad06-dd3986e7f84b.webp?v=1714720611","width":2000},{"alt":null,"id":23877048369251,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/370b5684d3dc1d6045b49454a92112fa84127d1a_dc7dc400-57fd-459b-86e8-993e190aade3.webp?v=1714720613"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/370b5684d3dc1d6045b49454a92112fa84127d1a_dc7dc400-57fd-459b-86e8-993e190aade3.webp?v=1714720613","width":2000},{"alt":null,"id":23877048828003,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0657118b2a96c03242717bd8742a817547949669_eecf0258-68db-40d9-955c-ef37a24fd585.webp?v=1714720615"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0657118b2a96c03242717bd8742a817547949669_eecf0258-68db-40d9-955c-ef37a24fd585.webp?v=1714720615","width":2000},{"alt":null,"id":23877049385059,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07384d7d7d475d442cdfdd0e6a449bd9cf65ed5b_0ab87283-8eec-4e97-b1ff-5bc58f7afdce.webp?v=1714720618"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07384d7d7d475d442cdfdd0e6a449bd9cf65ed5b_0ab87283-8eec-4e97-b1ff-5bc58f7afdce.webp?v=1714720618","width":2000},{"alt":null,"id":23877049876579,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3da1e1aae7786bbfed29053cf98f09abd2a947dd_629a8180-c596-42be-a846-53350d1fbb02.webp?v=1714720620"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3da1e1aae7786bbfed29053cf98f09abd2a947dd_629a8180-c596-42be-a846-53350d1fbb02.webp?v=1714720620","width":2000},{"alt":null,"id":23877050335331,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d04ac08e0661262459c5931f8fd74a81fb5fda82_30817cc1-ac0e-48d6-aece-63ce8f18da8e.webp?v=1714720622"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d04ac08e0661262459c5931f8fd74a81fb5fda82_30817cc1-ac0e-48d6-aece-63ce8f18da8e.webp?v=1714720622","width":2000},{"alt":null,"id":23877051023459,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a63a5c9532045d9d683bcf73301d00586e30570_268dc24f-7db2-4f6b-8865-93ede41ba64a.webp?v=1714720625"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a63a5c9532045d9d683bcf73301d00586e30570_268dc24f-7db2-4f6b-8865-93ede41ba64a.webp?v=1714720625","width":2000},{"alt":null,"id":23877051449443,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c76e1cd4d56b4a51f5a2b464e4288e85b5dd620a_187faf48-649f-41cf-8cf9-c97a37592132.webp?v=1714720627"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c76e1cd4d56b4a51f5a2b464e4288e85b5dd620a_187faf48-649f-41cf-8cf9-c97a37592132.webp?v=1714720627","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41884925067363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB81","requires_shipping":true,"taxable":true,"featured_image":{"id":31472133734499,"product_id":7408388440163,"position":7,"created_at":"2024-05-03T15:16:58+08:00","updated_at":"2024-05-03T15:16:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07384d7d7d475d442cdfdd0e6a449bd9cf65ed5b_0ab87283-8eec-4e97-b1ff-5bc58f7afdce.webp?v=1714720618","variant_ids":[41884925067363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub! - 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-PB81","featured_media":{"alt":null,"id":23877049385059,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07384d7d7d475d442cdfdd0e6a449bd9cf65ed5b_0ab87283-8eec-4e97-b1ff-5bc58f7afdce.webp?v=1714720618"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884925067363,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB81","requires_shipping":true,"taxable":true,"featured_image":{"id":31472133734499,"product_id":7408388440163,"position":7,"created_at":"2024-05-03T15:16:58+08:00","updated_at":"2024-05-03T15:16:58+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07384d7d7d475d442cdfdd0e6a449bd9cf65ed5b_0ab87283-8eec-4e97-b1ff-5bc58f7afdce.webp?v=1714720618","variant_ids":[41884925067363]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - Ewok-Yub Nub! - 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-PB81","featured_media":{"alt":null,"id":23877049385059,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/07384d7d7d475d442cdfdd0e6a449bd9cf65ed5b_0ab87283-8eec-4e97-b1ff-5bc58f7afdce.webp?v=1714720618"}},"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: "停產"
}