$product = {"id":7415078649955,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - POP全載具1-黑","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb09","description":null,"published_at":"2024-06-11T17:57:23+08:00","created_at":"2024-05-05T20:18:42+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":41911642194019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488099811427,"product_id":7415078649955,"position":1,"created_at":"2024-05-05T20:18:44+08:00","updated_at":"2024-05-05T20:18:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8357487e127c418a672bfc18cd77d84a60108_6a2f7397-d8aa-4dbe-ac93-7ec16e71155f.webp?v=1714911524","variant_ids":[41911642194019]},"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-PB09","featured_media":{"alt":null,"id":23893444296803,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8357487e127c418a672bfc18cd77d84a60108_6a2f7397-d8aa-4dbe-ac93-7ec16e71155f.webp?v=1714911524"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8357487e127c418a672bfc18cd77d84a60108_6a2f7397-d8aa-4dbe-ac93-7ec16e71155f.webp?v=1714911524","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b6e41402105512526236586dc224f843bd7095_795dc18e-30d9-4671-91a6-dcd055eae111.webp?v=1714911527","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7272d022a968bb13b5e9a3b3e2d0e54229e44c35_bfc1c21e-9988-4b2f-8522-58d632aae61b.webp?v=1714911529","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee3dc3f932c17f70c3d207b08f419ed018dcd1d5_6c5ae437-dd5d-4bfa-a5a4-8ae4c09965ae.webp?v=1714911532","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/978fe8a6fcb0ebbe5534f522c26fc646be4c1a4a_e43b21a9-01e1-482b-b177-a5d57e9321be.webp?v=1714911534","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68d554c72836be0514d1cd4cf8f0a010874315b5_c3f409fc-c5fe-4f15-8cd5-2a44151c32ac.webp?v=1714911537","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ea8316510e5b86aa633be7cde17700e127204b0_e2f67eff-2934-40d2-b228-cd41a48717ab.webp?v=1714911539","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41688ca8484f2222da579ee5d05a2c3fbfdfb01c_ac754272-0ed1-4350-91ac-31c57bcc2955.webp?v=1714911542","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1d753c5e04a5e8df484b9dfcaafe4f2c9be3f8e_7a113171-384c-416e-85ac-a4d87caad140.webp?v=1714911544","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3b65bd854a994b72434a65e846fa7d17c539a04_fa6a0f84-9376-43d9-867d-e16d5baaecfb.webp?v=1714911547","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2f6e39a9d6465a8717366d271f2c7c0c46e2a2a_a1b63f9d-4780-4fd2-851c-8739a0a5bc45.webp?v=1714911549"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8357487e127c418a672bfc18cd77d84a60108_6a2f7397-d8aa-4dbe-ac93-7ec16e71155f.webp?v=1714911524","options":["color"],"media":[{"alt":null,"id":23893444296803,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8357487e127c418a672bfc18cd77d84a60108_6a2f7397-d8aa-4dbe-ac93-7ec16e71155f.webp?v=1714911524"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8357487e127c418a672bfc18cd77d84a60108_6a2f7397-d8aa-4dbe-ac93-7ec16e71155f.webp?v=1714911524","width":2000},{"alt":null,"id":23893445214307,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b6e41402105512526236586dc224f843bd7095_795dc18e-30d9-4671-91a6-dcd055eae111.webp?v=1714911527"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f1b6e41402105512526236586dc224f843bd7095_795dc18e-30d9-4671-91a6-dcd055eae111.webp?v=1714911527","width":2000},{"alt":null,"id":23893445574755,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7272d022a968bb13b5e9a3b3e2d0e54229e44c35_bfc1c21e-9988-4b2f-8522-58d632aae61b.webp?v=1714911529"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7272d022a968bb13b5e9a3b3e2d0e54229e44c35_bfc1c21e-9988-4b2f-8522-58d632aae61b.webp?v=1714911529","width":2000},{"alt":null,"id":23893446230115,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee3dc3f932c17f70c3d207b08f419ed018dcd1d5_6c5ae437-dd5d-4bfa-a5a4-8ae4c09965ae.webp?v=1714911532"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ee3dc3f932c17f70c3d207b08f419ed018dcd1d5_6c5ae437-dd5d-4bfa-a5a4-8ae4c09965ae.webp?v=1714911532","width":2000},{"alt":null,"id":23893446656099,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/978fe8a6fcb0ebbe5534f522c26fc646be4c1a4a_e43b21a9-01e1-482b-b177-a5d57e9321be.webp?v=1714911534"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/978fe8a6fcb0ebbe5534f522c26fc646be4c1a4a_e43b21a9-01e1-482b-b177-a5d57e9321be.webp?v=1714911534","width":2000},{"alt":null,"id":23893447213155,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68d554c72836be0514d1cd4cf8f0a010874315b5_c3f409fc-c5fe-4f15-8cd5-2a44151c32ac.webp?v=1714911537"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/68d554c72836be0514d1cd4cf8f0a010874315b5_c3f409fc-c5fe-4f15-8cd5-2a44151c32ac.webp?v=1714911537","width":2000},{"alt":null,"id":23893447606371,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ea8316510e5b86aa633be7cde17700e127204b0_e2f67eff-2934-40d2-b228-cd41a48717ab.webp?v=1714911539"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ea8316510e5b86aa633be7cde17700e127204b0_e2f67eff-2934-40d2-b228-cd41a48717ab.webp?v=1714911539","width":2000},{"alt":null,"id":23893448163427,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41688ca8484f2222da579ee5d05a2c3fbfdfb01c_ac754272-0ed1-4350-91ac-31c57bcc2955.webp?v=1714911542"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41688ca8484f2222da579ee5d05a2c3fbfdfb01c_ac754272-0ed1-4350-91ac-31c57bcc2955.webp?v=1714911542","width":2000},{"alt":null,"id":23893449343075,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1d753c5e04a5e8df484b9dfcaafe4f2c9be3f8e_7a113171-384c-416e-85ac-a4d87caad140.webp?v=1714911544"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1d753c5e04a5e8df484b9dfcaafe4f2c9be3f8e_7a113171-384c-416e-85ac-a4d87caad140.webp?v=1714911544","width":2000},{"alt":null,"id":23893449834595,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3b65bd854a994b72434a65e846fa7d17c539a04_fa6a0f84-9376-43d9-867d-e16d5baaecfb.webp?v=1714911547"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e3b65bd854a994b72434a65e846fa7d17c539a04_fa6a0f84-9376-43d9-867d-e16d5baaecfb.webp?v=1714911547","width":2000},{"alt":null,"id":23893450391651,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2f6e39a9d6465a8717366d271f2c7c0c46e2a2a_a1b63f9d-4780-4fd2-851c-8739a0a5bc45.webp?v=1714911549"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2f6e39a9d6465a8717366d271f2c7c0c46e2a2a_a1b63f9d-4780-4fd2-851c-8739a0a5bc45.webp?v=1714911549","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911642194019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488099811427,"product_id":7415078649955,"position":1,"created_at":"2024-05-05T20:18:44+08:00","updated_at":"2024-05-05T20:18:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8357487e127c418a672bfc18cd77d84a60108_6a2f7397-d8aa-4dbe-ac93-7ec16e71155f.webp?v=1714911524","variant_ids":[41911642194019]},"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-PB09","featured_media":{"alt":null,"id":23893444296803,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8357487e127c418a672bfc18cd77d84a60108_6a2f7397-d8aa-4dbe-ac93-7ec16e71155f.webp?v=1714911524"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911642194019,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB09","requires_shipping":true,"taxable":true,"featured_image":{"id":31488099811427,"product_id":7415078649955,"position":1,"created_at":"2024-05-05T20:18:44+08:00","updated_at":"2024-05-05T20:18:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8357487e127c418a672bfc18cd77d84a60108_6a2f7397-d8aa-4dbe-ac93-7ec16e71155f.webp?v=1714911524","variant_ids":[41911642194019]},"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-PB09","featured_media":{"alt":null,"id":23893444296803,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ffc8357487e127c418a672bfc18cd77d84a60108_6a2f7397-d8aa-4dbe-ac93-7ec16e71155f.webp?v=1714911524"}},"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: "停產"
}