$product = {"id":7407858188387,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO","handle":"iphone-14-plus-mod-nx-printable-pb82","description":null,"published_at":"2024-06-11T16:24:48+08:00","created_at":"2024-05-03T11:03:49+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":41879714824291,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB82","requires_shipping":true,"taxable":true,"featured_image":{"id":31470553071715,"product_id":7407858188387,"position":8,"created_at":"2024-05-03T11:04:09+08:00","updated_at":"2024-05-03T11:04:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1778d7f864e84788064a4fff40840a08350bc1_e165c41a-c4dc-492b-bde5-278ad1cdb508.webp?v=1714705449","variant_ids":[41879714824291]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO - 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-PB82","featured_media":{"alt":null,"id":23875456925795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1778d7f864e84788064a4fff40840a08350bc1_e165c41a-c4dc-492b-bde5-278ad1cdb508.webp?v=1714705449"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b75f3c323d3713954666dfbbb7f8933f8290e2_7c848d36-aee0-402e-8eec-7131cec2cf55.webp?v=1714705432","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75db577870d42382375060bf7c104882ecf23ee4_64299609-c568-44bb-a0f4-de5808f4ab8f.webp?v=1714705434","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bb57e838dd48b984a4582cda1d4e24ae4453f33_884b9ae4-23e6-41e1-bd16-f3362927eed7.webp?v=1714705436","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dea2f51d1b3c936307cea45b2c0c898e6c659d11_87293bc9-2121-46af-9a3b-1214245a53e4.webp?v=1714705439","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feee2a72592978cfbb010258f5103c53343e9205_7abe9d9d-04fa-4ff8-99c2-4e23b3dd9933.webp?v=1714705441","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9727b126151a98c08f28a667e4c19fbf12838746_186f4e22-2abb-4728-857e-011532a22372.webp?v=1714705444","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6f45bb86ac93037c3bf4e35fae361cc5ad73a66_ed3cfb79-3cad-4862-b8f5-4a0be980414c.webp?v=1714705446","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1778d7f864e84788064a4fff40840a08350bc1_e165c41a-c4dc-492b-bde5-278ad1cdb508.webp?v=1714705449","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec4c7979e1a02e6429f669ce0ba0d9378f738779_990b7c2b-8a1e-4285-b54f-e797f92d6ee0.webp?v=1714705451","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d3bdaff60b5cb453dadc137a92e7006967173f1_6a9ccebf-204e-4a49-8fe3-4801bef5a9ad.webp?v=1714705454"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b75f3c323d3713954666dfbbb7f8933f8290e2_7c848d36-aee0-402e-8eec-7131cec2cf55.webp?v=1714705432","options":["color"],"media":[{"alt":null,"id":23875452502115,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b75f3c323d3713954666dfbbb7f8933f8290e2_7c848d36-aee0-402e-8eec-7131cec2cf55.webp?v=1714705432"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/62b75f3c323d3713954666dfbbb7f8933f8290e2_7c848d36-aee0-402e-8eec-7131cec2cf55.webp?v=1714705432","width":2000},{"alt":null,"id":23875452993635,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75db577870d42382375060bf7c104882ecf23ee4_64299609-c568-44bb-a0f4-de5808f4ab8f.webp?v=1714705434"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/75db577870d42382375060bf7c104882ecf23ee4_64299609-c568-44bb-a0f4-de5808f4ab8f.webp?v=1714705434","width":2000},{"alt":null,"id":23875453485155,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bb57e838dd48b984a4582cda1d4e24ae4453f33_884b9ae4-23e6-41e1-bd16-f3362927eed7.webp?v=1714705436"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4bb57e838dd48b984a4582cda1d4e24ae4453f33_884b9ae4-23e6-41e1-bd16-f3362927eed7.webp?v=1714705436","width":2000},{"alt":null,"id":23875454238819,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dea2f51d1b3c936307cea45b2c0c898e6c659d11_87293bc9-2121-46af-9a3b-1214245a53e4.webp?v=1714705439"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dea2f51d1b3c936307cea45b2c0c898e6c659d11_87293bc9-2121-46af-9a3b-1214245a53e4.webp?v=1714705439","width":2000},{"alt":null,"id":23875455123555,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feee2a72592978cfbb010258f5103c53343e9205_7abe9d9d-04fa-4ff8-99c2-4e23b3dd9933.webp?v=1714705441"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feee2a72592978cfbb010258f5103c53343e9205_7abe9d9d-04fa-4ff8-99c2-4e23b3dd9933.webp?v=1714705441","width":2000},{"alt":null,"id":23875456041059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9727b126151a98c08f28a667e4c19fbf12838746_186f4e22-2abb-4728-857e-011532a22372.webp?v=1714705444"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9727b126151a98c08f28a667e4c19fbf12838746_186f4e22-2abb-4728-857e-011532a22372.webp?v=1714705444","width":2000},{"alt":null,"id":23875456434275,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6f45bb86ac93037c3bf4e35fae361cc5ad73a66_ed3cfb79-3cad-4862-b8f5-4a0be980414c.webp?v=1714705446"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b6f45bb86ac93037c3bf4e35fae361cc5ad73a66_ed3cfb79-3cad-4862-b8f5-4a0be980414c.webp?v=1714705446","width":2000},{"alt":null,"id":23875456925795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1778d7f864e84788064a4fff40840a08350bc1_e165c41a-c4dc-492b-bde5-278ad1cdb508.webp?v=1714705449"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1778d7f864e84788064a4fff40840a08350bc1_e165c41a-c4dc-492b-bde5-278ad1cdb508.webp?v=1714705449","width":2000},{"alt":null,"id":23875457319011,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec4c7979e1a02e6429f669ce0ba0d9378f738779_990b7c2b-8a1e-4285-b54f-e797f92d6ee0.webp?v=1714705451"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec4c7979e1a02e6429f669ce0ba0d9378f738779_990b7c2b-8a1e-4285-b54f-e797f92d6ee0.webp?v=1714705451","width":2000},{"alt":null,"id":23875457908835,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d3bdaff60b5cb453dadc137a92e7006967173f1_6a9ccebf-204e-4a49-8fe3-4801bef5a9ad.webp?v=1714705454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d3bdaff60b5cb453dadc137a92e7006967173f1_6a9ccebf-204e-4a49-8fe3-4801bef5a9ad.webp?v=1714705454","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41879714824291,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB82","requires_shipping":true,"taxable":true,"featured_image":{"id":31470553071715,"product_id":7407858188387,"position":8,"created_at":"2024-05-03T11:04:09+08:00","updated_at":"2024-05-03T11:04:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1778d7f864e84788064a4fff40840a08350bc1_e165c41a-c4dc-492b-bde5-278ad1cdb508.webp?v=1714705449","variant_ids":[41879714824291]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO - 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-PB82","featured_media":{"alt":null,"id":23875456925795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1778d7f864e84788064a4fff40840a08350bc1_e165c41a-c4dc-492b-bde5-278ad1cdb508.webp?v=1714705449"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41879714824291,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PB82","requires_shipping":true,"taxable":true,"featured_image":{"id":31470553071715,"product_id":7407858188387,"position":8,"created_at":"2024-05-03T11:04:09+08:00","updated_at":"2024-05-03T11:04:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1778d7f864e84788064a4fff40840a08350bc1_e165c41a-c4dc-492b-bde5-278ad1cdb508.webp?v=1714705449","variant_ids":[41879714824291]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - The Adventures of R2-D2 \u0026 C-3PO - 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-PB82","featured_media":{"alt":null,"id":23875456925795,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e1778d7f864e84788064a4fff40840a08350bc1_e165c41a-c4dc-492b-bde5-278ad1cdb508.webp?v=1714705449"}},"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: "停產"
}