$product = {"id":7408375955555,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 小圖款-芮","handle":"iphone-12-mini-mod-nx-printable-pc05","description":null,"published_at":"2024-06-11T16:35:31+08:00","created_at":"2024-05-03T15:14:21+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":41884792062051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472101654627,"product_id":7408375955555,"position":3,"created_at":"2024-05-03T15:14:28+08:00","updated_at":"2024-05-03T15:14:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6b8a9d3211f5d15cc04ab09c2d747639c81f0e_59a45d14-1619-4b62-b4a5-b5726af8a5ee.webp?v=1714720468","variant_ids":[41884792062051]},"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-PC05","featured_media":{"alt":null,"id":23877017043043,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6b8a9d3211f5d15cc04ab09c2d747639c81f0e_59a45d14-1619-4b62-b4a5-b5726af8a5ee.webp?v=1714720468"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/688ba06e3614aec22c48538b7a23cdd65aa4c816_76377c12-e27e-41f0-bbff-7c910bc2c9ef.webp?v=1714720464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f83764b0f1e04959cdf30ef4d6b6c75d9701529_8c3b977d-cada-4082-af26-431139ba05a3.webp?v=1714720466","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6b8a9d3211f5d15cc04ab09c2d747639c81f0e_59a45d14-1619-4b62-b4a5-b5726af8a5ee.webp?v=1714720468","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2d67048c26a5ef49aa5ec99c6819b4a8e992858_e4b12d9d-8a77-4b63-a704-491720d66815.webp?v=1714720471","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9993ec87ec8d73edf89adbf649695f1efc2b19e3_dae7f016-0017-4012-af91-c7aa40481c79.webp?v=1714720473","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a26324bdc5cf9e083fa43a0a369516e2ad40af7_4044d4f6-4a4f-4d92-9948-c22537605753.webp?v=1714720475","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b16fd680ee4da85deac7a62d2d5c8493053d3d5a_fd49bcce-0552-487c-b184-492212d2fb6b.webp?v=1714720478","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/821b8b593399318aa4a227818b7ad12b885ca417_365e2648-44ff-4a62-84d5-a7c3a152ab07.webp?v=1714720480","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e674c3127b8be22351754ac31bc75242f6a5c910_1b8c03b2-67d1-470a-870e-e66baf8b8934.webp?v=1714720482","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/796bc88b2b673736864b94b7c109a16511092764_03f75b07-b89d-402f-b684-f63aecee643f.webp?v=1714720484","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d78a89b908077a4d8c563fb077a0cc8addbf57e9_b59e5e74-aad9-47d4-a92a-c1f905230fe3.webp?v=1714720487"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/688ba06e3614aec22c48538b7a23cdd65aa4c816_76377c12-e27e-41f0-bbff-7c910bc2c9ef.webp?v=1714720464","options":["color"],"media":[{"alt":null,"id":23877016191075,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/688ba06e3614aec22c48538b7a23cdd65aa4c816_76377c12-e27e-41f0-bbff-7c910bc2c9ef.webp?v=1714720464"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/688ba06e3614aec22c48538b7a23cdd65aa4c816_76377c12-e27e-41f0-bbff-7c910bc2c9ef.webp?v=1714720464","width":2000},{"alt":null,"id":23877016453219,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f83764b0f1e04959cdf30ef4d6b6c75d9701529_8c3b977d-cada-4082-af26-431139ba05a3.webp?v=1714720466"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f83764b0f1e04959cdf30ef4d6b6c75d9701529_8c3b977d-cada-4082-af26-431139ba05a3.webp?v=1714720466","width":2000},{"alt":null,"id":23877017043043,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6b8a9d3211f5d15cc04ab09c2d747639c81f0e_59a45d14-1619-4b62-b4a5-b5726af8a5ee.webp?v=1714720468"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6b8a9d3211f5d15cc04ab09c2d747639c81f0e_59a45d14-1619-4b62-b4a5-b5726af8a5ee.webp?v=1714720468","width":2000},{"alt":null,"id":23877017600099,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2d67048c26a5ef49aa5ec99c6819b4a8e992858_e4b12d9d-8a77-4b63-a704-491720d66815.webp?v=1714720471"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2d67048c26a5ef49aa5ec99c6819b4a8e992858_e4b12d9d-8a77-4b63-a704-491720d66815.webp?v=1714720471","width":2000},{"alt":null,"id":23877018124387,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9993ec87ec8d73edf89adbf649695f1efc2b19e3_dae7f016-0017-4012-af91-c7aa40481c79.webp?v=1714720473"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9993ec87ec8d73edf89adbf649695f1efc2b19e3_dae7f016-0017-4012-af91-c7aa40481c79.webp?v=1714720473","width":2000},{"alt":null,"id":23877018452067,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a26324bdc5cf9e083fa43a0a369516e2ad40af7_4044d4f6-4a4f-4d92-9948-c22537605753.webp?v=1714720475"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a26324bdc5cf9e083fa43a0a369516e2ad40af7_4044d4f6-4a4f-4d92-9948-c22537605753.webp?v=1714720475","width":2000},{"alt":null,"id":23877019435107,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b16fd680ee4da85deac7a62d2d5c8493053d3d5a_fd49bcce-0552-487c-b184-492212d2fb6b.webp?v=1714720478"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b16fd680ee4da85deac7a62d2d5c8493053d3d5a_fd49bcce-0552-487c-b184-492212d2fb6b.webp?v=1714720478","width":2000},{"alt":null,"id":23877019861091,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/821b8b593399318aa4a227818b7ad12b885ca417_365e2648-44ff-4a62-84d5-a7c3a152ab07.webp?v=1714720480"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/821b8b593399318aa4a227818b7ad12b885ca417_365e2648-44ff-4a62-84d5-a7c3a152ab07.webp?v=1714720480","width":2000},{"alt":null,"id":23877020352611,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e674c3127b8be22351754ac31bc75242f6a5c910_1b8c03b2-67d1-470a-870e-e66baf8b8934.webp?v=1714720482"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e674c3127b8be22351754ac31bc75242f6a5c910_1b8c03b2-67d1-470a-870e-e66baf8b8934.webp?v=1714720482","width":2000},{"alt":null,"id":23877020942435,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/796bc88b2b673736864b94b7c109a16511092764_03f75b07-b89d-402f-b684-f63aecee643f.webp?v=1714720484"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/796bc88b2b673736864b94b7c109a16511092764_03f75b07-b89d-402f-b684-f63aecee643f.webp?v=1714720484","width":2000},{"alt":null,"id":23877021401187,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d78a89b908077a4d8c563fb077a0cc8addbf57e9_b59e5e74-aad9-47d4-a92a-c1f905230fe3.webp?v=1714720487"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d78a89b908077a4d8c563fb077a0cc8addbf57e9_b59e5e74-aad9-47d4-a92a-c1f905230fe3.webp?v=1714720487","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41884792062051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472101654627,"product_id":7408375955555,"position":3,"created_at":"2024-05-03T15:14:28+08:00","updated_at":"2024-05-03T15:14:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6b8a9d3211f5d15cc04ab09c2d747639c81f0e_59a45d14-1619-4b62-b4a5-b5726af8a5ee.webp?v=1714720468","variant_ids":[41884792062051]},"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-PC05","featured_media":{"alt":null,"id":23877017043043,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6b8a9d3211f5d15cc04ab09c2d747639c81f0e_59a45d14-1619-4b62-b4a5-b5726af8a5ee.webp?v=1714720468"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41884792062051,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC05","requires_shipping":true,"taxable":true,"featured_image":{"id":31472101654627,"product_id":7408375955555,"position":3,"created_at":"2024-05-03T15:14:28+08:00","updated_at":"2024-05-03T15:14:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6b8a9d3211f5d15cc04ab09c2d747639c81f0e_59a45d14-1619-4b62-b4a5-b5726af8a5ee.webp?v=1714720468","variant_ids":[41884792062051]},"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-PC05","featured_media":{"alt":null,"id":23877017043043,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6b8a9d3211f5d15cc04ab09c2d747639c81f0e_59a45d14-1619-4b62-b4a5-b5726af8a5ee.webp?v=1714720468"}},"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: "停產"
}