$product = {"id":7408404365411,"title":"犀牛盾Mod NX手機殼 - iPhone 12 Pro Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾白風暴兵","handle":"iphone-12-pro-max-mod-nx-printable-pc01","description":null,"published_at":"2024-06-11T16:36:19+08:00","created_at":"2024-05-03T15:19:58+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":41885105586275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472180920419,"product_id":7408404365411,"position":9,"created_at":"2024-05-03T15:20:21+08:00","updated_at":"2024-05-03T15:20:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1808eba745f7390bce5a6c72e08d5729f8982f40_a125d91d-58bf-4d6e-88f5-65a8947bf3e3.webp?v=1714720821","variant_ids":[41885105586275]},"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-PC01","featured_media":{"alt":null,"id":23877096538211,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1808eba745f7390bce5a6c72e08d5729f8982f40_a125d91d-58bf-4d6e-88f5-65a8947bf3e3.webp?v=1714720821"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b320431ccea8ec9b544c46718ed03b6722d74b_79fd868d-a1be-427a-aebf-a2004719b6f3.webp?v=1714720800","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99876fc847295511a1fe6df6873dea2c078a91e5_3fdc75d0-198b-4817-a652-9a4f41c4e634.webp?v=1714720803","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c82341b061076874b30602c971ec02f062b1758_fc399205-acc9-4b01-b9a7-5f820a036b91.webp?v=1714720805","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1494e96146ecfd00c61b6e4f68caf7342dcf48b1_6e38d549-cb28-4421-aa26-d6e7b686e0a1.webp?v=1714720808","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/525cb8b654452345584dc7bbe0facd16d6229af4_a48b47a6-53ed-4d5f-94c1-eb8604157664.webp?v=1714720810","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adaf577fb227d927f86e834fd75787291d4a8cf4_9458d6fb-6ee7-42b6-9f7d-8def70331a04.webp?v=1714720813","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f108b664131a295bf1592b589e9ac39f29a7d7db_1ff1bac9-aad5-4b85-93b4-a58821ac8c5b.webp?v=1714720815","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcae451b062f9bdbbb91c28e7a06cd90be276de2_129323f7-2770-44d2-a558-9d71fc930ecc.webp?v=1714720818","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1808eba745f7390bce5a6c72e08d5729f8982f40_a125d91d-58bf-4d6e-88f5-65a8947bf3e3.webp?v=1714720821","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35031e411f3a364e1ce9a7aed928ac57e648fe0c_73bce466-74c7-4c29-beb7-c3f3b304da37.webp?v=1714720823"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b320431ccea8ec9b544c46718ed03b6722d74b_79fd868d-a1be-427a-aebf-a2004719b6f3.webp?v=1714720800","options":["color"],"media":[{"alt":null,"id":23877090377827,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b320431ccea8ec9b544c46718ed03b6722d74b_79fd868d-a1be-427a-aebf-a2004719b6f3.webp?v=1714720800"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/15b320431ccea8ec9b544c46718ed03b6722d74b_79fd868d-a1be-427a-aebf-a2004719b6f3.webp?v=1714720800","width":2000},{"alt":null,"id":23877090869347,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99876fc847295511a1fe6df6873dea2c078a91e5_3fdc75d0-198b-4817-a652-9a4f41c4e634.webp?v=1714720803"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/99876fc847295511a1fe6df6873dea2c078a91e5_3fdc75d0-198b-4817-a652-9a4f41c4e634.webp?v=1714720803","width":2000},{"alt":null,"id":23877091393635,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c82341b061076874b30602c971ec02f062b1758_fc399205-acc9-4b01-b9a7-5f820a036b91.webp?v=1714720805"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6c82341b061076874b30602c971ec02f062b1758_fc399205-acc9-4b01-b9a7-5f820a036b91.webp?v=1714720805","width":2000},{"alt":null,"id":23877091950691,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1494e96146ecfd00c61b6e4f68caf7342dcf48b1_6e38d549-cb28-4421-aa26-d6e7b686e0a1.webp?v=1714720808"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1494e96146ecfd00c61b6e4f68caf7342dcf48b1_6e38d549-cb28-4421-aa26-d6e7b686e0a1.webp?v=1714720808","width":2000},{"alt":null,"id":23877093064803,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/525cb8b654452345584dc7bbe0facd16d6229af4_a48b47a6-53ed-4d5f-94c1-eb8604157664.webp?v=1714720810"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/525cb8b654452345584dc7bbe0facd16d6229af4_a48b47a6-53ed-4d5f-94c1-eb8604157664.webp?v=1714720810","width":2000},{"alt":null,"id":23877093621859,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adaf577fb227d927f86e834fd75787291d4a8cf4_9458d6fb-6ee7-42b6-9f7d-8def70331a04.webp?v=1714720813"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adaf577fb227d927f86e834fd75787291d4a8cf4_9458d6fb-6ee7-42b6-9f7d-8def70331a04.webp?v=1714720813","width":2000},{"alt":null,"id":23877094178915,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f108b664131a295bf1592b589e9ac39f29a7d7db_1ff1bac9-aad5-4b85-93b4-a58821ac8c5b.webp?v=1714720815"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f108b664131a295bf1592b589e9ac39f29a7d7db_1ff1bac9-aad5-4b85-93b4-a58821ac8c5b.webp?v=1714720815","width":2000},{"alt":null,"id":23877095555171,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcae451b062f9bdbbb91c28e7a06cd90be276de2_129323f7-2770-44d2-a558-9d71fc930ecc.webp?v=1714720818"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bcae451b062f9bdbbb91c28e7a06cd90be276de2_129323f7-2770-44d2-a558-9d71fc930ecc.webp?v=1714720818","width":2000},{"alt":null,"id":23877096538211,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1808eba745f7390bce5a6c72e08d5729f8982f40_a125d91d-58bf-4d6e-88f5-65a8947bf3e3.webp?v=1714720821"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1808eba745f7390bce5a6c72e08d5729f8982f40_a125d91d-58bf-4d6e-88f5-65a8947bf3e3.webp?v=1714720821","width":2000},{"alt":null,"id":23877097357411,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35031e411f3a364e1ce9a7aed928ac57e648fe0c_73bce466-74c7-4c29-beb7-c3f3b304da37.webp?v=1714720823"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/35031e411f3a364e1ce9a7aed928ac57e648fe0c_73bce466-74c7-4c29-beb7-c3f3b304da37.webp?v=1714720823","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41885105586275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472180920419,"product_id":7408404365411,"position":9,"created_at":"2024-05-03T15:20:21+08:00","updated_at":"2024-05-03T15:20:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1808eba745f7390bce5a6c72e08d5729f8982f40_a125d91d-58bf-4d6e-88f5-65a8947bf3e3.webp?v=1714720821","variant_ids":[41885105586275]},"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-PC01","featured_media":{"alt":null,"id":23877096538211,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1808eba745f7390bce5a6c72e08d5729f8982f40_a125d91d-58bf-4d6e-88f5-65a8947bf3e3.webp?v=1714720821"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41885105586275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118724-PC01","requires_shipping":true,"taxable":true,"featured_image":{"id":31472180920419,"product_id":7408404365411,"position":9,"created_at":"2024-05-03T15:20:21+08:00","updated_at":"2024-05-03T15:20:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1808eba745f7390bce5a6c72e08d5729f8982f40_a125d91d-58bf-4d6e-88f5-65a8947bf3e3.webp?v=1714720821","variant_ids":[41885105586275]},"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-PC01","featured_media":{"alt":null,"id":23877096538211,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1808eba745f7390bce5a6c72e08d5729f8982f40_a125d91d-58bf-4d6e-88f5-65a8947bf3e3.webp?v=1714720821"}},"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: "停產"
}