$product = {"id":7411374391395,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist","handle":"iphone-14-plus-mod-nx-magsafe-printable-pb96","description":null,"published_at":"2024-06-11T17:43:13+08:00","created_at":"2024-05-05T00:17:20+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Plus","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"price":110000,"price_min":110000,"price_max":110000,"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":41898075881571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB96","requires_shipping":true,"taxable":true,"featured_image":{"id":31480267112547,"product_id":7411374391395,"position":9,"created_at":"2024-05-05T00:17:42+08:00","updated_at":"2024-05-05T00:17:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a23984b0765bad63835aeb5e3179b2ea56aa77b_dd4475ee-5f02-41df-a76a-251f9e14568a.webp?v=1714839462","variant_ids":[41898075881571]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-PB96","featured_media":{"alt":null,"id":23885518372963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a23984b0765bad63835aeb5e3179b2ea56aa77b_dd4475ee-5f02-41df-a76a-251f9e14568a.webp?v=1714839462"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c584ec0451b3bf971abc0ee0ab7a1fb19fddf540_65584ae7-15cb-4a31-875c-29911fd9c6ab.webp?v=1714839443","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c47cfe8bd4f8ea312b841c05557d4e32fd47bf56_559d5491-8e3a-4264-b30a-ecafb9a7bc2c.webp?v=1714839445","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c0e8144b2c8de9162dfe38c00550a829a1e5cf4_453bee90-1b55-4d44-be1f-0e1ff041bbab.webp?v=1714839448","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9b5dffb65edc6bd3f2e1edc6bd6353b6492c2f1_d6646641-884f-4a58-8b56-189e8b5899f0.webp?v=1714839450","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f63244435aad7fb58e9674c9e2c5f8a0916e698_9536fd2b-f5d3-41b1-8ec6-9353d2c76a5c.webp?v=1714839452","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d1bd8f0cfcca90beb56ceb2d4d072db99acdc20_5a8dfcc0-f3b1-477d-b9ed-3e1b2a8e9309.webp?v=1714839455","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dbd5a61e02af899d886bd333fa1c1c5eb4fe3f1_0aa59a8f-fcf7-4daf-9ddf-267e3aeacb5d.webp?v=1714839457","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2ceaa80ebc6446fc596085e49999623555a6145_0adb4552-5943-45da-9561-8ff9a63516ce.webp?v=1714839460","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a23984b0765bad63835aeb5e3179b2ea56aa77b_dd4475ee-5f02-41df-a76a-251f9e14568a.webp?v=1714839462","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5abc78d07f72b7a7891ed8f965f08022d292b0f_bc35b282-9fd5-491a-9cb8-ee386d9ab8a9.webp?v=1714839465"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c584ec0451b3bf971abc0ee0ab7a1fb19fddf540_65584ae7-15cb-4a31-875c-29911fd9c6ab.webp?v=1714839443","options":["color"],"media":[{"alt":null,"id":23885513916515,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c584ec0451b3bf971abc0ee0ab7a1fb19fddf540_65584ae7-15cb-4a31-875c-29911fd9c6ab.webp?v=1714839443"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c584ec0451b3bf971abc0ee0ab7a1fb19fddf540_65584ae7-15cb-4a31-875c-29911fd9c6ab.webp?v=1714839443","width":2000},{"alt":null,"id":23885514375267,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c47cfe8bd4f8ea312b841c05557d4e32fd47bf56_559d5491-8e3a-4264-b30a-ecafb9a7bc2c.webp?v=1714839445"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c47cfe8bd4f8ea312b841c05557d4e32fd47bf56_559d5491-8e3a-4264-b30a-ecafb9a7bc2c.webp?v=1714839445","width":2000},{"alt":null,"id":23885514932323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c0e8144b2c8de9162dfe38c00550a829a1e5cf4_453bee90-1b55-4d44-be1f-0e1ff041bbab.webp?v=1714839448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c0e8144b2c8de9162dfe38c00550a829a1e5cf4_453bee90-1b55-4d44-be1f-0e1ff041bbab.webp?v=1714839448","width":2000},{"alt":null,"id":23885515456611,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9b5dffb65edc6bd3f2e1edc6bd6353b6492c2f1_d6646641-884f-4a58-8b56-189e8b5899f0.webp?v=1714839450"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9b5dffb65edc6bd3f2e1edc6bd6353b6492c2f1_d6646641-884f-4a58-8b56-189e8b5899f0.webp?v=1714839450","width":2000},{"alt":null,"id":23885515882595,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f63244435aad7fb58e9674c9e2c5f8a0916e698_9536fd2b-f5d3-41b1-8ec6-9353d2c76a5c.webp?v=1714839452"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f63244435aad7fb58e9674c9e2c5f8a0916e698_9536fd2b-f5d3-41b1-8ec6-9353d2c76a5c.webp?v=1714839452","width":2000},{"alt":null,"id":23885516570723,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d1bd8f0cfcca90beb56ceb2d4d072db99acdc20_5a8dfcc0-f3b1-477d-b9ed-3e1b2a8e9309.webp?v=1714839455"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d1bd8f0cfcca90beb56ceb2d4d072db99acdc20_5a8dfcc0-f3b1-477d-b9ed-3e1b2a8e9309.webp?v=1714839455","width":2000},{"alt":null,"id":23885516996707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dbd5a61e02af899d886bd333fa1c1c5eb4fe3f1_0aa59a8f-fcf7-4daf-9ddf-267e3aeacb5d.webp?v=1714839457"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dbd5a61e02af899d886bd333fa1c1c5eb4fe3f1_0aa59a8f-fcf7-4daf-9ddf-267e3aeacb5d.webp?v=1714839457","width":2000},{"alt":null,"id":23885517946979,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2ceaa80ebc6446fc596085e49999623555a6145_0adb4552-5943-45da-9561-8ff9a63516ce.webp?v=1714839460"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2ceaa80ebc6446fc596085e49999623555a6145_0adb4552-5943-45da-9561-8ff9a63516ce.webp?v=1714839460","width":2000},{"alt":null,"id":23885518372963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a23984b0765bad63835aeb5e3179b2ea56aa77b_dd4475ee-5f02-41df-a76a-251f9e14568a.webp?v=1714839462"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a23984b0765bad63835aeb5e3179b2ea56aa77b_dd4475ee-5f02-41df-a76a-251f9e14568a.webp?v=1714839462","width":2000},{"alt":null,"id":23885518962787,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5abc78d07f72b7a7891ed8f965f08022d292b0f_bc35b282-9fd5-491a-9cb8-ee386d9ab8a9.webp?v=1714839465"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a5abc78d07f72b7a7891ed8f965f08022d292b0f_bc35b282-9fd5-491a-9cb8-ee386d9ab8a9.webp?v=1714839465","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41898075881571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB96","requires_shipping":true,"taxable":true,"featured_image":{"id":31480267112547,"product_id":7411374391395,"position":9,"created_at":"2024-05-05T00:17:42+08:00","updated_at":"2024-05-05T00:17:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a23984b0765bad63835aeb5e3179b2ea56aa77b_dd4475ee-5f02-41df-a76a-251f9e14568a.webp?v=1714839462","variant_ids":[41898075881571]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-PB96","featured_media":{"alt":null,"id":23885518372963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a23984b0765bad63835aeb5e3179b2ea56aa77b_dd4475ee-5f02-41df-a76a-251f9e14568a.webp?v=1714839462"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41898075881571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB96","requires_shipping":true,"taxable":true,"featured_image":{"id":31480267112547,"product_id":7411374391395,"position":9,"created_at":"2024-05-05T00:17:42+08:00","updated_at":"2024-05-05T00:17:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a23984b0765bad63835aeb5e3179b2ea56aa77b_dd4475ee-5f02-41df-a76a-251f9e14568a.webp?v=1714839462","variant_ids":[41898075881571]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 黑武士-Useless to Resist - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126124-PB96","featured_media":{"alt":null,"id":23885518372963,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3a23984b0765bad63835aeb5e3179b2ea56aa77b_dd4475ee-5f02-41df-a76a-251f9e14568a.webp?v=1714839462"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$brand_handle = null;
$type = "";
var sellingStatus
// 只有設計款(SKU 含 '-')才需要合圖
if ($isMerge && $defaultVariant.sku.includes('-')) {
$(document).ready(function() {
var productImg = $product.images[0];
var bumperImg = window.getProductImageUrl($defaultVariant.sku.split('-')[0]);
var layers = ($type === 'mod-nx-backplate' || $type === 'mod-backplate')
? [productImg, bumperImg]
: [bumperImg, productImg];
window.mergeProductImages(layers).then(function (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: "停產"
}