$product = {"id":7408508731491,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-咖啡杯-幽默系列","handle":"iphone-12-pro-max-mod-nx-printable-pc14","description":null,"published_at":"2024-06-11T16:39:13+08:00","created_at":"2024-05-03T15:40:32+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 12 pro max","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41886289002595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC14","requires_shipping":true,"taxable":true,"featured_image":{"id":31472458727523,"product_id":7408508731491,"position":3,"created_at":"2024-05-03T15:40:39+08:00","updated_at":"2024-05-03T15:40:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec153a7a47882efe75152dbd2cef6d2374a53b8_83bc8e2e-c47b-43d5-858d-e782bae4931b.webp?v=1714722039","variant_ids":[41886289002595]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-咖啡杯-幽默系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-PC14","featured_media":{"alt":null,"id":23877375787107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec153a7a47882efe75152dbd2cef6d2374a53b8_83bc8e2e-c47b-43d5-858d-e782bae4931b.webp?v=1714722039"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d8b9848b6a63426ea8316bfbd9d90b100574f5_96eea567-deff-4e2b-8884-f98af0a3a73e.webp?v=1714722034","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e77a994f0600f40b580e6841b0a6f8fe2d04ef9_ce6009c1-f034-42a2-8b7c-407d0b559c7f.webp?v=1714722037","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec153a7a47882efe75152dbd2cef6d2374a53b8_83bc8e2e-c47b-43d5-858d-e782bae4931b.webp?v=1714722039","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c81c451a166145702888f695675b7c020553e4b2_51a97eda-8ce9-41c6-9408-ddb2b9ea8a6d.webp?v=1714722041","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91db6adbaef61e1d5a56c59f3ba3dffe2cc384b9_f04e6789-09ad-4414-9225-0ddde7b3129a.webp?v=1714722043","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7795c7da4952dbb076fa486b24e7f47b4004cb5e_e1c99c3c-47cd-49c8-b454-bfccc45300c8.webp?v=1714722046","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b563d5fd3762213f342add05f9c222497621a2e6_341650b0-e65a-4d17-94eb-ee1e53396469.webp?v=1714722048","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95d72263e5f88eb4e57396fc9f0af61e3ae8054e_c0586a71-9b0c-498c-815c-0384d645dab9.webp?v=1714722050","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40befd07a2f4fc7997f63106d182c3eeb318460f_16631fc7-fbb0-4dea-a9cb-88611fd3bac6.webp?v=1714722052","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/662cba6cf01ab2d6ff1356cb180b748707f20c08_24ebde00-94c6-4d49-8f3e-0aa1cf7e18c0.webp?v=1714722055"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d8b9848b6a63426ea8316bfbd9d90b100574f5_96eea567-deff-4e2b-8884-f98af0a3a73e.webp?v=1714722034","options":["color"],"media":[{"alt":null,"id":23877374869603,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d8b9848b6a63426ea8316bfbd9d90b100574f5_96eea567-deff-4e2b-8884-f98af0a3a73e.webp?v=1714722034"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2d8b9848b6a63426ea8316bfbd9d90b100574f5_96eea567-deff-4e2b-8884-f98af0a3a73e.webp?v=1714722034","width":2000},{"alt":null,"id":23877375295587,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e77a994f0600f40b580e6841b0a6f8fe2d04ef9_ce6009c1-f034-42a2-8b7c-407d0b559c7f.webp?v=1714722037"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4e77a994f0600f40b580e6841b0a6f8fe2d04ef9_ce6009c1-f034-42a2-8b7c-407d0b559c7f.webp?v=1714722037","width":2000},{"alt":null,"id":23877375787107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec153a7a47882efe75152dbd2cef6d2374a53b8_83bc8e2e-c47b-43d5-858d-e782bae4931b.webp?v=1714722039"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec153a7a47882efe75152dbd2cef6d2374a53b8_83bc8e2e-c47b-43d5-858d-e782bae4931b.webp?v=1714722039","width":2000},{"alt":null,"id":23877376311395,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c81c451a166145702888f695675b7c020553e4b2_51a97eda-8ce9-41c6-9408-ddb2b9ea8a6d.webp?v=1714722041"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c81c451a166145702888f695675b7c020553e4b2_51a97eda-8ce9-41c6-9408-ddb2b9ea8a6d.webp?v=1714722041","width":2000},{"alt":null,"id":23877376835683,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91db6adbaef61e1d5a56c59f3ba3dffe2cc384b9_f04e6789-09ad-4414-9225-0ddde7b3129a.webp?v=1714722043"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91db6adbaef61e1d5a56c59f3ba3dffe2cc384b9_f04e6789-09ad-4414-9225-0ddde7b3129a.webp?v=1714722043","width":2000},{"alt":null,"id":23877377163363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7795c7da4952dbb076fa486b24e7f47b4004cb5e_e1c99c3c-47cd-49c8-b454-bfccc45300c8.webp?v=1714722046"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7795c7da4952dbb076fa486b24e7f47b4004cb5e_e1c99c3c-47cd-49c8-b454-bfccc45300c8.webp?v=1714722046","width":2000},{"alt":null,"id":23877377622115,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b563d5fd3762213f342add05f9c222497621a2e6_341650b0-e65a-4d17-94eb-ee1e53396469.webp?v=1714722048"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b563d5fd3762213f342add05f9c222497621a2e6_341650b0-e65a-4d17-94eb-ee1e53396469.webp?v=1714722048","width":2000},{"alt":null,"id":23877378080867,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95d72263e5f88eb4e57396fc9f0af61e3ae8054e_c0586a71-9b0c-498c-815c-0384d645dab9.webp?v=1714722050"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/95d72263e5f88eb4e57396fc9f0af61e3ae8054e_c0586a71-9b0c-498c-815c-0384d645dab9.webp?v=1714722050","width":2000},{"alt":null,"id":23877378670691,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40befd07a2f4fc7997f63106d182c3eeb318460f_16631fc7-fbb0-4dea-a9cb-88611fd3bac6.webp?v=1714722052"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/40befd07a2f4fc7997f63106d182c3eeb318460f_16631fc7-fbb0-4dea-a9cb-88611fd3bac6.webp?v=1714722052","width":2000},{"alt":null,"id":23877379063907,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/662cba6cf01ab2d6ff1356cb180b748707f20c08_24ebde00-94c6-4d49-8f3e-0aa1cf7e18c0.webp?v=1714722055"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/662cba6cf01ab2d6ff1356cb180b748707f20c08_24ebde00-94c6-4d49-8f3e-0aa1cf7e18c0.webp?v=1714722055","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41886289002595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC14","requires_shipping":true,"taxable":true,"featured_image":{"id":31472458727523,"product_id":7408508731491,"position":3,"created_at":"2024-05-03T15:40:39+08:00","updated_at":"2024-05-03T15:40:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec153a7a47882efe75152dbd2cef6d2374a53b8_83bc8e2e-c47b-43d5-858d-e782bae4931b.webp?v=1714722039","variant_ids":[41886289002595]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-咖啡杯-幽默系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-PC14","featured_media":{"alt":null,"id":23877375787107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec153a7a47882efe75152dbd2cef6d2374a53b8_83bc8e2e-c47b-43d5-858d-e782bae4931b.webp?v=1714722039"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41886289002595,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC14","requires_shipping":true,"taxable":true,"featured_image":{"id":31472458727523,"product_id":7408508731491,"position":3,"created_at":"2024-05-03T15:40:39+08:00","updated_at":"2024-05-03T15:40:39+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec153a7a47882efe75152dbd2cef6d2374a53b8_83bc8e2e-c47b-43d5-858d-e782bae4931b.webp?v=1714722039","variant_ids":[41886289002595]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-咖啡杯-幽默系列 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0118724-PC14","featured_media":{"alt":null,"id":23877375787107,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0ec153a7a47882efe75152dbd2cef6d2374a53b8_83bc8e2e-c47b-43d5-858d-e782bae4931b.webp?v=1714722039"}},"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: "停產"
}