$product = {"id":7411029573731,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑","handle":"iphone-15-plus-mod-nx-magsafe-printable-pb07","description":null,"published_at":"2024-06-11T17:34:27+08:00","created_at":"2024-05-04T22:29:45+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 15 Plus","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":41894271844451,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0129624-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31479330209891,"product_id":7411029573731,"position":6,"created_at":"2024-05-04T22:29:59+08:00","updated_at":"2024-05-04T22:29:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36886cca1e9a2545f4470ed7a4e33f57e0f4425_eebef8f0-39ef-4719-9962-e9654ca8b05e.webp?v=1714832999","variant_ids":[41894271844451]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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":"MPB0129624-PB07","featured_media":{"alt":null,"id":23884577472611,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36886cca1e9a2545f4470ed7a4e33f57e0f4425_eebef8f0-39ef-4719-9962-e9654ca8b05e.webp?v=1714832999"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41894271975523,"title":"Mod NX-櫻花粉邊框","option1":"Mod NX-櫻花粉邊框","option2":null,"option3":null,"sku":"MPB0129657-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31479328440419,"product_id":7411029573731,"position":3,"created_at":"2024-05-04T22:29:52+08:00","updated_at":"2024-05-04T22:29:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c52749cce978bd299bc02ee1e69c53aa5be2cdb0_b35aefe0-0bd6-40c0-8339-8606740c5cc9.webp?v=1714832992","variant_ids":[41894271975523]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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":"MPB0129657-PB07","featured_media":{"alt":null,"id":23884575670371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c52749cce978bd299bc02ee1e69c53aa5be2cdb0_b35aefe0-0bd6-40c0-8339-8606740c5cc9.webp?v=1714832992"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/303ec23a0cd21fbfdc01b26aae47c3ea2c428f03_598ef00e-e66c-49a0-9004-9b1ebd5dd04b.webp?v=1714832988","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b30e06f115fba9741e22c756ba9ef6195f0e224c_ce50a40f-69f7-4734-bafa-ed4ee4130967.webp?v=1714832990","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c52749cce978bd299bc02ee1e69c53aa5be2cdb0_b35aefe0-0bd6-40c0-8339-8606740c5cc9.webp?v=1714832992","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d5696e337e2e104065d548a4cdb5ded0f6af394_86397112-33f0-49f2-bd91-a6029630c60f.webp?v=1714832994","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/961d6815b0d5b2697503da0391d0c1fe4f0f0b94_e5a68955-c1ff-4e77-ba44-32d56b0bb3a9.webp?v=1714832997","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36886cca1e9a2545f4470ed7a4e33f57e0f4425_eebef8f0-39ef-4719-9962-e9654ca8b05e.webp?v=1714832999","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9811b5a687db2463e891bce71d9f8f430e9953a_edb81668-77f8-4bb5-896d-3a37c5d75334.webp?v=1714833001","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44ae8134870bb47e5d170449112ec62b9589d15b_95c2a92a-3b0f-46fb-8d78-09a61d4356d8.webp?v=1714833004","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e86082b013df7b63f6a2b783942aa1c4c57bedf7_23b40caa-6666-4a4c-aab3-424acaf84814.webp?v=1714833006","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5afe45be0cb46410eb07e76126c1cb7270e1e6ad_f6d3cbf3-a4f0-4f50-ae94-56a1b115a6b1.webp?v=1714833008"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/303ec23a0cd21fbfdc01b26aae47c3ea2c428f03_598ef00e-e66c-49a0-9004-9b1ebd5dd04b.webp?v=1714832988","options":["color"],"media":[{"alt":null,"id":23884574523491,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/303ec23a0cd21fbfdc01b26aae47c3ea2c428f03_598ef00e-e66c-49a0-9004-9b1ebd5dd04b.webp?v=1714832988"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/303ec23a0cd21fbfdc01b26aae47c3ea2c428f03_598ef00e-e66c-49a0-9004-9b1ebd5dd04b.webp?v=1714832988","width":2000},{"alt":null,"id":23884575146083,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b30e06f115fba9741e22c756ba9ef6195f0e224c_ce50a40f-69f7-4734-bafa-ed4ee4130967.webp?v=1714832990"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b30e06f115fba9741e22c756ba9ef6195f0e224c_ce50a40f-69f7-4734-bafa-ed4ee4130967.webp?v=1714832990","width":2000},{"alt":null,"id":23884575670371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c52749cce978bd299bc02ee1e69c53aa5be2cdb0_b35aefe0-0bd6-40c0-8339-8606740c5cc9.webp?v=1714832992"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c52749cce978bd299bc02ee1e69c53aa5be2cdb0_b35aefe0-0bd6-40c0-8339-8606740c5cc9.webp?v=1714832992","width":2000},{"alt":null,"id":23884576292963,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d5696e337e2e104065d548a4cdb5ded0f6af394_86397112-33f0-49f2-bd91-a6029630c60f.webp?v=1714832994"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3d5696e337e2e104065d548a4cdb5ded0f6af394_86397112-33f0-49f2-bd91-a6029630c60f.webp?v=1714832994","width":2000},{"alt":null,"id":23884576751715,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/961d6815b0d5b2697503da0391d0c1fe4f0f0b94_e5a68955-c1ff-4e77-ba44-32d56b0bb3a9.webp?v=1714832997"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/961d6815b0d5b2697503da0391d0c1fe4f0f0b94_e5a68955-c1ff-4e77-ba44-32d56b0bb3a9.webp?v=1714832997","width":2000},{"alt":null,"id":23884577472611,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36886cca1e9a2545f4470ed7a4e33f57e0f4425_eebef8f0-39ef-4719-9962-e9654ca8b05e.webp?v=1714832999"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36886cca1e9a2545f4470ed7a4e33f57e0f4425_eebef8f0-39ef-4719-9962-e9654ca8b05e.webp?v=1714832999","width":2000},{"alt":null,"id":23884577701987,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9811b5a687db2463e891bce71d9f8f430e9953a_edb81668-77f8-4bb5-896d-3a37c5d75334.webp?v=1714833001"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9811b5a687db2463e891bce71d9f8f430e9953a_edb81668-77f8-4bb5-896d-3a37c5d75334.webp?v=1714833001","width":2000},{"alt":null,"id":23884578291811,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44ae8134870bb47e5d170449112ec62b9589d15b_95c2a92a-3b0f-46fb-8d78-09a61d4356d8.webp?v=1714833004"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44ae8134870bb47e5d170449112ec62b9589d15b_95c2a92a-3b0f-46fb-8d78-09a61d4356d8.webp?v=1714833004","width":2000},{"alt":null,"id":23884578816099,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e86082b013df7b63f6a2b783942aa1c4c57bedf7_23b40caa-6666-4a4c-aab3-424acaf84814.webp?v=1714833006"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e86082b013df7b63f6a2b783942aa1c4c57bedf7_23b40caa-6666-4a4c-aab3-424acaf84814.webp?v=1714833006","width":2000},{"alt":null,"id":23884579405923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5afe45be0cb46410eb07e76126c1cb7270e1e6ad_f6d3cbf3-a4f0-4f50-ae94-56a1b115a6b1.webp?v=1714833008"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5afe45be0cb46410eb07e76126c1cb7270e1e6ad_f6d3cbf3-a4f0-4f50-ae94-56a1b115a6b1.webp?v=1714833008","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41894271844451,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0129624-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31479330209891,"product_id":7411029573731,"position":6,"created_at":"2024-05-04T22:29:59+08:00","updated_at":"2024-05-04T22:29:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36886cca1e9a2545f4470ed7a4e33f57e0f4425_eebef8f0-39ef-4719-9962-e9654ca8b05e.webp?v=1714832999","variant_ids":[41894271844451]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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":"MPB0129624-PB07","featured_media":{"alt":null,"id":23884577472611,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36886cca1e9a2545f4470ed7a4e33f57e0f4425_eebef8f0-39ef-4719-9962-e9654ca8b05e.webp?v=1714832999"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41894271975523,"title":"Mod NX-櫻花粉邊框","option1":"Mod NX-櫻花粉邊框","option2":null,"option3":null,"sku":"MPB0129657-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31479328440419,"product_id":7411029573731,"position":3,"created_at":"2024-05-04T22:29:52+08:00","updated_at":"2024-05-04T22:29:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c52749cce978bd299bc02ee1e69c53aa5be2cdb0_b35aefe0-0bd6-40c0-8339-8606740c5cc9.webp?v=1714832992","variant_ids":[41894271975523]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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":"MPB0129657-PB07","featured_media":{"alt":null,"id":23884575670371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c52749cce978bd299bc02ee1e69c53aa5be2cdb0_b35aefe0-0bd6-40c0-8339-8606740c5cc9.webp?v=1714832992"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41894271844451,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0129624-PB07","requires_shipping":true,"taxable":true,"featured_image":{"id":31479330209891,"product_id":7411029573731,"position":6,"created_at":"2024-05-04T22:29:59+08:00","updated_at":"2024-05-04T22:29:59+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36886cca1e9a2545f4470ed7a4e33f57e0f4425_eebef8f0-39ef-4719-9962-e9654ca8b05e.webp?v=1714832999","variant_ids":[41894271844451]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 Star Wars - R2D2-噴漆黑 - 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":"MPB0129624-PB07","featured_media":{"alt":null,"id":23884577472611,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f36886cca1e9a2545f4470ed7a4e33f57e0f4425_eebef8f0-39ef-4719-9962-e9654ca8b05e.webp?v=1714832999"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null
var sellingStatus
if ($bumper) {
$(document).ready(function() {
var productImg = $product.images[0]
var bumperVariants = $bumper.variants;
var bumperColors = new Object();
var currentVariant = '';
var productType = '';
bumperVariants.forEach(variant => {
bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src;
});
if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') {
mergeImages(
[productImg, bumperColors[currentVariant]],
{ crossOrigin: 'anonymous' }
).then(mergedImg => {
$('.merged-img').attr('src', mergedImg);
});
} else {
mergeImages(
[bumperColors[currentVariant], productImg],
{ crossOrigin: 'anonymous' }
).then(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: "停產"
}