$product = {"id":7407646474339,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術","handle":"iphone-14-plus-mod-nx-printable-pb34","description":null,"published_at":"2024-06-11T16:21:29+08:00","created_at":"2024-05-03T10:36:57+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 14 Plus","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":41877144797283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31470144356451,"product_id":7407646474339,"position":5,"created_at":"2024-05-03T10:37:09+08:00","updated_at":"2024-05-03T10:37:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6c8de292925742e09f0e8ec69dfe8fdf103435d_070013fc-e62a-4696-b371-fabbe70f29eb.webp?v=1714703829","variant_ids":[41877144797283]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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":"NPB0126124-PB34","featured_media":{"alt":null,"id":23875047260259,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6c8de292925742e09f0e8ec69dfe8fdf103435d_070013fc-e62a-4696-b371-fabbe70f29eb.webp?v=1714703829"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/783997a2cb27a9f61e17db380610c2c784b12a00_72cb4a8b-97f4-417e-ba7b-54379ff01ea1.webp?v=1714703820","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4ce5324947a743d2f428ea04cf92977bf9da01f_3dd4706e-08ea-4751-be1e-0b7ca4998732.webp?v=1714703822","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa02043033ecfb7cd18b632d382c5f74deb8a08d_e833c0a6-c8ec-4af1-93a6-14e72c757dee.webp?v=1714703824","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ec5623fdbbf1b7098b6aefabc28f1ffcb1caaf7_e0393c9a-be5a-4504-879e-0f93a1610b48.webp?v=1714703827","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6c8de292925742e09f0e8ec69dfe8fdf103435d_070013fc-e62a-4696-b371-fabbe70f29eb.webp?v=1714703829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b85d4f0a9ffda84f5704397c417f8061bf43ec7_5a96d7b6-6a6d-4f54-b5bc-286b35b4ce95.webp?v=1714703832","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e5f6d4774bd3cc0181dde97cff379ad315179d_3ac71828-c24f-4fdf-9700-b0fc2127d2f7.webp?v=1714703834","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f1191b956ebfc49e7169a44725be720d17ec4af_0e7fd1fe-c9a3-4c6a-afe6-8227e6ca1d55.webp?v=1714703836","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9bf082ba1e30756a51bd93e3eb7d42040a1739eb_cc83196f-80b0-48e2-891a-cb07145ec496.webp?v=1714703839","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b876e7727e4c69c3b5698fa6cfc6729fef01aa0_f8724c06-ae76-4e3a-b039-95b78cf64754.webp?v=1714703841"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/783997a2cb27a9f61e17db380610c2c784b12a00_72cb4a8b-97f4-417e-ba7b-54379ff01ea1.webp?v=1714703820","options":["color"],"media":[{"alt":null,"id":23875045818467,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/783997a2cb27a9f61e17db380610c2c784b12a00_72cb4a8b-97f4-417e-ba7b-54379ff01ea1.webp?v=1714703820"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/783997a2cb27a9f61e17db380610c2c784b12a00_72cb4a8b-97f4-417e-ba7b-54379ff01ea1.webp?v=1714703820","width":2000},{"alt":null,"id":23875046244451,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4ce5324947a743d2f428ea04cf92977bf9da01f_3dd4706e-08ea-4751-be1e-0b7ca4998732.webp?v=1714703822"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d4ce5324947a743d2f428ea04cf92977bf9da01f_3dd4706e-08ea-4751-be1e-0b7ca4998732.webp?v=1714703822","width":2000},{"alt":null,"id":23875046637667,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa02043033ecfb7cd18b632d382c5f74deb8a08d_e833c0a6-c8ec-4af1-93a6-14e72c757dee.webp?v=1714703824"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa02043033ecfb7cd18b632d382c5f74deb8a08d_e833c0a6-c8ec-4af1-93a6-14e72c757dee.webp?v=1714703824","width":2000},{"alt":null,"id":23875046899811,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ec5623fdbbf1b7098b6aefabc28f1ffcb1caaf7_e0393c9a-be5a-4504-879e-0f93a1610b48.webp?v=1714703827"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7ec5623fdbbf1b7098b6aefabc28f1ffcb1caaf7_e0393c9a-be5a-4504-879e-0f93a1610b48.webp?v=1714703827","width":2000},{"alt":null,"id":23875047260259,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6c8de292925742e09f0e8ec69dfe8fdf103435d_070013fc-e62a-4696-b371-fabbe70f29eb.webp?v=1714703829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6c8de292925742e09f0e8ec69dfe8fdf103435d_070013fc-e62a-4696-b371-fabbe70f29eb.webp?v=1714703829","width":2000},{"alt":null,"id":23875047686243,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b85d4f0a9ffda84f5704397c417f8061bf43ec7_5a96d7b6-6a6d-4f54-b5bc-286b35b4ce95.webp?v=1714703832"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b85d4f0a9ffda84f5704397c417f8061bf43ec7_5a96d7b6-6a6d-4f54-b5bc-286b35b4ce95.webp?v=1714703832","width":2000},{"alt":null,"id":23875048570979,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e5f6d4774bd3cc0181dde97cff379ad315179d_3ac71828-c24f-4fdf-9700-b0fc2127d2f7.webp?v=1714703834"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/13e5f6d4774bd3cc0181dde97cff379ad315179d_3ac71828-c24f-4fdf-9700-b0fc2127d2f7.webp?v=1714703834","width":2000},{"alt":null,"id":23875048898659,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f1191b956ebfc49e7169a44725be720d17ec4af_0e7fd1fe-c9a3-4c6a-afe6-8227e6ca1d55.webp?v=1714703836"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f1191b956ebfc49e7169a44725be720d17ec4af_0e7fd1fe-c9a3-4c6a-afe6-8227e6ca1d55.webp?v=1714703836","width":2000},{"alt":null,"id":23875049554019,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9bf082ba1e30756a51bd93e3eb7d42040a1739eb_cc83196f-80b0-48e2-891a-cb07145ec496.webp?v=1714703839"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9bf082ba1e30756a51bd93e3eb7d42040a1739eb_cc83196f-80b0-48e2-891a-cb07145ec496.webp?v=1714703839","width":2000},{"alt":null,"id":23875050340451,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b876e7727e4c69c3b5698fa6cfc6729fef01aa0_f8724c06-ae76-4e3a-b039-95b78cf64754.webp?v=1714703841"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b876e7727e4c69c3b5698fa6cfc6729fef01aa0_f8724c06-ae76-4e3a-b039-95b78cf64754.webp?v=1714703841","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41877144797283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31470144356451,"product_id":7407646474339,"position":5,"created_at":"2024-05-03T10:37:09+08:00","updated_at":"2024-05-03T10:37:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6c8de292925742e09f0e8ec69dfe8fdf103435d_070013fc-e62a-4696-b371-fabbe70f29eb.webp?v=1714703829","variant_ids":[41877144797283]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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":"NPB0126124-PB34","featured_media":{"alt":null,"id":23875047260259,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6c8de292925742e09f0e8ec69dfe8fdf103435d_070013fc-e62a-4696-b371-fabbe70f29eb.webp?v=1714703829"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41877144797283,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB34","requires_shipping":true,"taxable":true,"featured_image":{"id":31470144356451,"product_id":7407646474339,"position":5,"created_at":"2024-05-03T10:37:09+08:00","updated_at":"2024-05-03T10:37:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6c8de292925742e09f0e8ec69dfe8fdf103435d_070013fc-e62a-4696-b371-fabbe70f29eb.webp?v=1714703829","variant_ids":[41877144797283]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - R2D2 \u0026 C3PO-塗鴉藝術 - 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":"NPB0126124-PB34","featured_media":{"alt":null,"id":23875047260259,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f6c8de292925742e09f0e8ec69dfe8fdf103435d_070013fc-e62a-4696-b371-fabbe70f29eb.webp?v=1714703829"}},"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: "停產"
}