$product = {"id":7414993682531,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - 迪士尼-星際大戰 Star Wars - 鈦戰機","handle":"iphone-12-mini-mod-nx-magsafe-printable-pb73","description":null,"published_at":"2024-06-11T17:55:06+08:00","created_at":"2024-05-05T20:02: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":41910726066275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB73","requires_shipping":true,"taxable":true,"featured_image":{"id":31487873220707,"product_id":7414993682531,"position":4,"created_at":"2024-05-05T20:02:44+08:00","updated_at":"2024-05-05T20:02:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909f40ebfe29fb9670e14125d1ffbb1bbc8db918_5aa22f8c-7138-4088-b2e6-6c27e3cbdf1c.webp?v=1714910564","variant_ids":[41910726066275]},"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-PB73","featured_media":{"alt":null,"id":23893217280099,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909f40ebfe29fb9670e14125d1ffbb1bbc8db918_5aa22f8c-7138-4088-b2e6-6c27e3cbdf1c.webp?v=1714910564"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e93de3eaa8ccd4729699a02e0d9bd979f3cac9cc_1146e36d-6a06-4a6e-a40a-713409dfff13.webp?v=1714910557","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eb7f170939541455f8f5e12ea930fd60742a08c_7c03cef8-0d4f-47af-81f9-e7cc9ca47483.webp?v=1714910559","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ba52cddcb94acfd7ccb10c61a9ced57fc6cd077_757a92ee-7304-4b9d-ac25-6ee1992113c2.webp?v=1714910562","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909f40ebfe29fb9670e14125d1ffbb1bbc8db918_5aa22f8c-7138-4088-b2e6-6c27e3cbdf1c.webp?v=1714910564","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b86b932d230d73383601a54aaa80e6c823b707_3e1905aa-5ec2-470d-8ee4-9431f9276568.webp?v=1714910567","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c98d30d0a24932b43d23f5220d1fcc53a5f09b67_2659cac7-b512-4f9a-8f4c-104e98e5e0f8.webp?v=1714910570","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9202791d810fcf38658f71c8e58e9fd39adc73_2ae840ab-e9bf-435d-99de-1267269bc36c.webp?v=1714910572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb971aa026b1100d4b2c362b3cf7c0782624fed4_5e000760-f427-4e4b-aed0-708d8552e76c.webp?v=1714910575","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bde82dafb6b882e768aa1ce2e5cea02c59c5004b_f0f2b2fe-af60-4876-8bac-4208f77b9c55.webp?v=1714910577","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c71039c062d4d3aed36d6f170a2525be5ec64efc_c45636a1-24f1-4ca6-8a76-fc30b3043588.webp?v=1714910579","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0360497487abadf8326a5a706bc1b8eaeb35647_e591f8de-29a9-41fc-b003-01a2331b2491.webp?v=1714910582"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e93de3eaa8ccd4729699a02e0d9bd979f3cac9cc_1146e36d-6a06-4a6e-a40a-713409dfff13.webp?v=1714910557","options":["color"],"media":[{"alt":null,"id":23893215248483,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e93de3eaa8ccd4729699a02e0d9bd979f3cac9cc_1146e36d-6a06-4a6e-a40a-713409dfff13.webp?v=1714910557"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e93de3eaa8ccd4729699a02e0d9bd979f3cac9cc_1146e36d-6a06-4a6e-a40a-713409dfff13.webp?v=1714910557","width":2000},{"alt":null,"id":23893216067683,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eb7f170939541455f8f5e12ea930fd60742a08c_7c03cef8-0d4f-47af-81f9-e7cc9ca47483.webp?v=1714910559"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eb7f170939541455f8f5e12ea930fd60742a08c_7c03cef8-0d4f-47af-81f9-e7cc9ca47483.webp?v=1714910559","width":2000},{"alt":null,"id":23893216460899,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ba52cddcb94acfd7ccb10c61a9ced57fc6cd077_757a92ee-7304-4b9d-ac25-6ee1992113c2.webp?v=1714910562"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ba52cddcb94acfd7ccb10c61a9ced57fc6cd077_757a92ee-7304-4b9d-ac25-6ee1992113c2.webp?v=1714910562","width":2000},{"alt":null,"id":23893217280099,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909f40ebfe29fb9670e14125d1ffbb1bbc8db918_5aa22f8c-7138-4088-b2e6-6c27e3cbdf1c.webp?v=1714910564"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909f40ebfe29fb9670e14125d1ffbb1bbc8db918_5aa22f8c-7138-4088-b2e6-6c27e3cbdf1c.webp?v=1714910564","width":2000},{"alt":null,"id":23893217837155,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b86b932d230d73383601a54aaa80e6c823b707_3e1905aa-5ec2-470d-8ee4-9431f9276568.webp?v=1714910567"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/42b86b932d230d73383601a54aaa80e6c823b707_3e1905aa-5ec2-470d-8ee4-9431f9276568.webp?v=1714910567","width":2000},{"alt":null,"id":23893218492515,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c98d30d0a24932b43d23f5220d1fcc53a5f09b67_2659cac7-b512-4f9a-8f4c-104e98e5e0f8.webp?v=1714910570"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c98d30d0a24932b43d23f5220d1fcc53a5f09b67_2659cac7-b512-4f9a-8f4c-104e98e5e0f8.webp?v=1714910570","width":2000},{"alt":null,"id":23893218951267,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9202791d810fcf38658f71c8e58e9fd39adc73_2ae840ab-e9bf-435d-99de-1267269bc36c.webp?v=1714910572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f9202791d810fcf38658f71c8e58e9fd39adc73_2ae840ab-e9bf-435d-99de-1267269bc36c.webp?v=1714910572","width":2000},{"alt":null,"id":23893219836003,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb971aa026b1100d4b2c362b3cf7c0782624fed4_5e000760-f427-4e4b-aed0-708d8552e76c.webp?v=1714910575"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb971aa026b1100d4b2c362b3cf7c0782624fed4_5e000760-f427-4e4b-aed0-708d8552e76c.webp?v=1714910575","width":2000},{"alt":null,"id":23893220491363,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bde82dafb6b882e768aa1ce2e5cea02c59c5004b_f0f2b2fe-af60-4876-8bac-4208f77b9c55.webp?v=1714910577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bde82dafb6b882e768aa1ce2e5cea02c59c5004b_f0f2b2fe-af60-4876-8bac-4208f77b9c55.webp?v=1714910577","width":2000},{"alt":null,"id":23893221015651,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c71039c062d4d3aed36d6f170a2525be5ec64efc_c45636a1-24f1-4ca6-8a76-fc30b3043588.webp?v=1714910579"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c71039c062d4d3aed36d6f170a2525be5ec64efc_c45636a1-24f1-4ca6-8a76-fc30b3043588.webp?v=1714910579","width":2000},{"alt":null,"id":23893221572707,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0360497487abadf8326a5a706bc1b8eaeb35647_e591f8de-29a9-41fc-b003-01a2331b2491.webp?v=1714910582"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a0360497487abadf8326a5a706bc1b8eaeb35647_e591f8de-29a9-41fc-b003-01a2331b2491.webp?v=1714910582","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41910726066275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB73","requires_shipping":true,"taxable":true,"featured_image":{"id":31487873220707,"product_id":7414993682531,"position":4,"created_at":"2024-05-05T20:02:44+08:00","updated_at":"2024-05-05T20:02:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909f40ebfe29fb9670e14125d1ffbb1bbc8db918_5aa22f8c-7138-4088-b2e6-6c27e3cbdf1c.webp?v=1714910564","variant_ids":[41910726066275]},"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-PB73","featured_media":{"alt":null,"id":23893217280099,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909f40ebfe29fb9670e14125d1ffbb1bbc8db918_5aa22f8c-7138-4088-b2e6-6c27e3cbdf1c.webp?v=1714910564"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41910726066275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-PB73","requires_shipping":true,"taxable":true,"featured_image":{"id":31487873220707,"product_id":7414993682531,"position":4,"created_at":"2024-05-05T20:02:44+08:00","updated_at":"2024-05-05T20:02:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909f40ebfe29fb9670e14125d1ffbb1bbc8db918_5aa22f8c-7138-4088-b2e6-6c27e3cbdf1c.webp?v=1714910564","variant_ids":[41910726066275]},"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-PB73","featured_media":{"alt":null,"id":23893217280099,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/909f40ebfe29fb9670e14125d1ffbb1bbc8db918_5aa22f8c-7138-4088-b2e6-6c27e3cbdf1c.webp?v=1714910564"}},"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: "停產"
}