$product = {"id":7415065378915,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 路克 vs 黑武士","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb109","description":null,"published_at":"2024-06-11T17:57:02+08:00","created_at":"2024-05-05T20:16:11+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 mini","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":41911504502883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31488066879587,"product_id":7415065378915,"position":10,"created_at":"2024-05-05T20:16:35+08:00","updated_at":"2024-05-05T20:16:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e468c9de2cd168c6d9459f563687cedab170a6c6_6bb826ff-80f5-4a46-b948-68a97e367aa0.webp?v=1714911395","variant_ids":[41911504502883]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 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":"MPB0118424-PB109","featured_media":{"alt":null,"id":23893411004515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e468c9de2cd168c6d9459f563687cedab170a6c6_6bb826ff-80f5-4a46-b948-68a97e367aa0.webp?v=1714911395"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00be4174ba68be35384d9622cf79f3e1e3b1c447_59dd7679-06df-487f-9d2b-2e6e6df08a39.webp?v=1714911373","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e9295638902da16c3b18425802ae060b01bf43f_a6e4447d-2255-4563-8205-a91149b73861.webp?v=1714911376","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e85225bf98be1dcdd8dea9251e4bcd184c031ee8_07c848da-5ee8-448a-8706-0a136094393f.webp?v=1714911378","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d29de3b3ed64ccc66fa45efc3d0bf5a8f498668_b90f3d76-65ce-4ef0-a896-430a4bf1b5e2.webp?v=1714911380","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d3399be3eb853afd51ff3f2cb0f26d3ed6fdc37_f72f47dc-7cc7-4c65-b89c-b0cfa1ef36cc.webp?v=1714911383","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ab59cde7abaffc22ed1428cef1300a67cbebbdf_4100d28b-8368-49b7-adbc-d75c996470d6.webp?v=1714911385","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8839ba08ef89d69f6077c4e715af8d22f4f65f32_a9ec36d8-938a-4e91-8536-e1c19d2137c1.webp?v=1714911388","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/731d5cf9bafd5fa91b26dedea0a45b43270dcfec_34b0ec7c-e54d-48d4-9c67-86b2b0895412.webp?v=1714911390","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8162d618fb455220f58941a421e94dc5d8e93189_c898096e-bd11-45ae-afcb-f6f7aea87dbd.webp?v=1714911392","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e468c9de2cd168c6d9459f563687cedab170a6c6_6bb826ff-80f5-4a46-b948-68a97e367aa0.webp?v=1714911395","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af6a23dfbe27aafb57bfa140941808363d4b9f8b_d8e42ad0-c990-4fdf-8a12-ade7327b8cbb.webp?v=1714911398"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00be4174ba68be35384d9622cf79f3e1e3b1c447_59dd7679-06df-487f-9d2b-2e6e6df08a39.webp?v=1714911373","options":["color"],"media":[{"alt":null,"id":23893406220387,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00be4174ba68be35384d9622cf79f3e1e3b1c447_59dd7679-06df-487f-9d2b-2e6e6df08a39.webp?v=1714911373"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/00be4174ba68be35384d9622cf79f3e1e3b1c447_59dd7679-06df-487f-9d2b-2e6e6df08a39.webp?v=1714911373","width":2000},{"alt":null,"id":23893406646371,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e9295638902da16c3b18425802ae060b01bf43f_a6e4447d-2255-4563-8205-a91149b73861.webp?v=1714911376"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e9295638902da16c3b18425802ae060b01bf43f_a6e4447d-2255-4563-8205-a91149b73861.webp?v=1714911376","width":2000},{"alt":null,"id":23893407531107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e85225bf98be1dcdd8dea9251e4bcd184c031ee8_07c848da-5ee8-448a-8706-0a136094393f.webp?v=1714911378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e85225bf98be1dcdd8dea9251e4bcd184c031ee8_07c848da-5ee8-448a-8706-0a136094393f.webp?v=1714911378","width":2000},{"alt":null,"id":23893407957091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d29de3b3ed64ccc66fa45efc3d0bf5a8f498668_b90f3d76-65ce-4ef0-a896-430a4bf1b5e2.webp?v=1714911380"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d29de3b3ed64ccc66fa45efc3d0bf5a8f498668_b90f3d76-65ce-4ef0-a896-430a4bf1b5e2.webp?v=1714911380","width":2000},{"alt":null,"id":23893408415843,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d3399be3eb853afd51ff3f2cb0f26d3ed6fdc37_f72f47dc-7cc7-4c65-b89c-b0cfa1ef36cc.webp?v=1714911383"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d3399be3eb853afd51ff3f2cb0f26d3ed6fdc37_f72f47dc-7cc7-4c65-b89c-b0cfa1ef36cc.webp?v=1714911383","width":2000},{"alt":null,"id":23893408809059,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ab59cde7abaffc22ed1428cef1300a67cbebbdf_4100d28b-8368-49b7-adbc-d75c996470d6.webp?v=1714911385"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ab59cde7abaffc22ed1428cef1300a67cbebbdf_4100d28b-8368-49b7-adbc-d75c996470d6.webp?v=1714911385","width":2000},{"alt":null,"id":23893409300579,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8839ba08ef89d69f6077c4e715af8d22f4f65f32_a9ec36d8-938a-4e91-8536-e1c19d2137c1.webp?v=1714911388"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8839ba08ef89d69f6077c4e715af8d22f4f65f32_a9ec36d8-938a-4e91-8536-e1c19d2137c1.webp?v=1714911388","width":2000},{"alt":null,"id":23893409661027,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/731d5cf9bafd5fa91b26dedea0a45b43270dcfec_34b0ec7c-e54d-48d4-9c67-86b2b0895412.webp?v=1714911390"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/731d5cf9bafd5fa91b26dedea0a45b43270dcfec_34b0ec7c-e54d-48d4-9c67-86b2b0895412.webp?v=1714911390","width":2000},{"alt":null,"id":23893410283619,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8162d618fb455220f58941a421e94dc5d8e93189_c898096e-bd11-45ae-afcb-f6f7aea87dbd.webp?v=1714911392"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8162d618fb455220f58941a421e94dc5d8e93189_c898096e-bd11-45ae-afcb-f6f7aea87dbd.webp?v=1714911392","width":2000},{"alt":null,"id":23893411004515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e468c9de2cd168c6d9459f563687cedab170a6c6_6bb826ff-80f5-4a46-b948-68a97e367aa0.webp?v=1714911395"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e468c9de2cd168c6d9459f563687cedab170a6c6_6bb826ff-80f5-4a46-b948-68a97e367aa0.webp?v=1714911395","width":2000},{"alt":null,"id":23893412085859,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af6a23dfbe27aafb57bfa140941808363d4b9f8b_d8e42ad0-c990-4fdf-8a12-ade7327b8cbb.webp?v=1714911398"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/af6a23dfbe27aafb57bfa140941808363d4b9f8b_d8e42ad0-c990-4fdf-8a12-ade7327b8cbb.webp?v=1714911398","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911504502883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31488066879587,"product_id":7415065378915,"position":10,"created_at":"2024-05-05T20:16:35+08:00","updated_at":"2024-05-05T20:16:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e468c9de2cd168c6d9459f563687cedab170a6c6_6bb826ff-80f5-4a46-b948-68a97e367aa0.webp?v=1714911395","variant_ids":[41911504502883]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 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":"MPB0118424-PB109","featured_media":{"alt":null,"id":23893411004515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e468c9de2cd168c6d9459f563687cedab170a6c6_6bb826ff-80f5-4a46-b948-68a97e367aa0.webp?v=1714911395"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911504502883,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB109","requires_shipping":true,"taxable":true,"featured_image":{"id":31488066879587,"product_id":7415065378915,"position":10,"created_at":"2024-05-05T20:16:35+08:00","updated_at":"2024-05-05T20:16:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e468c9de2cd168c6d9459f563687cedab170a6c6_6bb826ff-80f5-4a46-b948-68a97e367aa0.webp?v=1714911395","variant_ids":[41911504502883]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 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":"MPB0118424-PB109","featured_media":{"alt":null,"id":23893411004515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e468c9de2cd168c6d9459f563687cedab170a6c6_6bb826ff-80f5-4a46-b948-68a97e367aa0.webp?v=1714911395"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$type = "";
var sellingStatus
if ($isMerge) {
$(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: "停產"
}