$product = {"id":7415906730083,"title":"犀牛盾Mod NX手機殼 - iPhone XS Max - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 死星-潮流系列","handle":"iphone-xs-max-mod-nx-printable-pb43","description":null,"published_at":"2024-06-11T16:47:37+08:00","created_at":"2024-05-06T12:22:32+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":41915410743395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB43","requires_shipping":true,"taxable":true,"featured_image":{"id":31490703655011,"product_id":7415906730083,"position":2,"created_at":"2024-05-06T12:22:37+08:00","updated_at":"2024-05-06T12:22:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a1907c8c9601b66c3e9f2a5a59cf147c5ec0a2_70833677-933a-4472-9681-99f3cd3739d3.webp?v=1714969357","variant_ids":[41915410743395]},"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-PB43","featured_media":{"alt":null,"id":23896110465123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a1907c8c9601b66c3e9f2a5a59cf147c5ec0a2_70833677-933a-4472-9681-99f3cd3739d3.webp?v=1714969357"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc1a28daaa1c37876ccbf212e0d3b1899b693aa4_608440c3-5e14-4142-96d9-392607e235db.webp?v=1714969355","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a1907c8c9601b66c3e9f2a5a59cf147c5ec0a2_70833677-933a-4472-9681-99f3cd3739d3.webp?v=1714969357","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c698cb42455f622f0102a0901a416e5da7444cc_cabca381-9835-495a-9447-b7482f93ae97.webp?v=1714969360","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ae6894d45de3cca78d096ed008e470f54564934_fb7248a1-3fdc-4fb6-8c08-36f0ab219f19.webp?v=1714969362","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbaa89b495ded67911f819e5928f229aeacd59cd_dbfc445d-6847-4f90-8249-2228c22bad35.webp?v=1714969365","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b129d9019428f8e54c32839cc01f54dd2d5c145_ad43045d-4a77-4672-a368-874cca190181.webp?v=1714969368","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ac1c323c86f2057650c27eaaa07542fa052df67_88999866-f350-4e3f-92b6-9be938847196.webp?v=1714969370","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9af56ad07153aa7a29a4647803a87221bcaae752_2f31aaa0-b146-4949-9a4a-e0df34bbb670.webp?v=1714969373","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be2480a6fd3b2942c48da3ac64c222f3f8e422f2_2844ad88-5d45-48b7-ae40-e2e11fab9534.webp?v=1714969376","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5f6805bd88dacd82c0e6c6d81948c95c7fa74b4_08191b70-4134-4bfb-96b8-09ccd2b3abfb.webp?v=1714969378"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc1a28daaa1c37876ccbf212e0d3b1899b693aa4_608440c3-5e14-4142-96d9-392607e235db.webp?v=1714969355","options":["color"],"media":[{"alt":null,"id":23896109973603,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc1a28daaa1c37876ccbf212e0d3b1899b693aa4_608440c3-5e14-4142-96d9-392607e235db.webp?v=1714969355"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bc1a28daaa1c37876ccbf212e0d3b1899b693aa4_608440c3-5e14-4142-96d9-392607e235db.webp?v=1714969355","width":2000},{"alt":null,"id":23896110465123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a1907c8c9601b66c3e9f2a5a59cf147c5ec0a2_70833677-933a-4472-9681-99f3cd3739d3.webp?v=1714969357"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a1907c8c9601b66c3e9f2a5a59cf147c5ec0a2_70833677-933a-4472-9681-99f3cd3739d3.webp?v=1714969357","width":2000},{"alt":null,"id":23896110825571,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c698cb42455f622f0102a0901a416e5da7444cc_cabca381-9835-495a-9447-b7482f93ae97.webp?v=1714969360"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5c698cb42455f622f0102a0901a416e5da7444cc_cabca381-9835-495a-9447-b7482f93ae97.webp?v=1714969360","width":2000},{"alt":null,"id":23896111415395,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ae6894d45de3cca78d096ed008e470f54564934_fb7248a1-3fdc-4fb6-8c08-36f0ab219f19.webp?v=1714969362"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ae6894d45de3cca78d096ed008e470f54564934_fb7248a1-3fdc-4fb6-8c08-36f0ab219f19.webp?v=1714969362","width":2000},{"alt":null,"id":23896111808611,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbaa89b495ded67911f819e5928f229aeacd59cd_dbfc445d-6847-4f90-8249-2228c22bad35.webp?v=1714969365"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbaa89b495ded67911f819e5928f229aeacd59cd_dbfc445d-6847-4f90-8249-2228c22bad35.webp?v=1714969365","width":2000},{"alt":null,"id":23896112431203,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b129d9019428f8e54c32839cc01f54dd2d5c145_ad43045d-4a77-4672-a368-874cca190181.webp?v=1714969368"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b129d9019428f8e54c32839cc01f54dd2d5c145_ad43045d-4a77-4672-a368-874cca190181.webp?v=1714969368","width":2000},{"alt":null,"id":23896112791651,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ac1c323c86f2057650c27eaaa07542fa052df67_88999866-f350-4e3f-92b6-9be938847196.webp?v=1714969370"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ac1c323c86f2057650c27eaaa07542fa052df67_88999866-f350-4e3f-92b6-9be938847196.webp?v=1714969370","width":2000},{"alt":null,"id":23896113610851,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9af56ad07153aa7a29a4647803a87221bcaae752_2f31aaa0-b146-4949-9a4a-e0df34bbb670.webp?v=1714969373"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9af56ad07153aa7a29a4647803a87221bcaae752_2f31aaa0-b146-4949-9a4a-e0df34bbb670.webp?v=1714969373","width":2000},{"alt":null,"id":23896114167907,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be2480a6fd3b2942c48da3ac64c222f3f8e422f2_2844ad88-5d45-48b7-ae40-e2e11fab9534.webp?v=1714969376"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be2480a6fd3b2942c48da3ac64c222f3f8e422f2_2844ad88-5d45-48b7-ae40-e2e11fab9534.webp?v=1714969376","width":2000},{"alt":null,"id":23896114659427,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5f6805bd88dacd82c0e6c6d81948c95c7fa74b4_08191b70-4134-4bfb-96b8-09ccd2b3abfb.webp?v=1714969378"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5f6805bd88dacd82c0e6c6d81948c95c7fa74b4_08191b70-4134-4bfb-96b8-09ccd2b3abfb.webp?v=1714969378","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41915410743395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB43","requires_shipping":true,"taxable":true,"featured_image":{"id":31490703655011,"product_id":7415906730083,"position":2,"created_at":"2024-05-06T12:22:37+08:00","updated_at":"2024-05-06T12:22:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a1907c8c9601b66c3e9f2a5a59cf147c5ec0a2_70833677-933a-4472-9681-99f3cd3739d3.webp?v=1714969357","variant_ids":[41915410743395]},"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-PB43","featured_media":{"alt":null,"id":23896110465123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a1907c8c9601b66c3e9f2a5a59cf147c5ec0a2_70833677-933a-4472-9681-99f3cd3739d3.webp?v=1714969357"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41915410743395,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0108624-PB43","requires_shipping":true,"taxable":true,"featured_image":{"id":31490703655011,"product_id":7415906730083,"position":2,"created_at":"2024-05-06T12:22:37+08:00","updated_at":"2024-05-06T12:22:37+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a1907c8c9601b66c3e9f2a5a59cf147c5ec0a2_70833677-933a-4472-9681-99f3cd3739d3.webp?v=1714969357","variant_ids":[41915410743395]},"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-PB43","featured_media":{"alt":null,"id":23896110465123,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a1907c8c9601b66c3e9f2a5a59cf147c5ec0a2_70833677-933a-4472-9681-99f3cd3739d3.webp?v=1714969357"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $brand_handle = null; $type = ""; var sellingStatus // 只有設計款(SKU 含 '-')才需要合圖 if ($isMerge && $defaultVariant.sku.includes('-')) { $(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: "停產" }