$product = {"id":7415010164835,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 小丑女與小丑","handle":"iphone-12-mini-mod-nx-magsafe-printable-sb18","description":null,"published_at":"2024-06-11T17:55:33+08:00","created_at":"2024-05-05T20:05:39+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區Batman","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-batman","device-iPhone 12 mini","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-batman","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":41910906421347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31487914803299,"product_id":7415010164835,"position":4,"created_at":"2024-05-05T20:05:48+08:00","updated_at":"2024-05-05T20:05:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c37b6fb90da0797b631611fc4e41400130a8b09_33a01e46-418f-4956-b0a1-df6f427f9696.webp?v=1714910748","variant_ids":[41910906421347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 小丑女與小丑 - 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":"MPB0118424-SB18","featured_media":{"alt":null,"id":23893258829923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c37b6fb90da0797b631611fc4e41400130a8b09_33a01e46-418f-4956-b0a1-df6f427f9696.webp?v=1714910748"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/928cff5120330049404488c26be0a2e02d238809_4ad77078-7707-46f7-b542-c46cb1609acb.webp?v=1714910741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c237762fd62b246930d98a6a4299462f36acc08f_438c716b-b305-45e8-b0e2-03cb6ecddb64.webp?v=1714910744","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2124ff33ffe805d9eb1a212a1e1d818a6403dcb_2429d358-2090-442b-99fa-0d21dd07c70e.webp?v=1714910746","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c37b6fb90da0797b631611fc4e41400130a8b09_33a01e46-418f-4956-b0a1-df6f427f9696.webp?v=1714910748","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/579536f211fa5846a6c0022d7e512e9dac807635_f3dc2bbf-468a-4074-8177-febd7fa94166.webp?v=1714910751","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ba830fd7c07655ed154788fddf910a9f15a3e92_0b054181-042e-485f-8e8d-6e6a88aeff76.webp?v=1714910753","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a0f673bfa6ed89f29a3873fbb6000b5f3396e7_08e64c9c-51fe-4bd8-bd36-26455fadd7f5.webp?v=1714910756","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/009f236a0a0253bca1a6d6ad4a0e2ae2629938ba_f4b06a40-4e48-40d6-a435-259b8ec3041c.webp?v=1714910759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7658264ec6b7afbd79e15512a9e3096208aad8_a6522d6e-e06e-4f53-8dd0-e261d1704a78.webp?v=1714910761","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb505c7db6d33374282c0585fc00b1b3a165a6c5_a7250ccd-9d81-441e-87a8-836c66e3f137.webp?v=1714910764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d92c776b8cffcbc2519454867930cb12b650b1b9_7d0b9487-5104-460a-b4ec-f2c735f99c78.webp?v=1714910766"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/928cff5120330049404488c26be0a2e02d238809_4ad77078-7707-46f7-b542-c46cb1609acb.webp?v=1714910741","options":["color"],"media":[{"alt":null,"id":23893257224291,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/928cff5120330049404488c26be0a2e02d238809_4ad77078-7707-46f7-b542-c46cb1609acb.webp?v=1714910741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/928cff5120330049404488c26be0a2e02d238809_4ad77078-7707-46f7-b542-c46cb1609acb.webp?v=1714910741","width":2000},{"alt":null,"id":23893257748579,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c237762fd62b246930d98a6a4299462f36acc08f_438c716b-b305-45e8-b0e2-03cb6ecddb64.webp?v=1714910744"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c237762fd62b246930d98a6a4299462f36acc08f_438c716b-b305-45e8-b0e2-03cb6ecddb64.webp?v=1714910744","width":2000},{"alt":null,"id":23893258272867,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2124ff33ffe805d9eb1a212a1e1d818a6403dcb_2429d358-2090-442b-99fa-0d21dd07c70e.webp?v=1714910746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f2124ff33ffe805d9eb1a212a1e1d818a6403dcb_2429d358-2090-442b-99fa-0d21dd07c70e.webp?v=1714910746","width":2000},{"alt":null,"id":23893258829923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c37b6fb90da0797b631611fc4e41400130a8b09_33a01e46-418f-4956-b0a1-df6f427f9696.webp?v=1714910748"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c37b6fb90da0797b631611fc4e41400130a8b09_33a01e46-418f-4956-b0a1-df6f427f9696.webp?v=1714910748","width":2000},{"alt":null,"id":23893259518051,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/579536f211fa5846a6c0022d7e512e9dac807635_f3dc2bbf-468a-4074-8177-febd7fa94166.webp?v=1714910751"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/579536f211fa5846a6c0022d7e512e9dac807635_f3dc2bbf-468a-4074-8177-febd7fa94166.webp?v=1714910751","width":2000},{"alt":null,"id":23893260173411,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ba830fd7c07655ed154788fddf910a9f15a3e92_0b054181-042e-485f-8e8d-6e6a88aeff76.webp?v=1714910753"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ba830fd7c07655ed154788fddf910a9f15a3e92_0b054181-042e-485f-8e8d-6e6a88aeff76.webp?v=1714910753","width":2000},{"alt":null,"id":23893260730467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a0f673bfa6ed89f29a3873fbb6000b5f3396e7_08e64c9c-51fe-4bd8-bd36-26455fadd7f5.webp?v=1714910756"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7a0f673bfa6ed89f29a3873fbb6000b5f3396e7_08e64c9c-51fe-4bd8-bd36-26455fadd7f5.webp?v=1714910756","width":2000},{"alt":null,"id":23893261254755,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/009f236a0a0253bca1a6d6ad4a0e2ae2629938ba_f4b06a40-4e48-40d6-a435-259b8ec3041c.webp?v=1714910759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/009f236a0a0253bca1a6d6ad4a0e2ae2629938ba_f4b06a40-4e48-40d6-a435-259b8ec3041c.webp?v=1714910759","width":2000},{"alt":null,"id":23893262008419,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7658264ec6b7afbd79e15512a9e3096208aad8_a6522d6e-e06e-4f53-8dd0-e261d1704a78.webp?v=1714910761"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e7658264ec6b7afbd79e15512a9e3096208aad8_a6522d6e-e06e-4f53-8dd0-e261d1704a78.webp?v=1714910761","width":2000},{"alt":null,"id":23893262631011,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb505c7db6d33374282c0585fc00b1b3a165a6c5_a7250ccd-9d81-441e-87a8-836c66e3f137.webp?v=1714910764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cb505c7db6d33374282c0585fc00b1b3a165a6c5_a7250ccd-9d81-441e-87a8-836c66e3f137.webp?v=1714910764","width":2000},{"alt":null,"id":23893262958691,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d92c776b8cffcbc2519454867930cb12b650b1b9_7d0b9487-5104-460a-b4ec-f2c735f99c78.webp?v=1714910766"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d92c776b8cffcbc2519454867930cb12b650b1b9_7d0b9487-5104-460a-b4ec-f2c735f99c78.webp?v=1714910766","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41910906421347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31487914803299,"product_id":7415010164835,"position":4,"created_at":"2024-05-05T20:05:48+08:00","updated_at":"2024-05-05T20:05:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c37b6fb90da0797b631611fc4e41400130a8b09_33a01e46-418f-4956-b0a1-df6f427f9696.webp?v=1714910748","variant_ids":[41910906421347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 小丑女與小丑 - 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":"MPB0118424-SB18","featured_media":{"alt":null,"id":23893258829923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c37b6fb90da0797b631611fc4e41400130a8b09_33a01e46-418f-4956-b0a1-df6f427f9696.webp?v=1714910748"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41910906421347,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0118424-SB18","requires_shipping":true,"taxable":true,"featured_image":{"id":31487914803299,"product_id":7415010164835,"position":4,"created_at":"2024-05-05T20:05:48+08:00","updated_at":"2024-05-05T20:05:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c37b6fb90da0797b631611fc4e41400130a8b09_33a01e46-418f-4956-b0a1-df6f427f9696.webp?v=1714910748","variant_ids":[41910906421347]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 12 mini - Batman - 小丑女與小丑 - 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":"MPB0118424-SB18","featured_media":{"alt":null,"id":23893258829923,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c37b6fb90da0797b631611fc4e41400130a8b09_33a01e46-418f-4956-b0a1-df6f427f9696.webp?v=1714910748"}},"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: "停產"
}