$product = {"id":7413972205667,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Look - 願傷疤 有天開出花(亞馬遜雨林)","handle":"iphone-13-pro-max-mod-nx-magsafe-printable-af01","description":null,"published_at":"2024-06-11T17:46:33+08:00","created_at":"2024-05-05T13:53:05+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Look","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-look","device-iPhone 13 Pro Max","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-look","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":41902852472931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0123224-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31484360884323,"product_id":7413972205667,"position":7,"created_at":"2024-05-05T13:53:22+08:00","updated_at":"2024-05-05T13:53:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90abe6db8c60fdcc23bddd467b75b6a9c7ecba2d_26ca0bdf-269c-44fd-9f1b-d1e58edf3638.webp?v=1714888402","variant_ids":[41902852472931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Look - 願傷疤 有天開出花(亞馬遜雨林) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0123224-AF01","featured_media":{"alt":null,"id":23889654612067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90abe6db8c60fdcc23bddd467b75b6a9c7ecba2d_26ca0bdf-269c-44fd-9f1b-d1e58edf3638.webp?v=1714888402"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41902852997219,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01232J5-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31484360130659,"product_id":7413972205667,"position":6,"created_at":"2024-05-05T13:53:20+08:00","updated_at":"2024-05-05T13:53:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50b72940aae1fffad6c386f508a0cb9b881a6a4c_32dbe6af-827c-4551-8b9b-663033b48326.webp?v=1714888400","variant_ids":[41902852997219]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Look - 願傷疤 有天開出花(亞馬遜雨林) - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01232J5-AF01","featured_media":{"alt":null,"id":23889653825635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50b72940aae1fffad6c386f508a0cb9b881a6a4c_32dbe6af-827c-4551-8b9b-663033b48326.webp?v=1714888400"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/daf6494339c8c8eb63869ac246448f742d5e4bfd_ffa81999-4ff4-4545-8971-b06b198e7983.webp?v=1714888387","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adaea6cc77f50c65cc3129fb46a97be2d64a2b7f_bb449812-7b3f-493d-bf2f-2f26faab1bb9.webp?v=1714888390","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb9579febbd01f90d4600320c37d8e4ac2ec4b9_821da9d4-10d4-400f-acec-51142158662f.webp?v=1714888392","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff9c120cdb4a8e364e6d31c23886ccd402da0c9e_2e3950c7-d401-4f93-af6f-3f1b1e206f36.webp?v=1714888395","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37db0b0b72d26c1fcc1db9c3d959f8aa8bf64f46_7cb01d5a-87c0-446f-94d1-6715ceb950b3.webp?v=1714888397","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50b72940aae1fffad6c386f508a0cb9b881a6a4c_32dbe6af-827c-4551-8b9b-663033b48326.webp?v=1714888400","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90abe6db8c60fdcc23bddd467b75b6a9c7ecba2d_26ca0bdf-269c-44fd-9f1b-d1e58edf3638.webp?v=1714888402","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a93ff4c6f5386e200ddb6683545e910b31aa5a12_f5ed2b8a-f85f-4392-bba2-89684eb58da9.webp?v=1714888404","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09fedd600880ba6554f65ddc324ef8af4a50dd05_0d93ba0c-78f6-4816-9203-bb79fd09bc10.webp?v=1714888407","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547b697a4c163dae748b103b93395ecb1bd55fc2_810084c4-eec5-4330-a3dc-d2d6425e68fa.webp?v=1714888409"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/daf6494339c8c8eb63869ac246448f742d5e4bfd_ffa81999-4ff4-4545-8971-b06b198e7983.webp?v=1714888387","options":["color"],"media":[{"alt":null,"id":23889651105891,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/daf6494339c8c8eb63869ac246448f742d5e4bfd_ffa81999-4ff4-4545-8971-b06b198e7983.webp?v=1714888387"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/daf6494339c8c8eb63869ac246448f742d5e4bfd_ffa81999-4ff4-4545-8971-b06b198e7983.webp?v=1714888387","width":2000},{"alt":null,"id":23889651662947,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adaea6cc77f50c65cc3129fb46a97be2d64a2b7f_bb449812-7b3f-493d-bf2f-2f26faab1bb9.webp?v=1714888390"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adaea6cc77f50c65cc3129fb46a97be2d64a2b7f_bb449812-7b3f-493d-bf2f-2f26faab1bb9.webp?v=1714888390","width":2000},{"alt":null,"id":23889652154467,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb9579febbd01f90d4600320c37d8e4ac2ec4b9_821da9d4-10d4-400f-acec-51142158662f.webp?v=1714888392"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bb9579febbd01f90d4600320c37d8e4ac2ec4b9_821da9d4-10d4-400f-acec-51142158662f.webp?v=1714888392","width":2000},{"alt":null,"id":23889652777059,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff9c120cdb4a8e364e6d31c23886ccd402da0c9e_2e3950c7-d401-4f93-af6f-3f1b1e206f36.webp?v=1714888395"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff9c120cdb4a8e364e6d31c23886ccd402da0c9e_2e3950c7-d401-4f93-af6f-3f1b1e206f36.webp?v=1714888395","width":2000},{"alt":null,"id":23889653301347,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37db0b0b72d26c1fcc1db9c3d959f8aa8bf64f46_7cb01d5a-87c0-446f-94d1-6715ceb950b3.webp?v=1714888397"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/37db0b0b72d26c1fcc1db9c3d959f8aa8bf64f46_7cb01d5a-87c0-446f-94d1-6715ceb950b3.webp?v=1714888397","width":2000},{"alt":null,"id":23889653825635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50b72940aae1fffad6c386f508a0cb9b881a6a4c_32dbe6af-827c-4551-8b9b-663033b48326.webp?v=1714888400"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50b72940aae1fffad6c386f508a0cb9b881a6a4c_32dbe6af-827c-4551-8b9b-663033b48326.webp?v=1714888400","width":2000},{"alt":null,"id":23889654612067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90abe6db8c60fdcc23bddd467b75b6a9c7ecba2d_26ca0bdf-269c-44fd-9f1b-d1e58edf3638.webp?v=1714888402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90abe6db8c60fdcc23bddd467b75b6a9c7ecba2d_26ca0bdf-269c-44fd-9f1b-d1e58edf3638.webp?v=1714888402","width":2000},{"alt":null,"id":23889655169123,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a93ff4c6f5386e200ddb6683545e910b31aa5a12_f5ed2b8a-f85f-4392-bba2-89684eb58da9.webp?v=1714888404"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a93ff4c6f5386e200ddb6683545e910b31aa5a12_f5ed2b8a-f85f-4392-bba2-89684eb58da9.webp?v=1714888404","width":2000},{"alt":null,"id":23889655627875,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09fedd600880ba6554f65ddc324ef8af4a50dd05_0d93ba0c-78f6-4816-9203-bb79fd09bc10.webp?v=1714888407"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09fedd600880ba6554f65ddc324ef8af4a50dd05_0d93ba0c-78f6-4816-9203-bb79fd09bc10.webp?v=1714888407","width":2000},{"alt":null,"id":23889656152163,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547b697a4c163dae748b103b93395ecb1bd55fc2_810084c4-eec5-4330-a3dc-d2d6425e68fa.webp?v=1714888409"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/547b697a4c163dae748b103b93395ecb1bd55fc2_810084c4-eec5-4330-a3dc-d2d6425e68fa.webp?v=1714888409","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41902852472931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0123224-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31484360884323,"product_id":7413972205667,"position":7,"created_at":"2024-05-05T13:53:22+08:00","updated_at":"2024-05-05T13:53:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90abe6db8c60fdcc23bddd467b75b6a9c7ecba2d_26ca0bdf-269c-44fd-9f1b-d1e58edf3638.webp?v=1714888402","variant_ids":[41902852472931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Look - 願傷疤 有天開出花(亞馬遜雨林) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0123224-AF01","featured_media":{"alt":null,"id":23889654612067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90abe6db8c60fdcc23bddd467b75b6a9c7ecba2d_26ca0bdf-269c-44fd-9f1b-d1e58edf3638.webp?v=1714888402"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41902852997219,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01232J5-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31484360130659,"product_id":7413972205667,"position":6,"created_at":"2024-05-05T13:53:20+08:00","updated_at":"2024-05-05T13:53:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50b72940aae1fffad6c386f508a0cb9b881a6a4c_32dbe6af-827c-4551-8b9b-663033b48326.webp?v=1714888400","variant_ids":[41902852997219]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Look - 願傷疤 有天開出花(亞馬遜雨林) - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01232J5-AF01","featured_media":{"alt":null,"id":23889653825635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/50b72940aae1fffad6c386f508a0cb9b881a6a4c_32dbe6af-827c-4551-8b9b-663033b48326.webp?v=1714888400"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41902852472931,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0123224-AF01","requires_shipping":true,"taxable":true,"featured_image":{"id":31484360884323,"product_id":7413972205667,"position":7,"created_at":"2024-05-05T13:53:22+08:00","updated_at":"2024-05-05T13:53:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90abe6db8c60fdcc23bddd467b75b6a9c7ecba2d_26ca0bdf-269c-44fd-9f1b-d1e58edf3638.webp?v=1714888402","variant_ids":[41902852472931]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 13 Pro Max - Look - 願傷疤 有天開出花(亞馬遜雨林) - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1380,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0123224-AF01","featured_media":{"alt":null,"id":23889654612067,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/90abe6db8c60fdcc23bddd467b75b6a9c7ecba2d_26ca0bdf-269c-44fd-9f1b-d1e58edf3638.webp?v=1714888402"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$brand_handle = null;
$type = "";
var sellingStatus
// 只有設計款(SKU 含 '-')才需要合圖
if ($isMerge && $defaultVariant.sku.includes('-')) {
$(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: "停產"
}