$product = {"id":7408553230435,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 星戰角色-漫畫系列","handle":"iphone-12-mini-mod-nx-printable-pb84","description":null,"published_at":"2024-06-11T16:40:31+08:00","created_at":"2024-05-03T15:49:22+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 12 mini","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":41886798381155,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31472575479907,"product_id":7408553230435,"position":7,"created_at":"2024-05-03T15:49:40+08:00","updated_at":"2024-05-03T15:49:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac9a48b028cfcf878865de72c662ce080bcdd3_89fa4c37-e332-427f-b7aa-806a72139243.webp?v=1714722580","variant_ids":[41886798381155]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB84","featured_media":{"alt":null,"id":23877492867171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac9a48b028cfcf878865de72c662ce080bcdd3_89fa4c37-e332-427f-b7aa-806a72139243.webp?v=1714722580"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7afe132f86821b1e93cb4fbea716ca7267e00a7_47e0f506-0e8a-481e-9644-482204cb0ef1.webp?v=1714722565","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ebe9e23be62335adc000b27c1a17a5cb8277661_ba4da9b9-156e-441b-b670-811e4a3e85b5.webp?v=1714722568","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da0a16b2b7effa0ae47afacfc3dbe669c6ef45e9_e10ccecb-16c6-4e23-ab02-54768fb6d6c4.webp?v=1714722570","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c128eb0cc4423e35896dec8e154c5011237684_98090d42-1fd5-4f00-ab30-2e3495a322f0.webp?v=1714722572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c514627866a39d6b6b3164248eee2eff79d4e28_35edb9df-f26b-4a30-ba00-72f9756c862a.webp?v=1714722575","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adf52c92d1b5a0bed6d700036863b589761f2fc4_264f37ad-77ac-4a58-9074-be3a518efb2c.webp?v=1714722577","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac9a48b028cfcf878865de72c662ce080bcdd3_89fa4c37-e332-427f-b7aa-806a72139243.webp?v=1714722580","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25976a65f0c08f014b9d2eb6da8bdd282f798374_a156f128-a994-40e8-879d-215d716f92ae.webp?v=1714722582","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adf689ccd8ba6b5fbaeb39be3f2c57cf1f697539_ee0b6d6b-31e9-44fa-a45b-c9618df3ad11.webp?v=1714722585","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59722d5bbef92512ab322d1c985511d7f6f10342_10672ec0-cd06-479d-9e5f-8025fca1f9e7.webp?v=1714722587","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e54bc2df407cdbafa79f55e580a4fbe84a53166_c94cfbf7-215c-4786-9b92-433a5e0ae808.webp?v=1714722590"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7afe132f86821b1e93cb4fbea716ca7267e00a7_47e0f506-0e8a-481e-9644-482204cb0ef1.webp?v=1714722565","options":["color"],"media":[{"alt":null,"id":23877489623139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7afe132f86821b1e93cb4fbea716ca7267e00a7_47e0f506-0e8a-481e-9644-482204cb0ef1.webp?v=1714722565"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c7afe132f86821b1e93cb4fbea716ca7267e00a7_47e0f506-0e8a-481e-9644-482204cb0ef1.webp?v=1714722565","width":2000},{"alt":null,"id":23877490114659,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ebe9e23be62335adc000b27c1a17a5cb8277661_ba4da9b9-156e-441b-b670-811e4a3e85b5.webp?v=1714722568"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6ebe9e23be62335adc000b27c1a17a5cb8277661_ba4da9b9-156e-441b-b670-811e4a3e85b5.webp?v=1714722568","width":2000},{"alt":null,"id":23877490868323,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da0a16b2b7effa0ae47afacfc3dbe669c6ef45e9_e10ccecb-16c6-4e23-ab02-54768fb6d6c4.webp?v=1714722570"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da0a16b2b7effa0ae47afacfc3dbe669c6ef45e9_e10ccecb-16c6-4e23-ab02-54768fb6d6c4.webp?v=1714722570","width":2000},{"alt":null,"id":23877491327075,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c128eb0cc4423e35896dec8e154c5011237684_98090d42-1fd5-4f00-ab30-2e3495a322f0.webp?v=1714722572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/98c128eb0cc4423e35896dec8e154c5011237684_98090d42-1fd5-4f00-ab30-2e3495a322f0.webp?v=1714722572","width":2000},{"alt":null,"id":23877491949667,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c514627866a39d6b6b3164248eee2eff79d4e28_35edb9df-f26b-4a30-ba00-72f9756c862a.webp?v=1714722575"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1c514627866a39d6b6b3164248eee2eff79d4e28_35edb9df-f26b-4a30-ba00-72f9756c862a.webp?v=1714722575","width":2000},{"alt":null,"id":23877492441187,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adf52c92d1b5a0bed6d700036863b589761f2fc4_264f37ad-77ac-4a58-9074-be3a518efb2c.webp?v=1714722577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adf52c92d1b5a0bed6d700036863b589761f2fc4_264f37ad-77ac-4a58-9074-be3a518efb2c.webp?v=1714722577","width":2000},{"alt":null,"id":23877492867171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac9a48b028cfcf878865de72c662ce080bcdd3_89fa4c37-e332-427f-b7aa-806a72139243.webp?v=1714722580"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac9a48b028cfcf878865de72c662ce080bcdd3_89fa4c37-e332-427f-b7aa-806a72139243.webp?v=1714722580","width":2000},{"alt":null,"id":23877493391459,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25976a65f0c08f014b9d2eb6da8bdd282f798374_a156f128-a994-40e8-879d-215d716f92ae.webp?v=1714722582"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/25976a65f0c08f014b9d2eb6da8bdd282f798374_a156f128-a994-40e8-879d-215d716f92ae.webp?v=1714722582","width":2000},{"alt":null,"id":23877493981283,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adf689ccd8ba6b5fbaeb39be3f2c57cf1f697539_ee0b6d6b-31e9-44fa-a45b-c9618df3ad11.webp?v=1714722585"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/adf689ccd8ba6b5fbaeb39be3f2c57cf1f697539_ee0b6d6b-31e9-44fa-a45b-c9618df3ad11.webp?v=1714722585","width":2000},{"alt":null,"id":23877494407267,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59722d5bbef92512ab322d1c985511d7f6f10342_10672ec0-cd06-479d-9e5f-8025fca1f9e7.webp?v=1714722587"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/59722d5bbef92512ab322d1c985511d7f6f10342_10672ec0-cd06-479d-9e5f-8025fca1f9e7.webp?v=1714722587","width":2000},{"alt":null,"id":23877495128163,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e54bc2df407cdbafa79f55e580a4fbe84a53166_c94cfbf7-215c-4786-9b92-433a5e0ae808.webp?v=1714722590"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e54bc2df407cdbafa79f55e580a4fbe84a53166_c94cfbf7-215c-4786-9b92-433a5e0ae808.webp?v=1714722590","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886798381155,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31472575479907,"product_id":7408553230435,"position":7,"created_at":"2024-05-03T15:49:40+08:00","updated_at":"2024-05-03T15:49:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac9a48b028cfcf878865de72c662ce080bcdd3_89fa4c37-e332-427f-b7aa-806a72139243.webp?v=1714722580","variant_ids":[41886798381155]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB84","featured_media":{"alt":null,"id":23877492867171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac9a48b028cfcf878865de72c662ce080bcdd3_89fa4c37-e332-427f-b7aa-806a72139243.webp?v=1714722580"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886798381155,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PB84","requires_shipping":true,"taxable":true,"featured_image":{"id":31472575479907,"product_id":7408553230435,"position":7,"created_at":"2024-05-03T15:49:40+08:00","updated_at":"2024-05-03T15:49:40+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac9a48b028cfcf878865de72c662ce080bcdd3_89fa4c37-e332-427f-b7aa-806a72139243.webp?v=1714722580","variant_ids":[41886798381155]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PB84","featured_media":{"alt":null,"id":23877492867171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac9a48b028cfcf878865de72c662ce080bcdd3_89fa4c37-e332-427f-b7aa-806a72139243.webp?v=1714722580"}},"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: "停產" }