$product = {"id":7414961471587,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 風暴兵-噴漆黑","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb01","description":null,"published_at":"2024-06-11T17:54:13+08:00","created_at":"2024-05-05T19:56:28+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":41910388457571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487787663459,"product_id":7414961471587,"position":6,"created_at":"2024-05-05T19:56:43+08:00","updated_at":"2024-05-05T19:56:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c992ae81f31e0c0001448d45a0df22da5e0b4d_d9aa354c-e14e-4846-8567-b6c461e1fec7.webp?v=1714910203","variant_ids":[41910388457571]},"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-PB01","featured_media":{"alt":null,"id":23893131624547,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c992ae81f31e0c0001448d45a0df22da5e0b4d_d9aa354c-e14e-4846-8567-b6c461e1fec7.webp?v=1714910203"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e51876e17d8012481572a29e8f1a31ce5a0459_ba4a2535-6a71-49cc-aad8-a2d4d959ed22.webp?v=1714910191","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e5a06974b2dc7634e8a82c9b304e035683cf744_ef46f725-2024-4d52-9c1c-eecc94b2a03e.webp?v=1714910193","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efcd5e2afc5df0bab045725a28a5f1dd43148a4d_cbd60545-468c-4d72-bdd0-afbdf50469b0.webp?v=1714910196","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b62ffff647d3fc8a32e4433e543f1516e3541a58_e8addbb4-bae0-44c0-8e6e-7c925668bc3c.webp?v=1714910198","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9161564135b8b6403704d67fd6104b4d508178b_94dea556-7473-46ef-9b8d-88e1b88748b8.webp?v=1714910201","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c992ae81f31e0c0001448d45a0df22da5e0b4d_d9aa354c-e14e-4846-8567-b6c461e1fec7.webp?v=1714910203","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9c1304b33108b249444df2141f45f528cf11774_c306e0fc-a6e4-47d8-af5d-bb56550e0a7a.webp?v=1714910207","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4e731f9058a5ddf65c5e5ca6279e8e0b1f4f790_48459d3d-e0f4-431c-9461-ffd19e1dc4f2.webp?v=1714910209","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f6f6d80bdeab862ecca4c6d07e073eabbe06b4_e0476fbd-7734-47b1-8ec8-01b936f3d294.webp?v=1714910212","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e65b1139826dedd0747976fbfa57b08b62477f38_a1ae596f-ffab-483d-85c0-123b035884cf.webp?v=1714910214","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e7868abdeb496b6c8077dcf860d68f18ed0a94_758fb4c0-5d5e-490a-9c51-ddcb829f1e93.webp?v=1714910217"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e51876e17d8012481572a29e8f1a31ce5a0459_ba4a2535-6a71-49cc-aad8-a2d4d959ed22.webp?v=1714910191","options":["color"],"media":[{"alt":null,"id":23893128708195,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e51876e17d8012481572a29e8f1a31ce5a0459_ba4a2535-6a71-49cc-aad8-a2d4d959ed22.webp?v=1714910191"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9e51876e17d8012481572a29e8f1a31ce5a0459_ba4a2535-6a71-49cc-aad8-a2d4d959ed22.webp?v=1714910191","width":2000},{"alt":null,"id":23893129429091,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e5a06974b2dc7634e8a82c9b304e035683cf744_ef46f725-2024-4d52-9c1c-eecc94b2a03e.webp?v=1714910193"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5e5a06974b2dc7634e8a82c9b304e035683cf744_ef46f725-2024-4d52-9c1c-eecc94b2a03e.webp?v=1714910193","width":2000},{"alt":null,"id":23893130182755,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efcd5e2afc5df0bab045725a28a5f1dd43148a4d_cbd60545-468c-4d72-bdd0-afbdf50469b0.webp?v=1714910196"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efcd5e2afc5df0bab045725a28a5f1dd43148a4d_cbd60545-468c-4d72-bdd0-afbdf50469b0.webp?v=1714910196","width":2000},{"alt":null,"id":23893130674275,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b62ffff647d3fc8a32e4433e543f1516e3541a58_e8addbb4-bae0-44c0-8e6e-7c925668bc3c.webp?v=1714910198"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b62ffff647d3fc8a32e4433e543f1516e3541a58_e8addbb4-bae0-44c0-8e6e-7c925668bc3c.webp?v=1714910198","width":2000},{"alt":null,"id":23893131067491,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9161564135b8b6403704d67fd6104b4d508178b_94dea556-7473-46ef-9b8d-88e1b88748b8.webp?v=1714910201"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f9161564135b8b6403704d67fd6104b4d508178b_94dea556-7473-46ef-9b8d-88e1b88748b8.webp?v=1714910201","width":2000},{"alt":null,"id":23893131624547,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c992ae81f31e0c0001448d45a0df22da5e0b4d_d9aa354c-e14e-4846-8567-b6c461e1fec7.webp?v=1714910203"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c992ae81f31e0c0001448d45a0df22da5e0b4d_d9aa354c-e14e-4846-8567-b6c461e1fec7.webp?v=1714910203","width":2000},{"alt":null,"id":23893132345443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9c1304b33108b249444df2141f45f528cf11774_c306e0fc-a6e4-47d8-af5d-bb56550e0a7a.webp?v=1714910207"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e9c1304b33108b249444df2141f45f528cf11774_c306e0fc-a6e4-47d8-af5d-bb56550e0a7a.webp?v=1714910207","width":2000},{"alt":null,"id":23893133328483,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4e731f9058a5ddf65c5e5ca6279e8e0b1f4f790_48459d3d-e0f4-431c-9461-ffd19e1dc4f2.webp?v=1714910209"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4e731f9058a5ddf65c5e5ca6279e8e0b1f4f790_48459d3d-e0f4-431c-9461-ffd19e1dc4f2.webp?v=1714910209","width":2000},{"alt":null,"id":23893133754467,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f6f6d80bdeab862ecca4c6d07e073eabbe06b4_e0476fbd-7734-47b1-8ec8-01b936f3d294.webp?v=1714910212"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/19f6f6d80bdeab862ecca4c6d07e073eabbe06b4_e0476fbd-7734-47b1-8ec8-01b936f3d294.webp?v=1714910212","width":2000},{"alt":null,"id":23893134245987,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e65b1139826dedd0747976fbfa57b08b62477f38_a1ae596f-ffab-483d-85c0-123b035884cf.webp?v=1714910214"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e65b1139826dedd0747976fbfa57b08b62477f38_a1ae596f-ffab-483d-85c0-123b035884cf.webp?v=1714910214","width":2000},{"alt":null,"id":23893134835811,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e7868abdeb496b6c8077dcf860d68f18ed0a94_758fb4c0-5d5e-490a-9c51-ddcb829f1e93.webp?v=1714910217"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96e7868abdeb496b6c8077dcf860d68f18ed0a94_758fb4c0-5d5e-490a-9c51-ddcb829f1e93.webp?v=1714910217","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41910388457571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487787663459,"product_id":7414961471587,"position":6,"created_at":"2024-05-05T19:56:43+08:00","updated_at":"2024-05-05T19:56:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c992ae81f31e0c0001448d45a0df22da5e0b4d_d9aa354c-e14e-4846-8567-b6c461e1fec7.webp?v=1714910203","variant_ids":[41910388457571]},"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-PB01","featured_media":{"alt":null,"id":23893131624547,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c992ae81f31e0c0001448d45a0df22da5e0b4d_d9aa354c-e14e-4846-8567-b6c461e1fec7.webp?v=1714910203"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41910388457571,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31487787663459,"product_id":7414961471587,"position":6,"created_at":"2024-05-05T19:56:43+08:00","updated_at":"2024-05-05T19:56:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c992ae81f31e0c0001448d45a0df22da5e0b4d_d9aa354c-e14e-4846-8567-b6c461e1fec7.webp?v=1714910203","variant_ids":[41910388457571]},"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-PB01","featured_media":{"alt":null,"id":23893131624547,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/57c992ae81f31e0c0001448d45a0df22da5e0b4d_d9aa354c-e14e-4846-8567-b6c461e1fec7.webp?v=1714910203"}},"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: "停產"
}