$product = {"id":7414932701283,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具1-白","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb10","description":null,"published_at":"2024-06-11T17:53:26+08:00","created_at":"2024-05-05T19:51:22+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":41910076112995,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31487718228067,"product_id":7414932701283,"position":9,"created_at":"2024-05-05T19:51:43+08:00","updated_at":"2024-05-05T19:51:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c74b6dce7002fc440687464f61cb94b47de30_453937a8-1d77-440f-bf32-f4cacc4ee8fb.webp?v=1714909903","variant_ids":[41910076112995]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具1-白 - 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-PB10","featured_media":{"alt":null,"id":23893062090851,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c74b6dce7002fc440687464f61cb94b47de30_453937a8-1d77-440f-bf32-f4cacc4ee8fb.webp?v=1714909903"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d65dceadce4578227b572d0b91759918658adbc_98fdc467-bd87-4b63-a609-24e6d3b26be7.webp?v=1714909884","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d1f808e82355f396e76836e79c61b9f7d1d8ba0_56544f86-c870-446c-8861-5e8b54ceedc5.webp?v=1714909887","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b76ae0f640b9c4a6c9d8f072d3d661fe55ca9b2_d27f933b-9610-4219-a201-5ec95f721409.webp?v=1714909889","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38390229994bd0a1421b4ab16fa40458c4a5b3d6_0a5b34e8-22f9-4687-bec0-d2f10438fcee.webp?v=1714909891","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a34fc6140f599d0cd925eeedb18d700567c04ef2_d19b62a0-a756-4e1a-b0e6-7fecf1e80400.webp?v=1714909894","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab6af33c7a121d28ec200e440395b82dbe2f682d_9bd80727-5441-463d-9c2a-7c1f9180a309.webp?v=1714909896","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2231694940de16c917405d9104a3108096b04d1f_b7567a23-cdbd-4754-90bd-b21a1fcb7243.webp?v=1714909898","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27c7c6cafd2fda063711de5812036af1f1f08115_f3894aed-e1c4-4489-a72d-ea3366460ef2.webp?v=1714909901","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c74b6dce7002fc440687464f61cb94b47de30_453937a8-1d77-440f-bf32-f4cacc4ee8fb.webp?v=1714909903","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fcd0ba1bf814014e2860695a9314d123d481d46_ca13be98-a0ab-4291-a288-81248b37e668.webp?v=1714909905","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4974312856da998140d88296e225a83f1a7cac6d_4c5d2b1b-8288-4c3c-b464-f6af3b78a96a.webp?v=1714909908"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d65dceadce4578227b572d0b91759918658adbc_98fdc467-bd87-4b63-a609-24e6d3b26be7.webp?v=1714909884","options":["color"],"media":[{"alt":null,"id":23893057536099,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d65dceadce4578227b572d0b91759918658adbc_98fdc467-bd87-4b63-a609-24e6d3b26be7.webp?v=1714909884"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8d65dceadce4578227b572d0b91759918658adbc_98fdc467-bd87-4b63-a609-24e6d3b26be7.webp?v=1714909884","width":2000},{"alt":null,"id":23893057798243,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d1f808e82355f396e76836e79c61b9f7d1d8ba0_56544f86-c870-446c-8861-5e8b54ceedc5.webp?v=1714909887"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d1f808e82355f396e76836e79c61b9f7d1d8ba0_56544f86-c870-446c-8861-5e8b54ceedc5.webp?v=1714909887","width":2000},{"alt":null,"id":23893058650211,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b76ae0f640b9c4a6c9d8f072d3d661fe55ca9b2_d27f933b-9610-4219-a201-5ec95f721409.webp?v=1714909889"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b76ae0f640b9c4a6c9d8f072d3d661fe55ca9b2_d27f933b-9610-4219-a201-5ec95f721409.webp?v=1714909889","width":2000},{"alt":null,"id":23893059010659,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38390229994bd0a1421b4ab16fa40458c4a5b3d6_0a5b34e8-22f9-4687-bec0-d2f10438fcee.webp?v=1714909891"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/38390229994bd0a1421b4ab16fa40458c4a5b3d6_0a5b34e8-22f9-4687-bec0-d2f10438fcee.webp?v=1714909891","width":2000},{"alt":null,"id":23893059534947,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a34fc6140f599d0cd925eeedb18d700567c04ef2_d19b62a0-a756-4e1a-b0e6-7fecf1e80400.webp?v=1714909894"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a34fc6140f599d0cd925eeedb18d700567c04ef2_d19b62a0-a756-4e1a-b0e6-7fecf1e80400.webp?v=1714909894","width":2000},{"alt":null,"id":23893059928163,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab6af33c7a121d28ec200e440395b82dbe2f682d_9bd80727-5441-463d-9c2a-7c1f9180a309.webp?v=1714909896"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab6af33c7a121d28ec200e440395b82dbe2f682d_9bd80727-5441-463d-9c2a-7c1f9180a309.webp?v=1714909896","width":2000},{"alt":null,"id":23893061075043,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2231694940de16c917405d9104a3108096b04d1f_b7567a23-cdbd-4754-90bd-b21a1fcb7243.webp?v=1714909898"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2231694940de16c917405d9104a3108096b04d1f_b7567a23-cdbd-4754-90bd-b21a1fcb7243.webp?v=1714909898","width":2000},{"alt":null,"id":23893061501027,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27c7c6cafd2fda063711de5812036af1f1f08115_f3894aed-e1c4-4489-a72d-ea3366460ef2.webp?v=1714909901"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27c7c6cafd2fda063711de5812036af1f1f08115_f3894aed-e1c4-4489-a72d-ea3366460ef2.webp?v=1714909901","width":2000},{"alt":null,"id":23893062090851,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c74b6dce7002fc440687464f61cb94b47de30_453937a8-1d77-440f-bf32-f4cacc4ee8fb.webp?v=1714909903"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c74b6dce7002fc440687464f61cb94b47de30_453937a8-1d77-440f-bf32-f4cacc4ee8fb.webp?v=1714909903","width":2000},{"alt":null,"id":23893062451299,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fcd0ba1bf814014e2860695a9314d123d481d46_ca13be98-a0ab-4291-a288-81248b37e668.webp?v=1714909905"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fcd0ba1bf814014e2860695a9314d123d481d46_ca13be98-a0ab-4291-a288-81248b37e668.webp?v=1714909905","width":2000},{"alt":null,"id":23893063041123,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4974312856da998140d88296e225a83f1a7cac6d_4c5d2b1b-8288-4c3c-b464-f6af3b78a96a.webp?v=1714909908"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4974312856da998140d88296e225a83f1a7cac6d_4c5d2b1b-8288-4c3c-b464-f6af3b78a96a.webp?v=1714909908","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41910076112995,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31487718228067,"product_id":7414932701283,"position":9,"created_at":"2024-05-05T19:51:43+08:00","updated_at":"2024-05-05T19:51:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c74b6dce7002fc440687464f61cb94b47de30_453937a8-1d77-440f-bf32-f4cacc4ee8fb.webp?v=1714909903","variant_ids":[41910076112995]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具1-白 - 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-PB10","featured_media":{"alt":null,"id":23893062090851,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c74b6dce7002fc440687464f61cb94b47de30_453937a8-1d77-440f-bf32-f4cacc4ee8fb.webp?v=1714909903"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41910076112995,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB10","requires_shipping":true,"taxable":true,"featured_image":{"id":31487718228067,"product_id":7414932701283,"position":9,"created_at":"2024-05-05T19:51:43+08:00","updated_at":"2024-05-05T19:51:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c74b6dce7002fc440687464f61cb94b47de30_453937a8-1d77-440f-bf32-f4cacc4ee8fb.webp?v=1714909903","variant_ids":[41910076112995]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具1-白 - 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-PB10","featured_media":{"alt":null,"id":23893062090851,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/714c74b6dce7002fc440687464f61cb94b47de30_453937a8-1d77-440f-bf32-f4cacc4ee8fb.webp?v=1714909903"}},"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: "停產"
}