$product = {"id":7415941595235,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - C3PO-經典","handle":"iphone-xs-max-mod-nx-printable-pb24","description":null,"published_at":"2024-06-11T16:48:30+08:00","created_at":"2024-05-06T12:28:57+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 XS 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":41915760083043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB24","requires_shipping":true,"taxable":true,"featured_image":{"id":31490794946659,"product_id":7415941595235,"position":8,"created_at":"2024-05-06T12:29:16+08:00","updated_at":"2024-05-06T12:29:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a31b9aeb3beea78606311b55a49e636c409b4da_f18fa7bd-bf5d-4906-ab16-582dbef5c1b9.webp?v=1714969756","variant_ids":[41915760083043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - C3PO-經典 - 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":"NPB0108624-PB24","featured_media":{"alt":null,"id":23896201789539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a31b9aeb3beea78606311b55a49e636c409b4da_f18fa7bd-bf5d-4906-ab16-582dbef5c1b9.webp?v=1714969756"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d59802b73d445e122a1d0beeacb5536ae68513d_ce576822-9132-438a-921c-5b4a3957f3ad.webp?v=1714969739","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ebdb2b1116cbf09652bcf9f3c92d4e4f2ae5121_3bfb5fe0-91bd-4ad6-af5e-95d9762000aa.webp?v=1714969741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be2105c0745f1ec72d805da7c2de31ed12dca3d8_d9753268-94cb-4c15-8710-04745a2b7168.webp?v=1714969744","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5b4ddbde8df60202b8cf92331458bfe2faed2fc_0fd6f7c5-e9bf-40fc-a0f1-4543fcc30697.webp?v=1714969746","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c1e47f03741a29a3f129737f055b1356d01868_6b28df3f-324a-4023-96df-33acc8eb8bf6.webp?v=1714969748","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2f576b6772c1c681a0be9193be489a6b420606d_35648936-250a-4cf3-bb44-621369b84cf5.webp?v=1714969751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a4a6d27f6f917a4ac8982243facadc28ce16cea_ac60fada-e1f4-4bc2-9227-82e39a41a22c.webp?v=1714969753","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a31b9aeb3beea78606311b55a49e636c409b4da_f18fa7bd-bf5d-4906-ab16-582dbef5c1b9.webp?v=1714969756","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c6f24c7947bf70eaf18ba45ead6ee25b86aa28_552a8dbd-6589-4467-91a7-42dad47a8d7e.webp?v=1714969758","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ba081ca5c449405b6c8edfc1d0c06da6c25586d_4d1cfaa6-3f8c-45c3-92aa-eb4775aa70a7.webp?v=1714969760"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d59802b73d445e122a1d0beeacb5536ae68513d_ce576822-9132-438a-921c-5b4a3957f3ad.webp?v=1714969739","options":["color"],"media":[{"alt":null,"id":23896198053987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d59802b73d445e122a1d0beeacb5536ae68513d_ce576822-9132-438a-921c-5b4a3957f3ad.webp?v=1714969739"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d59802b73d445e122a1d0beeacb5536ae68513d_ce576822-9132-438a-921c-5b4a3957f3ad.webp?v=1714969739","width":2000},{"alt":null,"id":23896198447203,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ebdb2b1116cbf09652bcf9f3c92d4e4f2ae5121_3bfb5fe0-91bd-4ad6-af5e-95d9762000aa.webp?v=1714969741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5ebdb2b1116cbf09652bcf9f3c92d4e4f2ae5121_3bfb5fe0-91bd-4ad6-af5e-95d9762000aa.webp?v=1714969741","width":2000},{"alt":null,"id":23896198840419,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be2105c0745f1ec72d805da7c2de31ed12dca3d8_d9753268-94cb-4c15-8710-04745a2b7168.webp?v=1714969744"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be2105c0745f1ec72d805da7c2de31ed12dca3d8_d9753268-94cb-4c15-8710-04745a2b7168.webp?v=1714969744","width":2000},{"alt":null,"id":23896199561315,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5b4ddbde8df60202b8cf92331458bfe2faed2fc_0fd6f7c5-e9bf-40fc-a0f1-4543fcc30697.webp?v=1714969746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5b4ddbde8df60202b8cf92331458bfe2faed2fc_0fd6f7c5-e9bf-40fc-a0f1-4543fcc30697.webp?v=1714969746","width":2000},{"alt":null,"id":23896199954531,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c1e47f03741a29a3f129737f055b1356d01868_6b28df3f-324a-4023-96df-33acc8eb8bf6.webp?v=1714969748"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88c1e47f03741a29a3f129737f055b1356d01868_6b28df3f-324a-4023-96df-33acc8eb8bf6.webp?v=1714969748","width":2000},{"alt":null,"id":23896200904803,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2f576b6772c1c681a0be9193be489a6b420606d_35648936-250a-4cf3-bb44-621369b84cf5.webp?v=1714969751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d2f576b6772c1c681a0be9193be489a6b420606d_35648936-250a-4cf3-bb44-621369b84cf5.webp?v=1714969751","width":2000},{"alt":null,"id":23896201199715,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a4a6d27f6f917a4ac8982243facadc28ce16cea_ac60fada-e1f4-4bc2-9227-82e39a41a22c.webp?v=1714969753"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6a4a6d27f6f917a4ac8982243facadc28ce16cea_ac60fada-e1f4-4bc2-9227-82e39a41a22c.webp?v=1714969753","width":2000},{"alt":null,"id":23896201789539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a31b9aeb3beea78606311b55a49e636c409b4da_f18fa7bd-bf5d-4906-ab16-582dbef5c1b9.webp?v=1714969756"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a31b9aeb3beea78606311b55a49e636c409b4da_f18fa7bd-bf5d-4906-ab16-582dbef5c1b9.webp?v=1714969756","width":2000},{"alt":null,"id":23896202248291,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c6f24c7947bf70eaf18ba45ead6ee25b86aa28_552a8dbd-6589-4467-91a7-42dad47a8d7e.webp?v=1714969758"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/17c6f24c7947bf70eaf18ba45ead6ee25b86aa28_552a8dbd-6589-4467-91a7-42dad47a8d7e.webp?v=1714969758","width":2000},{"alt":null,"id":23896203559011,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ba081ca5c449405b6c8edfc1d0c06da6c25586d_4d1cfaa6-3f8c-45c3-92aa-eb4775aa70a7.webp?v=1714969760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ba081ca5c449405b6c8edfc1d0c06da6c25586d_4d1cfaa6-3f8c-45c3-92aa-eb4775aa70a7.webp?v=1714969760","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41915760083043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB24","requires_shipping":true,"taxable":true,"featured_image":{"id":31490794946659,"product_id":7415941595235,"position":8,"created_at":"2024-05-06T12:29:16+08:00","updated_at":"2024-05-06T12:29:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a31b9aeb3beea78606311b55a49e636c409b4da_f18fa7bd-bf5d-4906-ab16-582dbef5c1b9.webp?v=1714969756","variant_ids":[41915760083043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - C3PO-經典 - 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":"NPB0108624-PB24","featured_media":{"alt":null,"id":23896201789539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a31b9aeb3beea78606311b55a49e636c409b4da_f18fa7bd-bf5d-4906-ab16-582dbef5c1b9.webp?v=1714969756"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41915760083043,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB24","requires_shipping":true,"taxable":true,"featured_image":{"id":31490794946659,"product_id":7415941595235,"position":8,"created_at":"2024-05-06T12:29:16+08:00","updated_at":"2024-05-06T12:29:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a31b9aeb3beea78606311b55a49e636c409b4da_f18fa7bd-bf5d-4906-ab16-582dbef5c1b9.webp?v=1714969756","variant_ids":[41915760083043]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - C3PO-經典 - 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":"NPB0108624-PB24","featured_media":{"alt":null,"id":23896201789539,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9a31b9aeb3beea78606311b55a49e636c409b4da_f18fa7bd-bf5d-4906-ab16-582dbef5c1b9.webp?v=1714969756"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$type = "";
var sellingStatus
if ($isMerge) {
$(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: "停產"
}