$product = {"id":7415893852259,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-黑白條紋","handle":"iphone-xs-max-mod-nx-printable-pb20","description":null,"published_at":"2024-06-11T16:47:15+08:00","created_at":"2024-05-06T12:20:01+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":41915277574243,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31490676228195,"product_id":7415893852259,"position":3,"created_at":"2024-05-06T12:20:10+08:00","updated_at":"2024-05-06T12:20:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a1c14cf39d4b2971330519d342e9f13a4d1568_94e05093-5efd-40f1-af65-02a07686a42f.webp?v=1714969210","variant_ids":[41915277574243]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-PB20","featured_media":{"alt":null,"id":23896082907235,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a1c14cf39d4b2971330519d342e9f13a4d1568_94e05093-5efd-40f1-af65-02a07686a42f.webp?v=1714969210"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abce65b055c31f4f6192cafe1d8d7cc80ab8746c_7bcb829a-89f4-49dd-b8d9-592e8347a4eb.webp?v=1714969204","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebd4da3c289ed52e742683160b7109178a45fb65_a9af9c90-e2bf-45e2-b51f-989225595008.webp?v=1714969207","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a1c14cf39d4b2971330519d342e9f13a4d1568_94e05093-5efd-40f1-af65-02a07686a42f.webp?v=1714969210","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66bdad3b2e85e2fa9bf27b893863cbb13c4aace1_ef0b6384-f935-4a65-be3f-13a94c20cb83.webp?v=1714969212","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fb4ed0d9699429a78ac482523a28fd144d4cdde_c769d2db-b93b-4e4d-b0c7-d7d27a203f8d.webp?v=1714969215","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fa031aafbe4bc32b91415bfae8b666f73a85a5f_49824936-18dd-4251-8f99-d7e37a3c689b.webp?v=1714969218","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/855212a02985f97847859ab6afaf075d0778a1ba_06ccb68d-bf61-4679-b4e0-8e9744200e9e.webp?v=1714969220","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32cac6299fb084de4f2d41d8df4e51c28f6f3480_2e4a1990-df4a-45a9-b26e-650bd8e19fde.webp?v=1714969223","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18231cbf80dc88d4ec2778156d359a45e42aa36d_9d6e0d04-67c0-46af-b66e-5794799a7b54.webp?v=1714969226","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9161c63f84c0f4662d14a39f037a9496ec03343a_6d55e37b-2824-4f65-b679-a24be3de0a86.webp?v=1714969228"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abce65b055c31f4f6192cafe1d8d7cc80ab8746c_7bcb829a-89f4-49dd-b8d9-592e8347a4eb.webp?v=1714969204","options":["color"],"media":[{"alt":null,"id":23896081891427,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abce65b055c31f4f6192cafe1d8d7cc80ab8746c_7bcb829a-89f4-49dd-b8d9-592e8347a4eb.webp?v=1714969204"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/abce65b055c31f4f6192cafe1d8d7cc80ab8746c_7bcb829a-89f4-49dd-b8d9-592e8347a4eb.webp?v=1714969204","width":2000},{"alt":null,"id":23896082481251,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebd4da3c289ed52e742683160b7109178a45fb65_a9af9c90-e2bf-45e2-b51f-989225595008.webp?v=1714969207"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebd4da3c289ed52e742683160b7109178a45fb65_a9af9c90-e2bf-45e2-b51f-989225595008.webp?v=1714969207","width":2000},{"alt":null,"id":23896082907235,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a1c14cf39d4b2971330519d342e9f13a4d1568_94e05093-5efd-40f1-af65-02a07686a42f.webp?v=1714969210"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a1c14cf39d4b2971330519d342e9f13a4d1568_94e05093-5efd-40f1-af65-02a07686a42f.webp?v=1714969210","width":2000},{"alt":null,"id":23896083300451,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66bdad3b2e85e2fa9bf27b893863cbb13c4aace1_ef0b6384-f935-4a65-be3f-13a94c20cb83.webp?v=1714969212"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/66bdad3b2e85e2fa9bf27b893863cbb13c4aace1_ef0b6384-f935-4a65-be3f-13a94c20cb83.webp?v=1714969212","width":2000},{"alt":null,"id":23896083726435,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fb4ed0d9699429a78ac482523a28fd144d4cdde_c769d2db-b93b-4e4d-b0c7-d7d27a203f8d.webp?v=1714969215"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9fb4ed0d9699429a78ac482523a28fd144d4cdde_c769d2db-b93b-4e4d-b0c7-d7d27a203f8d.webp?v=1714969215","width":2000},{"alt":null,"id":23896084185187,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fa031aafbe4bc32b91415bfae8b666f73a85a5f_49824936-18dd-4251-8f99-d7e37a3c689b.webp?v=1714969218"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2fa031aafbe4bc32b91415bfae8b666f73a85a5f_49824936-18dd-4251-8f99-d7e37a3c689b.webp?v=1714969218","width":2000},{"alt":null,"id":23896084742243,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/855212a02985f97847859ab6afaf075d0778a1ba_06ccb68d-bf61-4679-b4e0-8e9744200e9e.webp?v=1714969220"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/855212a02985f97847859ab6afaf075d0778a1ba_06ccb68d-bf61-4679-b4e0-8e9744200e9e.webp?v=1714969220","width":2000},{"alt":null,"id":23896085168227,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32cac6299fb084de4f2d41d8df4e51c28f6f3480_2e4a1990-df4a-45a9-b26e-650bd8e19fde.webp?v=1714969223"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32cac6299fb084de4f2d41d8df4e51c28f6f3480_2e4a1990-df4a-45a9-b26e-650bd8e19fde.webp?v=1714969223","width":2000},{"alt":null,"id":23896085758051,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18231cbf80dc88d4ec2778156d359a45e42aa36d_9d6e0d04-67c0-46af-b66e-5794799a7b54.webp?v=1714969226"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/18231cbf80dc88d4ec2778156d359a45e42aa36d_9d6e0d04-67c0-46af-b66e-5794799a7b54.webp?v=1714969226","width":2000},{"alt":null,"id":23896086085731,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9161c63f84c0f4662d14a39f037a9496ec03343a_6d55e37b-2824-4f65-b679-a24be3de0a86.webp?v=1714969228"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9161c63f84c0f4662d14a39f037a9496ec03343a_6d55e37b-2824-4f65-b679-a24be3de0a86.webp?v=1714969228","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41915277574243,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31490676228195,"product_id":7415893852259,"position":3,"created_at":"2024-05-06T12:20:10+08:00","updated_at":"2024-05-06T12:20:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a1c14cf39d4b2971330519d342e9f13a4d1568_94e05093-5efd-40f1-af65-02a07686a42f.webp?v=1714969210","variant_ids":[41915277574243]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-PB20","featured_media":{"alt":null,"id":23896082907235,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a1c14cf39d4b2971330519d342e9f13a4d1568_94e05093-5efd-40f1-af65-02a07686a42f.webp?v=1714969210"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41915277574243,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB20","requires_shipping":true,"taxable":true,"featured_image":{"id":31490676228195,"product_id":7415893852259,"position":3,"created_at":"2024-05-06T12:20:10+08:00","updated_at":"2024-05-06T12:20:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a1c14cf39d4b2971330519d342e9f13a4d1568_94e05093-5efd-40f1-af65-02a07686a42f.webp?v=1714969210","variant_ids":[41915277574243]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone XS 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":"NPB0108624-PB20","featured_media":{"alt":null,"id":23896082907235,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/27a1c14cf39d4b2971330519d342e9f13a4d1568_94e05093-5efd-40f1-af65-02a07686a42f.webp?v=1714969210"}},"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: "停產"
}