$product = {"id":7411097895011,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 Star Wars - 黑武士-線稿風格","handle":"iphone-15-plus-mod-nx-magsafe-printable-pb51","description":null,"published_at":"2024-06-11T17:36:14+08:00","created_at":"2024-05-04T22:42:26+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":41894949322851,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0129624-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31479508729955,"product_id":7411097895011,"position":8,"created_at":"2024-05-04T22:42:46+08:00","updated_at":"2024-05-04T22:42:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d449e6f6fb899baa152ca7abae103d30ffa00595_8ebf4f1f-607a-49f9-a537-936b928516c2.webp?v=1714833766","variant_ids":[41894949322851]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 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":"MPB0129624-PB51","featured_media":{"alt":null,"id":23884756418659,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d449e6f6fb899baa152ca7abae103d30ffa00595_8ebf4f1f-607a-49f9-a537-936b928516c2.webp?v=1714833766"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41894949453923,"title":"Mod NX-櫻花粉邊框","option1":"Mod NX-櫻花粉邊框","option2":null,"option3":null,"sku":"MPB0129657-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31479504273507,"product_id":7411097895011,"position":1,"created_at":"2024-05-04T22:42:29+08:00","updated_at":"2024-05-04T22:42:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a03598b49b363fde6a52f10396f7633de0eacb_7ee5a0c5-6854-4f74-aa12-b251bd4cb2b5.webp?v=1714833749","variant_ids":[41894949453923]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 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":"MPB0129657-PB51","featured_media":{"alt":null,"id":23884752093283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a03598b49b363fde6a52f10396f7633de0eacb_7ee5a0c5-6854-4f74-aa12-b251bd4cb2b5.webp?v=1714833749"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a03598b49b363fde6a52f10396f7633de0eacb_7ee5a0c5-6854-4f74-aa12-b251bd4cb2b5.webp?v=1714833749","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b391ab13582f47716aa6652a3c0de639e99da426_65047896-d554-442b-96fb-e65639f5be9d.webp?v=1714833751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f7e33a8c05a60ababee2657b8db0d0770effdc8_eda88c65-52c5-45c2-8360-86f7314ea922.webp?v=1714833753","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a80934a6cfc257f25e89ccbc4f0f59bd9d50e6c5_a5fee4f3-9cb4-4457-a66f-7b26a8911b00.webp?v=1714833755","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/746d24ffbdc49f5caf8de28012ed212e12b959c8_e51c1177-e646-4a8b-b373-1a182f67849e.webp?v=1714833758","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30e66094b80b6cb4f83bb9e986617977ba3b3742_7f3db147-0d24-41e0-9144-093348c37dd7.webp?v=1714833762","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd56d827332153039a6318c3094b25f38b4281b6_405bfa5c-2f86-43df-8061-96e08ebbfd05.webp?v=1714833764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d449e6f6fb899baa152ca7abae103d30ffa00595_8ebf4f1f-607a-49f9-a537-936b928516c2.webp?v=1714833766","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d0ab062fc840d4fe6fa6baa3ff01e799d1ad92a_eb6b1eaf-d18e-4d31-a1ee-1ed69d8bddba.webp?v=1714833769"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a03598b49b363fde6a52f10396f7633de0eacb_7ee5a0c5-6854-4f74-aa12-b251bd4cb2b5.webp?v=1714833749","options":["color"],"media":[{"alt":null,"id":23884752093283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a03598b49b363fde6a52f10396f7633de0eacb_7ee5a0c5-6854-4f74-aa12-b251bd4cb2b5.webp?v=1714833749"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a03598b49b363fde6a52f10396f7633de0eacb_7ee5a0c5-6854-4f74-aa12-b251bd4cb2b5.webp?v=1714833749","width":2000},{"alt":null,"id":23884752781411,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b391ab13582f47716aa6652a3c0de639e99da426_65047896-d554-442b-96fb-e65639f5be9d.webp?v=1714833751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b391ab13582f47716aa6652a3c0de639e99da426_65047896-d554-442b-96fb-e65639f5be9d.webp?v=1714833751","width":2000},{"alt":null,"id":23884753502307,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f7e33a8c05a60ababee2657b8db0d0770effdc8_eda88c65-52c5-45c2-8360-86f7314ea922.webp?v=1714833753"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f7e33a8c05a60ababee2657b8db0d0770effdc8_eda88c65-52c5-45c2-8360-86f7314ea922.webp?v=1714833753","width":2000},{"alt":null,"id":23884753928291,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a80934a6cfc257f25e89ccbc4f0f59bd9d50e6c5_a5fee4f3-9cb4-4457-a66f-7b26a8911b00.webp?v=1714833755"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a80934a6cfc257f25e89ccbc4f0f59bd9d50e6c5_a5fee4f3-9cb4-4457-a66f-7b26a8911b00.webp?v=1714833755","width":2000},{"alt":null,"id":23884754354275,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/746d24ffbdc49f5caf8de28012ed212e12b959c8_e51c1177-e646-4a8b-b373-1a182f67849e.webp?v=1714833758"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/746d24ffbdc49f5caf8de28012ed212e12b959c8_e51c1177-e646-4a8b-b373-1a182f67849e.webp?v=1714833758","width":2000},{"alt":null,"id":23884755337315,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30e66094b80b6cb4f83bb9e986617977ba3b3742_7f3db147-0d24-41e0-9144-093348c37dd7.webp?v=1714833762"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/30e66094b80b6cb4f83bb9e986617977ba3b3742_7f3db147-0d24-41e0-9144-093348c37dd7.webp?v=1714833762","width":2000},{"alt":null,"id":23884756025443,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd56d827332153039a6318c3094b25f38b4281b6_405bfa5c-2f86-43df-8061-96e08ebbfd05.webp?v=1714833764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd56d827332153039a6318c3094b25f38b4281b6_405bfa5c-2f86-43df-8061-96e08ebbfd05.webp?v=1714833764","width":2000},{"alt":null,"id":23884756418659,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d449e6f6fb899baa152ca7abae103d30ffa00595_8ebf4f1f-607a-49f9-a537-936b928516c2.webp?v=1714833766"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d449e6f6fb899baa152ca7abae103d30ffa00595_8ebf4f1f-607a-49f9-a537-936b928516c2.webp?v=1714833766","width":2000},{"alt":null,"id":23884756910179,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d0ab062fc840d4fe6fa6baa3ff01e799d1ad92a_eb6b1eaf-d18e-4d31-a1ee-1ed69d8bddba.webp?v=1714833769"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d0ab062fc840d4fe6fa6baa3ff01e799d1ad92a_eb6b1eaf-d18e-4d31-a1ee-1ed69d8bddba.webp?v=1714833769","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41894949322851,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0129624-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31479508729955,"product_id":7411097895011,"position":8,"created_at":"2024-05-04T22:42:46+08:00","updated_at":"2024-05-04T22:42:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d449e6f6fb899baa152ca7abae103d30ffa00595_8ebf4f1f-607a-49f9-a537-936b928516c2.webp?v=1714833766","variant_ids":[41894949322851]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 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":"MPB0129624-PB51","featured_media":{"alt":null,"id":23884756418659,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d449e6f6fb899baa152ca7abae103d30ffa00595_8ebf4f1f-607a-49f9-a537-936b928516c2.webp?v=1714833766"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41894949453923,"title":"Mod NX-櫻花粉邊框","option1":"Mod NX-櫻花粉邊框","option2":null,"option3":null,"sku":"MPB0129657-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31479504273507,"product_id":7411097895011,"position":1,"created_at":"2024-05-04T22:42:29+08:00","updated_at":"2024-05-04T22:42:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a03598b49b363fde6a52f10396f7633de0eacb_7ee5a0c5-6854-4f74-aa12-b251bd4cb2b5.webp?v=1714833749","variant_ids":[41894949453923]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 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":"MPB0129657-PB51","featured_media":{"alt":null,"id":23884752093283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b4a03598b49b363fde6a52f10396f7633de0eacb_7ee5a0c5-6854-4f74-aa12-b251bd4cb2b5.webp?v=1714833749"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41894949322851,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0129624-PB51","requires_shipping":true,"taxable":true,"featured_image":{"id":31479508729955,"product_id":7411097895011,"position":8,"created_at":"2024-05-04T22:42:46+08:00","updated_at":"2024-05-04T22:42:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d449e6f6fb899baa152ca7abae103d30ffa00595_8ebf4f1f-607a-49f9-a537-936b928516c2.webp?v=1714833766","variant_ids":[41894949322851]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 15 Plus - 迪士尼-星際大戰 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":"MPB0129624-PB51","featured_media":{"alt":null,"id":23884756418659,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d449e6f6fb899baa152ca7abae103d30ffa00595_8ebf4f1f-607a-49f9-a537-936b928516c2.webp?v=1714833766"}},"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: "停產"
}