$product = {"id":7415062823011,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 Star Wars - 黑武士-咖啡杯-幽默系列","handle":"iphone-12-pro-max-mod-nx-magsafe-printable-pc14","description":null,"published_at":"2024-06-11T17:56:58+08:00","created_at":"2024-05-05T20:15:37+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 pro max","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":41911465508963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PC14","requires_shipping":true,"taxable":true,"featured_image":{"id":31488053149795,"product_id":7415062823011,"position":2,"created_at":"2024-05-05T20:15:41+08:00","updated_at":"2024-05-05T20:15:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700129793262baa4c043b8460567176490074bd9_a9f8cadb-3c3f-4aa2-91a6-444dcf9f28de.webp?v=1714911341","variant_ids":[41911465508963]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 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":"MPB0118724-PC14","featured_media":{"alt":null,"id":23893397569635,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700129793262baa4c043b8460567176490074bd9_a9f8cadb-3c3f-4aa2-91a6-444dcf9f28de.webp?v=1714911341"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ec58f71dec9427ef20b114907da99b1a5d0710a_698b65a3-5deb-44c8-ba1c-3f718fc17ff5.webp?v=1714911339","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700129793262baa4c043b8460567176490074bd9_a9f8cadb-3c3f-4aa2-91a6-444dcf9f28de.webp?v=1714911341","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7221a47063279a482c4a578e1880cf478c8e47b_9e5d0864-a4e1-41ad-b146-d36d7ac5ff96.webp?v=1714911344","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/268841a1c4413c88ac3d7a94968b4cebfd3bfda5_24316c85-be81-43a2-a944-94cdedd77faa.webp?v=1714911346","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f95a56beaa28da20c10578bcfc5cd0a89f9bfdf5_0b61d08f-65e6-4f15-ba56-8be57c1444f5.webp?v=1714911348","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f478c245f5eb6149f931a288b44e97e98295244e_63aae546-ee8a-460f-851e-7276e9d32e7f.webp?v=1714911350","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69afce994a35c5ec93b820f74ac34ae1ccfaa5d4_a87134da-afcb-4140-8dfe-0775ca2115b4.webp?v=1714911353","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8383e214e21dda67b8d122c10d3e41ca3eb94799_0931f322-128b-48cb-916d-0ef6c0e77b98.webp?v=1714911355","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b27f4d331fac6d00571ad78cb7515bf8ae94d693_961ce007-a0bd-418d-801a-bdf1a0c28179.webp?v=1714911358","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8fa5b3ceafa242d7a90cbdc7dbe159b8daf3d72_8d02aa69-5bba-4ee3-9372-6bf164a7d73a.webp?v=1714911360"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ec58f71dec9427ef20b114907da99b1a5d0710a_698b65a3-5deb-44c8-ba1c-3f718fc17ff5.webp?v=1714911339","options":["color"],"media":[{"alt":null,"id":23893397078115,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ec58f71dec9427ef20b114907da99b1a5d0710a_698b65a3-5deb-44c8-ba1c-3f718fc17ff5.webp?v=1714911339"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ec58f71dec9427ef20b114907da99b1a5d0710a_698b65a3-5deb-44c8-ba1c-3f718fc17ff5.webp?v=1714911339","width":2000},{"alt":null,"id":23893397569635,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700129793262baa4c043b8460567176490074bd9_a9f8cadb-3c3f-4aa2-91a6-444dcf9f28de.webp?v=1714911341"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700129793262baa4c043b8460567176490074bd9_a9f8cadb-3c3f-4aa2-91a6-444dcf9f28de.webp?v=1714911341","width":2000},{"alt":null,"id":23893398159459,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7221a47063279a482c4a578e1880cf478c8e47b_9e5d0864-a4e1-41ad-b146-d36d7ac5ff96.webp?v=1714911344"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d7221a47063279a482c4a578e1880cf478c8e47b_9e5d0864-a4e1-41ad-b146-d36d7ac5ff96.webp?v=1714911344","width":2000},{"alt":null,"id":23893399175267,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/268841a1c4413c88ac3d7a94968b4cebfd3bfda5_24316c85-be81-43a2-a944-94cdedd77faa.webp?v=1714911346"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/268841a1c4413c88ac3d7a94968b4cebfd3bfda5_24316c85-be81-43a2-a944-94cdedd77faa.webp?v=1714911346","width":2000},{"alt":null,"id":23893399666787,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f95a56beaa28da20c10578bcfc5cd0a89f9bfdf5_0b61d08f-65e6-4f15-ba56-8be57c1444f5.webp?v=1714911348"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f95a56beaa28da20c10578bcfc5cd0a89f9bfdf5_0b61d08f-65e6-4f15-ba56-8be57c1444f5.webp?v=1714911348","width":2000},{"alt":null,"id":23893400387683,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f478c245f5eb6149f931a288b44e97e98295244e_63aae546-ee8a-460f-851e-7276e9d32e7f.webp?v=1714911350"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f478c245f5eb6149f931a288b44e97e98295244e_63aae546-ee8a-460f-851e-7276e9d32e7f.webp?v=1714911350","width":2000},{"alt":null,"id":23893400846435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69afce994a35c5ec93b820f74ac34ae1ccfaa5d4_a87134da-afcb-4140-8dfe-0775ca2115b4.webp?v=1714911353"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/69afce994a35c5ec93b820f74ac34ae1ccfaa5d4_a87134da-afcb-4140-8dfe-0775ca2115b4.webp?v=1714911353","width":2000},{"alt":null,"id":23893401632867,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8383e214e21dda67b8d122c10d3e41ca3eb94799_0931f322-128b-48cb-916d-0ef6c0e77b98.webp?v=1714911355"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8383e214e21dda67b8d122c10d3e41ca3eb94799_0931f322-128b-48cb-916d-0ef6c0e77b98.webp?v=1714911355","width":2000},{"alt":null,"id":23893402058851,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b27f4d331fac6d00571ad78cb7515bf8ae94d693_961ce007-a0bd-418d-801a-bdf1a0c28179.webp?v=1714911358"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b27f4d331fac6d00571ad78cb7515bf8ae94d693_961ce007-a0bd-418d-801a-bdf1a0c28179.webp?v=1714911358","width":2000},{"alt":null,"id":23893402648675,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8fa5b3ceafa242d7a90cbdc7dbe159b8daf3d72_8d02aa69-5bba-4ee3-9372-6bf164a7d73a.webp?v=1714911360"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8fa5b3ceafa242d7a90cbdc7dbe159b8daf3d72_8d02aa69-5bba-4ee3-9372-6bf164a7d73a.webp?v=1714911360","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41911465508963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PC14","requires_shipping":true,"taxable":true,"featured_image":{"id":31488053149795,"product_id":7415062823011,"position":2,"created_at":"2024-05-05T20:15:41+08:00","updated_at":"2024-05-05T20:15:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700129793262baa4c043b8460567176490074bd9_a9f8cadb-3c3f-4aa2-91a6-444dcf9f28de.webp?v=1714911341","variant_ids":[41911465508963]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 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":"MPB0118724-PC14","featured_media":{"alt":null,"id":23893397569635,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700129793262baa4c043b8460567176490074bd9_a9f8cadb-3c3f-4aa2-91a6-444dcf9f28de.webp?v=1714911341"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41911465508963,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118724-PC14","requires_shipping":true,"taxable":true,"featured_image":{"id":31488053149795,"product_id":7415062823011,"position":2,"created_at":"2024-05-05T20:15:41+08:00","updated_at":"2024-05-05T20:15:41+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700129793262baa4c043b8460567176490074bd9_a9f8cadb-3c3f-4aa2-91a6-444dcf9f28de.webp?v=1714911341","variant_ids":[41911465508963]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 Pro Max - 迪士尼-星際大戰 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":"MPB0118724-PC14","featured_media":{"alt":null,"id":23893397569635,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/700129793262baa4c043b8460567176490074bd9_a9f8cadb-3c3f-4aa2-91a6-444dcf9f28de.webp?v=1714911341"}},"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: "停產"
}