$product = {"id":7415001251939,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pb109","description":null,"published_at":"2024-06-11T17:55:18+08:00","created_at":"2024-05-05T20:04:00+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 12 pro max","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":41910810607715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31487892717667,"product_id":7415001251939,"position":6,"created_at":"2024-05-05T20:04:14+08:00","updated_at":"2024-05-05T20:04:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d1b7c7face6da45f1f87bcf0e8059033d1d907_609f4157-6d5d-420a-b61e-dec88c06e245.webp?v=1714910654","variant_ids":[41910810607715]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - 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":"MPB0118724-PB109","featured_media":{"alt":null,"id":23893236711523,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d1b7c7face6da45f1f87bcf0e8059033d1d907_609f4157-6d5d-420a-b61e-dec88c06e245.webp?v=1714910654"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/addb49b40592897851aea70c1b5199d4fafc82e7_08c7ae46-d637-43ec-810e-88622f7f6834.webp?v=1714910642","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0137c217b80d84ec7b7d9ed1c68de1559f497488_575621d5-435d-4011-8e77-ac8919c340c4.webp?v=1714910645","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaddf439fccec53e9d215702a368b7d3beb03452_b315cc29-fae6-455e-a144-eb711c7df938.webp?v=1714910647","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/530e26418363d199b0cf0f92c3fb15d8aa036691_cf6ad498-388b-4fa5-a6ed-ce6b4750e1bb.webp?v=1714910649","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6ab764841bcea5627ac6b3f239a5d9f6fb978d5_ce674260-14da-4ff6-9fb7-e4388e9c73fd.webp?v=1714910652","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d1b7c7face6da45f1f87bcf0e8059033d1d907_609f4157-6d5d-420a-b61e-dec88c06e245.webp?v=1714910654","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b5b7393849652be79ecc592085a57e7e18d8b33_c7bc055a-55ac-4f19-8ff8-033fbf10c1b0.webp?v=1714910657","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/754df0c57502f733840238a6f4ef8f67f561941a_bff571c1-9fa6-4f3d-acaf-d25a8b41a8de.webp?v=1714910659","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0539aca2ac3ea2ace897e52b5452009dd12d24c_4d554530-12d6-4af0-a988-b04ecbb036a1.webp?v=1714910661","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5ac90825f07cc66accb4714bb09018b3f0a89dd_7cc02478-a984-41e7-92c1-529425167ce4.webp?v=1714910664"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/addb49b40592897851aea70c1b5199d4fafc82e7_08c7ae46-d637-43ec-810e-88622f7f6834.webp?v=1714910642","options":["color"],"media":[{"alt":null,"id":23893234647139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/addb49b40592897851aea70c1b5199d4fafc82e7_08c7ae46-d637-43ec-810e-88622f7f6834.webp?v=1714910642"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/addb49b40592897851aea70c1b5199d4fafc82e7_08c7ae46-d637-43ec-810e-88622f7f6834.webp?v=1714910642","width":2000},{"alt":null,"id":23893235236963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0137c217b80d84ec7b7d9ed1c68de1559f497488_575621d5-435d-4011-8e77-ac8919c340c4.webp?v=1714910645"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0137c217b80d84ec7b7d9ed1c68de1559f497488_575621d5-435d-4011-8e77-ac8919c340c4.webp?v=1714910645","width":2000},{"alt":null,"id":23893235499107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaddf439fccec53e9d215702a368b7d3beb03452_b315cc29-fae6-455e-a144-eb711c7df938.webp?v=1714910647"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/eaddf439fccec53e9d215702a368b7d3beb03452_b315cc29-fae6-455e-a144-eb711c7df938.webp?v=1714910647","width":2000},{"alt":null,"id":23893235794019,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/530e26418363d199b0cf0f92c3fb15d8aa036691_cf6ad498-388b-4fa5-a6ed-ce6b4750e1bb.webp?v=1714910649"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/530e26418363d199b0cf0f92c3fb15d8aa036691_cf6ad498-388b-4fa5-a6ed-ce6b4750e1bb.webp?v=1714910649","width":2000},{"alt":null,"id":23893236121699,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6ab764841bcea5627ac6b3f239a5d9f6fb978d5_ce674260-14da-4ff6-9fb7-e4388e9c73fd.webp?v=1714910652"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6ab764841bcea5627ac6b3f239a5d9f6fb978d5_ce674260-14da-4ff6-9fb7-e4388e9c73fd.webp?v=1714910652","width":2000},{"alt":null,"id":23893236711523,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d1b7c7face6da45f1f87bcf0e8059033d1d907_609f4157-6d5d-420a-b61e-dec88c06e245.webp?v=1714910654"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d1b7c7face6da45f1f87bcf0e8059033d1d907_609f4157-6d5d-420a-b61e-dec88c06e245.webp?v=1714910654","width":2000},{"alt":null,"id":23893237563491,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b5b7393849652be79ecc592085a57e7e18d8b33_c7bc055a-55ac-4f19-8ff8-033fbf10c1b0.webp?v=1714910657"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5b5b7393849652be79ecc592085a57e7e18d8b33_c7bc055a-55ac-4f19-8ff8-033fbf10c1b0.webp?v=1714910657","width":2000},{"alt":null,"id":23893237956707,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/754df0c57502f733840238a6f4ef8f67f561941a_bff571c1-9fa6-4f3d-acaf-d25a8b41a8de.webp?v=1714910659"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/754df0c57502f733840238a6f4ef8f67f561941a_bff571c1-9fa6-4f3d-acaf-d25a8b41a8de.webp?v=1714910659","width":2000},{"alt":null,"id":23893238382691,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0539aca2ac3ea2ace897e52b5452009dd12d24c_4d554530-12d6-4af0-a988-b04ecbb036a1.webp?v=1714910661"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0539aca2ac3ea2ace897e52b5452009dd12d24c_4d554530-12d6-4af0-a988-b04ecbb036a1.webp?v=1714910661","width":2000},{"alt":null,"id":23893238808675,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5ac90825f07cc66accb4714bb09018b3f0a89dd_7cc02478-a984-41e7-92c1-529425167ce4.webp?v=1714910664"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5ac90825f07cc66accb4714bb09018b3f0a89dd_7cc02478-a984-41e7-92c1-529425167ce4.webp?v=1714910664","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41910810607715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31487892717667,"product_id":7415001251939,"position":6,"created_at":"2024-05-05T20:04:14+08:00","updated_at":"2024-05-05T20:04:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d1b7c7face6da45f1f87bcf0e8059033d1d907_609f4157-6d5d-420a-b61e-dec88c06e245.webp?v=1714910654","variant_ids":[41910810607715]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - 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":"MPB0118724-PB109","featured_media":{"alt":null,"id":23893236711523,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d1b7c7face6da45f1f87bcf0e8059033d1d907_609f4157-6d5d-420a-b61e-dec88c06e245.webp?v=1714910654"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41910810607715,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31487892717667,"product_id":7415001251939,"position":6,"created_at":"2024-05-05T20:04:14+08:00","updated_at":"2024-05-05T20:04:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d1b7c7face6da45f1f87bcf0e8059033d1d907_609f4157-6d5d-420a-b61e-dec88c06e245.webp?v=1714910654","variant_ids":[41910810607715]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士 - 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":"MPB0118724-PB109","featured_media":{"alt":null,"id":23893236711523,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/23d1b7c7face6da45f1f87bcf0e8059033d1d907_609f4157-6d5d-420a-b61e-dec88c06e245.webp?v=1714910654"}},"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: "停產"
}