$product = {"id":7414961012835,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 波巴費特-線稿風格白","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb52","description":null,"published_at":"2024-06-11T17:54:12+08:00","created_at":"2024-05-05T19:56:24+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":41910381969507,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB52","requires_shipping":true,"taxable":true,"featured_image":{"id":31487788679267,"product_id":7414961012835,"position":10,"created_at":"2024-05-05T19:56:48+08:00","updated_at":"2024-05-05T19:56:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0b2c921272f2e705faeda143fe88c61dc6380b_50af32b2-48ff-46f9-aedf-a200bd59088a.webp?v=1714910208","variant_ids":[41910381969507]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 波巴費特-線稿風格白 - 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-PB52","featured_media":{"alt":null,"id":23893132673123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0b2c921272f2e705faeda143fe88c61dc6380b_50af32b2-48ff-46f9-aedf-a200bd59088a.webp?v=1714910208"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ee056a5c429ab56e264a07a0af40cdf3d81aec_59df8ab7-76d9-4a85-b963-ffeffc31d5d5.webp?v=1714910187","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17e35ce509d6a2d68596118d5a80412f2eeab070_7fc8a758-c8ee-4a00-b983-1252a80de756.webp?v=1714910189","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d4253f59b8102321c249936ff1eed4699c675f8_219c1f0b-229c-4d24-93c1-c10ce621f3a4.webp?v=1714910191","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1941be183e1b00ca84e9ed1f32de9c61d99b36fa_34227d95-e9b0-48e5-beb3-b22f727e388b.webp?v=1714910194","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43057b0838e6ab867663cf80d60ea5baf188890b_edf22857-bea9-4715-88e8-9e568c1c0e44.webp?v=1714910196","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86352adfd9f019a10949b37650de235f18be1725_d84ebe4e-1ea6-44ed-b9aa-5be2fb32e8f5.webp?v=1714910198","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/061c7153384b7ee14da08f56ae89660c9959ad95_6c4ca98c-df03-4e37-8669-89f0d4a37210.webp?v=1714910201","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077a0d8ce0af122dcee0a618b9a2e7a4e9bcb453_f1bda144-ebf1-44fb-aa5e-6c974c1976c6.webp?v=1714910203","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/872e5208697e028ea670ae0f4aa5e3afb90bff6d_dc251c8b-def9-4d2e-ab08-a5a2d1fd6e85.webp?v=1714910206","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0b2c921272f2e705faeda143fe88c61dc6380b_50af32b2-48ff-46f9-aedf-a200bd59088a.webp?v=1714910208","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef4c033bf4c29d91f76e8e23f4dbf6cb216ad27e_4fdd835f-3fb5-4d21-976d-6c1024170a6b.webp?v=1714910210"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ee056a5c429ab56e264a07a0af40cdf3d81aec_59df8ab7-76d9-4a85-b963-ffeffc31d5d5.webp?v=1714910187","options":["color"],"media":[{"alt":null,"id":23893127561315,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ee056a5c429ab56e264a07a0af40cdf3d81aec_59df8ab7-76d9-4a85-b963-ffeffc31d5d5.webp?v=1714910187"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1ee056a5c429ab56e264a07a0af40cdf3d81aec_59df8ab7-76d9-4a85-b963-ffeffc31d5d5.webp?v=1714910187","width":2000},{"alt":null,"id":23893128052835,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17e35ce509d6a2d68596118d5a80412f2eeab070_7fc8a758-c8ee-4a00-b983-1252a80de756.webp?v=1714910189"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17e35ce509d6a2d68596118d5a80412f2eeab070_7fc8a758-c8ee-4a00-b983-1252a80de756.webp?v=1714910189","width":2000},{"alt":null,"id":23893128740963,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d4253f59b8102321c249936ff1eed4699c675f8_219c1f0b-229c-4d24-93c1-c10ce621f3a4.webp?v=1714910191"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d4253f59b8102321c249936ff1eed4699c675f8_219c1f0b-229c-4d24-93c1-c10ce621f3a4.webp?v=1714910191","width":2000},{"alt":null,"id":23893129527395,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1941be183e1b00ca84e9ed1f32de9c61d99b36fa_34227d95-e9b0-48e5-beb3-b22f727e388b.webp?v=1714910194"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1941be183e1b00ca84e9ed1f32de9c61d99b36fa_34227d95-e9b0-48e5-beb3-b22f727e388b.webp?v=1714910194","width":2000},{"alt":null,"id":23893130149987,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43057b0838e6ab867663cf80d60ea5baf188890b_edf22857-bea9-4715-88e8-9e568c1c0e44.webp?v=1714910196"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43057b0838e6ab867663cf80d60ea5baf188890b_edf22857-bea9-4715-88e8-9e568c1c0e44.webp?v=1714910196","width":2000},{"alt":null,"id":23893130707043,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86352adfd9f019a10949b37650de235f18be1725_d84ebe4e-1ea6-44ed-b9aa-5be2fb32e8f5.webp?v=1714910198"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/86352adfd9f019a10949b37650de235f18be1725_d84ebe4e-1ea6-44ed-b9aa-5be2fb32e8f5.webp?v=1714910198","width":2000},{"alt":null,"id":23893131100259,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/061c7153384b7ee14da08f56ae89660c9959ad95_6c4ca98c-df03-4e37-8669-89f0d4a37210.webp?v=1714910201"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/061c7153384b7ee14da08f56ae89660c9959ad95_6c4ca98c-df03-4e37-8669-89f0d4a37210.webp?v=1714910201","width":2000},{"alt":null,"id":23893131690083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077a0d8ce0af122dcee0a618b9a2e7a4e9bcb453_f1bda144-ebf1-44fb-aa5e-6c974c1976c6.webp?v=1714910203"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/077a0d8ce0af122dcee0a618b9a2e7a4e9bcb453_f1bda144-ebf1-44fb-aa5e-6c974c1976c6.webp?v=1714910203","width":2000},{"alt":null,"id":23893132017763,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/872e5208697e028ea670ae0f4aa5e3afb90bff6d_dc251c8b-def9-4d2e-ab08-a5a2d1fd6e85.webp?v=1714910206"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/872e5208697e028ea670ae0f4aa5e3afb90bff6d_dc251c8b-def9-4d2e-ab08-a5a2d1fd6e85.webp?v=1714910206","width":2000},{"alt":null,"id":23893132673123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0b2c921272f2e705faeda143fe88c61dc6380b_50af32b2-48ff-46f9-aedf-a200bd59088a.webp?v=1714910208"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0b2c921272f2e705faeda143fe88c61dc6380b_50af32b2-48ff-46f9-aedf-a200bd59088a.webp?v=1714910208","width":2000},{"alt":null,"id":23893133361251,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef4c033bf4c29d91f76e8e23f4dbf6cb216ad27e_4fdd835f-3fb5-4d21-976d-6c1024170a6b.webp?v=1714910210"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ef4c033bf4c29d91f76e8e23f4dbf6cb216ad27e_4fdd835f-3fb5-4d21-976d-6c1024170a6b.webp?v=1714910210","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41910381969507,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB52","requires_shipping":true,"taxable":true,"featured_image":{"id":31487788679267,"product_id":7414961012835,"position":10,"created_at":"2024-05-05T19:56:48+08:00","updated_at":"2024-05-05T19:56:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0b2c921272f2e705faeda143fe88c61dc6380b_50af32b2-48ff-46f9-aedf-a200bd59088a.webp?v=1714910208","variant_ids":[41910381969507]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 波巴費特-線稿風格白 - 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-PB52","featured_media":{"alt":null,"id":23893132673123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0b2c921272f2e705faeda143fe88c61dc6380b_50af32b2-48ff-46f9-aedf-a200bd59088a.webp?v=1714910208"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41910381969507,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB52","requires_shipping":true,"taxable":true,"featured_image":{"id":31487788679267,"product_id":7414961012835,"position":10,"created_at":"2024-05-05T19:56:48+08:00","updated_at":"2024-05-05T19:56:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0b2c921272f2e705faeda143fe88c61dc6380b_50af32b2-48ff-46f9-aedf-a200bd59088a.webp?v=1714910208","variant_ids":[41910381969507]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 波巴費特-線稿風格白 - 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-PB52","featured_media":{"alt":null,"id":23893132673123,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ec0b2c921272f2e705faeda143fe88c61dc6380b_50af32b2-48ff-46f9-aedf-a200bd59088a.webp?v=1714910208"}},"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: "停產"
}