$product = {"id":7415024549987,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 波巴費特-噴漆白","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb06","description":null,"published_at":"2024-06-11T17:55:56+08:00","created_at":"2024-05-05T20:08:35+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":41911058956387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487957401699,"product_id":7415024549987,"position":6,"created_at":"2024-05-05T20:08:48+08:00","updated_at":"2024-05-05T20:08:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f004a64025aa425cd3acbe20de11bc27a89e7fc_3024becb-c3e9-4cfa-bb71-b43776a9ee0d.webp?v=1714910928","variant_ids":[41911058956387]},"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-PB06","featured_media":{"alt":null,"id":23893301624931,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f004a64025aa425cd3acbe20de11bc27a89e7fc_3024becb-c3e9-4cfa-bb71-b43776a9ee0d.webp?v=1714910928"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a721dd1f8d68fb08b9749714ebb92ba957201913_e4a1a1d3-d7b3-4f47-ae7c-55391121f4cb.webp?v=1714910917","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c98810f04dbeabec6b329200be5ff3c772b95cf_711252df-a75f-4bc7-8619-b7fd81e24c36.webp?v=1714910919","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7698f864d48171ac29675d10f7bf2baefc01227c_93e8c224-b0cb-40ce-9457-3e1e9985ab3e.webp?v=1714910922","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf9b913b956734a114c9476be4ddc1ad56471ca7_5ae9e2ed-d1d1-4b70-a855-0b6cfdd4b800.webp?v=1714910924","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/110716396ec67391c11c25191e859ae1ac710664_dd47b6b5-2f3e-444c-a461-31840bd1e607.webp?v=1714910926","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f004a64025aa425cd3acbe20de11bc27a89e7fc_3024becb-c3e9-4cfa-bb71-b43776a9ee0d.webp?v=1714910928","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444f41b938f7693e0ababa496708f9ca8595b94f_cdc9bf00-fd38-45f7-9ebe-2d7b029e77ca.webp?v=1714910931","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3af3d54052858f8fb3e0dd7ec5e0522e014039e2_95c9b7e2-e689-4295-9ba3-3414b3100cc9.webp?v=1714910934","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0a1437261ed8cc383dad34e46b42813d70d80c3_46535ac3-d908-463e-adc9-0fae5fa942da.webp?v=1714910936","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712d6e7515521968a9057c3375c4cfeb625cc081_478500b2-3db5-45b6-a583-844440309ad3.webp?v=1714910938","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50202291f8b8c58e1eb51525aebc1b1e145d5025_0e833f1b-114d-462d-8b74-948a49e1364b.webp?v=1714910941"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a721dd1f8d68fb08b9749714ebb92ba957201913_e4a1a1d3-d7b3-4f47-ae7c-55391121f4cb.webp?v=1714910917","options":["color"],"media":[{"alt":null,"id":23893298872419,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a721dd1f8d68fb08b9749714ebb92ba957201913_e4a1a1d3-d7b3-4f47-ae7c-55391121f4cb.webp?v=1714910917"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a721dd1f8d68fb08b9749714ebb92ba957201913_e4a1a1d3-d7b3-4f47-ae7c-55391121f4cb.webp?v=1714910917","width":2000},{"alt":null,"id":23893299527779,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c98810f04dbeabec6b329200be5ff3c772b95cf_711252df-a75f-4bc7-8619-b7fd81e24c36.webp?v=1714910919"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c98810f04dbeabec6b329200be5ff3c772b95cf_711252df-a75f-4bc7-8619-b7fd81e24c36.webp?v=1714910919","width":2000},{"alt":null,"id":23893300052067,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7698f864d48171ac29675d10f7bf2baefc01227c_93e8c224-b0cb-40ce-9457-3e1e9985ab3e.webp?v=1714910922"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7698f864d48171ac29675d10f7bf2baefc01227c_93e8c224-b0cb-40ce-9457-3e1e9985ab3e.webp?v=1714910922","width":2000},{"alt":null,"id":23893300772963,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf9b913b956734a114c9476be4ddc1ad56471ca7_5ae9e2ed-d1d1-4b70-a855-0b6cfdd4b800.webp?v=1714910924"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cf9b913b956734a114c9476be4ddc1ad56471ca7_5ae9e2ed-d1d1-4b70-a855-0b6cfdd4b800.webp?v=1714910924","width":2000},{"alt":null,"id":23893301264483,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/110716396ec67391c11c25191e859ae1ac710664_dd47b6b5-2f3e-444c-a461-31840bd1e607.webp?v=1714910926"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/110716396ec67391c11c25191e859ae1ac710664_dd47b6b5-2f3e-444c-a461-31840bd1e607.webp?v=1714910926","width":2000},{"alt":null,"id":23893301624931,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f004a64025aa425cd3acbe20de11bc27a89e7fc_3024becb-c3e9-4cfa-bb71-b43776a9ee0d.webp?v=1714910928"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f004a64025aa425cd3acbe20de11bc27a89e7fc_3024becb-c3e9-4cfa-bb71-b43776a9ee0d.webp?v=1714910928","width":2000},{"alt":null,"id":23893302542435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444f41b938f7693e0ababa496708f9ca8595b94f_cdc9bf00-fd38-45f7-9ebe-2d7b029e77ca.webp?v=1714910931"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/444f41b938f7693e0ababa496708f9ca8595b94f_cdc9bf00-fd38-45f7-9ebe-2d7b029e77ca.webp?v=1714910931","width":2000},{"alt":null,"id":23893303263331,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3af3d54052858f8fb3e0dd7ec5e0522e014039e2_95c9b7e2-e689-4295-9ba3-3414b3100cc9.webp?v=1714910934"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3af3d54052858f8fb3e0dd7ec5e0522e014039e2_95c9b7e2-e689-4295-9ba3-3414b3100cc9.webp?v=1714910934","width":2000},{"alt":null,"id":23893303754851,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0a1437261ed8cc383dad34e46b42813d70d80c3_46535ac3-d908-463e-adc9-0fae5fa942da.webp?v=1714910936"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0a1437261ed8cc383dad34e46b42813d70d80c3_46535ac3-d908-463e-adc9-0fae5fa942da.webp?v=1714910936","width":2000},{"alt":null,"id":23893304115299,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712d6e7515521968a9057c3375c4cfeb625cc081_478500b2-3db5-45b6-a583-844440309ad3.webp?v=1714910938"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/712d6e7515521968a9057c3375c4cfeb625cc081_478500b2-3db5-45b6-a583-844440309ad3.webp?v=1714910938","width":2000},{"alt":null,"id":23893305294947,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50202291f8b8c58e1eb51525aebc1b1e145d5025_0e833f1b-114d-462d-8b74-948a49e1364b.webp?v=1714910941"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50202291f8b8c58e1eb51525aebc1b1e145d5025_0e833f1b-114d-462d-8b74-948a49e1364b.webp?v=1714910941","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911058956387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487957401699,"product_id":7415024549987,"position":6,"created_at":"2024-05-05T20:08:48+08:00","updated_at":"2024-05-05T20:08:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f004a64025aa425cd3acbe20de11bc27a89e7fc_3024becb-c3e9-4cfa-bb71-b43776a9ee0d.webp?v=1714910928","variant_ids":[41911058956387]},"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-PB06","featured_media":{"alt":null,"id":23893301624931,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f004a64025aa425cd3acbe20de11bc27a89e7fc_3024becb-c3e9-4cfa-bb71-b43776a9ee0d.webp?v=1714910928"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911058956387,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB06","requires_shipping":true,"taxable":true,"featured_image":{"id":31487957401699,"product_id":7415024549987,"position":6,"created_at":"2024-05-05T20:08:48+08:00","updated_at":"2024-05-05T20:08:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f004a64025aa425cd3acbe20de11bc27a89e7fc_3024becb-c3e9-4cfa-bb71-b43776a9ee0d.webp?v=1714910928","variant_ids":[41911058956387]},"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-PB06","featured_media":{"alt":null,"id":23893301624931,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5f004a64025aa425cd3acbe20de11bc27a89e7fc_3024becb-c3e9-4cfa-bb71-b43776a9ee0d.webp?v=1714910928"}},"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: "停產"
}