$product = {"id":7411345916003,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Plus - 迪士尼-星際大戰 Star Wars - 星際大戰四部曲:曙光乍現-電影海報","handle":"iphone-14-plus-mod-nx-magsafe-printable-pb101","description":null,"published_at":"2024-06-11T17:42:27+08:00","created_at":"2024-05-05T00:11:51+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 14 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":41897725362275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31480192565347,"product_id":7411345916003,"position":1,"created_at":"2024-05-05T00:11:53+08:00","updated_at":"2024-05-05T00:11:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32293e00ef7151becb28f82780432ddcc2e87abc_f93ffd58-c63d-481c-82c5-46ee3f55dbf5.webp?v=1714839113","variant_ids":[41897725362275]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 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":"MPB0126124-PB101","featured_media":{"alt":null,"id":23885443563619,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32293e00ef7151becb28f82780432ddcc2e87abc_f93ffd58-c63d-481c-82c5-46ee3f55dbf5.webp?v=1714839113"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32293e00ef7151becb28f82780432ddcc2e87abc_f93ffd58-c63d-481c-82c5-46ee3f55dbf5.webp?v=1714839113","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e30a41f8f69c890fbac14ab0e49fa8e57d4194e3_b2ff2fc2-3117-4563-a796-ccdde1c9ca84.webp?v=1714839116","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e64f627fdb3615f044906b3a4039eee284d152_43e67bd2-606d-4daa-af2d-f4cc8f1baef6.webp?v=1714839118","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b535f8354485d51fce8178985a6ae0460217a84_7de3a1ff-2581-4bac-b1b6-ec17ef3ba8d8.webp?v=1714839120","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/038b256ae226bfce3b2184f326c1ef9d765b6c8d_efea2775-9ad6-4066-adde-e55b23f18822.webp?v=1714839122","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72fe8f5e1c66b0a7bbb814542de54d92e6591e23_e711ab0e-4ce6-4cee-ba42-c0cbaa7bce84.webp?v=1714839125","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8c02c07b052f32bd2657ff07500a7d4d821193_55fb597b-574a-409b-b7d0-772cb5b38de8.webp?v=1714839127","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b3b22340175f078eaec63ad94b69c1a1bdbc8ea_c12d2499-d08b-437d-a531-aee3e41c7d66.webp?v=1714839129","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56a9b9be1d306d3533762f2ed2fc735fca7292c_67373de3-74c3-40a1-b0a0-99be77d7dbc2.webp?v=1714839132","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f30b5aece170087148a1573dbe52d3238486263_f3e37310-e037-4bef-9b87-982054ab3891.webp?v=1714839134"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32293e00ef7151becb28f82780432ddcc2e87abc_f93ffd58-c63d-481c-82c5-46ee3f55dbf5.webp?v=1714839113","options":["color"],"media":[{"alt":null,"id":23885443563619,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32293e00ef7151becb28f82780432ddcc2e87abc_f93ffd58-c63d-481c-82c5-46ee3f55dbf5.webp?v=1714839113"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32293e00ef7151becb28f82780432ddcc2e87abc_f93ffd58-c63d-481c-82c5-46ee3f55dbf5.webp?v=1714839113","width":2000},{"alt":null,"id":23885444186211,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e30a41f8f69c890fbac14ab0e49fa8e57d4194e3_b2ff2fc2-3117-4563-a796-ccdde1c9ca84.webp?v=1714839116"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e30a41f8f69c890fbac14ab0e49fa8e57d4194e3_b2ff2fc2-3117-4563-a796-ccdde1c9ca84.webp?v=1714839116","width":2000},{"alt":null,"id":23885444710499,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e64f627fdb3615f044906b3a4039eee284d152_43e67bd2-606d-4daa-af2d-f4cc8f1baef6.webp?v=1714839118"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5e64f627fdb3615f044906b3a4039eee284d152_43e67bd2-606d-4daa-af2d-f4cc8f1baef6.webp?v=1714839118","width":2000},{"alt":null,"id":23885445267555,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b535f8354485d51fce8178985a6ae0460217a84_7de3a1ff-2581-4bac-b1b6-ec17ef3ba8d8.webp?v=1714839120"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7b535f8354485d51fce8178985a6ae0460217a84_7de3a1ff-2581-4bac-b1b6-ec17ef3ba8d8.webp?v=1714839120","width":2000},{"alt":null,"id":23885445759075,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/038b256ae226bfce3b2184f326c1ef9d765b6c8d_efea2775-9ad6-4066-adde-e55b23f18822.webp?v=1714839122"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/038b256ae226bfce3b2184f326c1ef9d765b6c8d_efea2775-9ad6-4066-adde-e55b23f18822.webp?v=1714839122","width":2000},{"alt":null,"id":23885446283363,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72fe8f5e1c66b0a7bbb814542de54d92e6591e23_e711ab0e-4ce6-4cee-ba42-c0cbaa7bce84.webp?v=1714839125"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/72fe8f5e1c66b0a7bbb814542de54d92e6591e23_e711ab0e-4ce6-4cee-ba42-c0cbaa7bce84.webp?v=1714839125","width":2000},{"alt":null,"id":23885446742115,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8c02c07b052f32bd2657ff07500a7d4d821193_55fb597b-574a-409b-b7d0-772cb5b38de8.webp?v=1714839127"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b8c02c07b052f32bd2657ff07500a7d4d821193_55fb597b-574a-409b-b7d0-772cb5b38de8.webp?v=1714839127","width":2000},{"alt":null,"id":23885447430243,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b3b22340175f078eaec63ad94b69c1a1bdbc8ea_c12d2499-d08b-437d-a531-aee3e41c7d66.webp?v=1714839129"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b3b22340175f078eaec63ad94b69c1a1bdbc8ea_c12d2499-d08b-437d-a531-aee3e41c7d66.webp?v=1714839129","width":2000},{"alt":null,"id":23885447921763,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56a9b9be1d306d3533762f2ed2fc735fca7292c_67373de3-74c3-40a1-b0a0-99be77d7dbc2.webp?v=1714839132"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d56a9b9be1d306d3533762f2ed2fc735fca7292c_67373de3-74c3-40a1-b0a0-99be77d7dbc2.webp?v=1714839132","width":2000},{"alt":null,"id":23885448380515,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f30b5aece170087148a1573dbe52d3238486263_f3e37310-e037-4bef-9b87-982054ab3891.webp?v=1714839134"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7f30b5aece170087148a1573dbe52d3238486263_f3e37310-e037-4bef-9b87-982054ab3891.webp?v=1714839134","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":41897725362275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31480192565347,"product_id":7411345916003,"position":1,"created_at":"2024-05-05T00:11:53+08:00","updated_at":"2024-05-05T00:11:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32293e00ef7151becb28f82780432ddcc2e87abc_f93ffd58-c63d-481c-82c5-46ee3f55dbf5.webp?v=1714839113","variant_ids":[41897725362275]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 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":"MPB0126124-PB101","featured_media":{"alt":null,"id":23885443563619,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32293e00ef7151becb28f82780432ddcc2e87abc_f93ffd58-c63d-481c-82c5-46ee3f55dbf5.webp?v=1714839113"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41897725362275,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126124-PB101","requires_shipping":true,"taxable":true,"featured_image":{"id":31480192565347,"product_id":7411345916003,"position":1,"created_at":"2024-05-05T00:11:53+08:00","updated_at":"2024-05-05T00:11:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32293e00ef7151becb28f82780432ddcc2e87abc_f93ffd58-c63d-481c-82c5-46ee3f55dbf5.webp?v=1714839113","variant_ids":[41897725362275]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 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":"MPB0126124-PB101","featured_media":{"alt":null,"id":23885443563619,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32293e00ef7151becb28f82780432ddcc2e87abc_f93ffd58-c63d-481c-82c5-46ee3f55dbf5.webp?v=1714839113"}},"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: "停產"
}