$product = {"id":7407678095459,"title":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 眾紅風暴兵","handle":"iphone-14-plus-mod-nx-printable-pc02","description":null,"published_at":"2024-06-11T16:21:52+08:00","created_at":"2024-05-03T10:40:33+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 14 Plus","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":41877534998627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC02","requires_shipping":true,"taxable":true,"featured_image":{"id":31470202126435,"product_id":7407678095459,"position":4,"created_at":"2024-05-03T10:40:44+08:00","updated_at":"2024-05-03T10:40:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecfff670dbe4fdcbd8543425cbfb5e27d9e4c132_ae9f2302-06a4-41a0-a7f8-fc152b4056f9.webp?v=1714704044","variant_ids":[41877534998627]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PC02","featured_media":{"alt":null,"id":23875105095779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecfff670dbe4fdcbd8543425cbfb5e27d9e4c132_ae9f2302-06a4-41a0-a7f8-fc152b4056f9.webp?v=1714704044"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65cdee8c45026481b523ecaaedc6f9dcb7026ffb_f45de852-fcff-4949-9c65-72d0f499e5b3.webp?v=1714704036","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/882ed97785b7223557446125f358af709808a7af_dd98bdff-3f05-4e09-b39a-13f466db52d9.webp?v=1714704039","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db83f7b7fbeae229a9c0ec5776d0d3868be03a1a_059801c1-99a9-4ab1-84a8-c25937b0c97e.webp?v=1714704041","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecfff670dbe4fdcbd8543425cbfb5e27d9e4c132_ae9f2302-06a4-41a0-a7f8-fc152b4056f9.webp?v=1714704044","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e977378ecfa8be1d45aff70776504cc473ca6b0_6f894ca7-9446-4ab8-be77-bf607e285ad0.webp?v=1714704046","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fc2ce0e962cd558d34d7737261409a7dcd6b9bd_112c1515-94dc-414d-aa72-e5351f866100.webp?v=1714704049","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d15382479c80d6c9d5c5e664523cf68e9623a3dc_5d04779f-8493-4bc4-82e7-59e29fdb8309.webp?v=1714704051","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1827cc1b460a5d504e8451362a0c35d86f5f89ae_16821365-63c5-4860-9226-4f9c8a6f884c.webp?v=1714704054","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88488c13748f9eddb1790375e3074535259d1fb1_33022546-ff7a-431f-a025-e19b0d3874b6.webp?v=1714704056","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc57004b0cc5243363cf6fc596c4e5828f0d66_4fa5d9a1-0f09-49d4-b62e-c21df7c7e566.webp?v=1714704059"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65cdee8c45026481b523ecaaedc6f9dcb7026ffb_f45de852-fcff-4949-9c65-72d0f499e5b3.webp?v=1714704036","options":["color"],"media":[{"alt":null,"id":23875102343267,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65cdee8c45026481b523ecaaedc6f9dcb7026ffb_f45de852-fcff-4949-9c65-72d0f499e5b3.webp?v=1714704036"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65cdee8c45026481b523ecaaedc6f9dcb7026ffb_f45de852-fcff-4949-9c65-72d0f499e5b3.webp?v=1714704036","width":2000},{"alt":null,"id":23875103096931,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/882ed97785b7223557446125f358af709808a7af_dd98bdff-3f05-4e09-b39a-13f466db52d9.webp?v=1714704039"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/882ed97785b7223557446125f358af709808a7af_dd98bdff-3f05-4e09-b39a-13f466db52d9.webp?v=1714704039","width":2000},{"alt":null,"id":23875104505955,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db83f7b7fbeae229a9c0ec5776d0d3868be03a1a_059801c1-99a9-4ab1-84a8-c25937b0c97e.webp?v=1714704041"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/db83f7b7fbeae229a9c0ec5776d0d3868be03a1a_059801c1-99a9-4ab1-84a8-c25937b0c97e.webp?v=1714704041","width":2000},{"alt":null,"id":23875105095779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecfff670dbe4fdcbd8543425cbfb5e27d9e4c132_ae9f2302-06a4-41a0-a7f8-fc152b4056f9.webp?v=1714704044"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecfff670dbe4fdcbd8543425cbfb5e27d9e4c132_ae9f2302-06a4-41a0-a7f8-fc152b4056f9.webp?v=1714704044","width":2000},{"alt":null,"id":23875105718371,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e977378ecfa8be1d45aff70776504cc473ca6b0_6f894ca7-9446-4ab8-be77-bf607e285ad0.webp?v=1714704046"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7e977378ecfa8be1d45aff70776504cc473ca6b0_6f894ca7-9446-4ab8-be77-bf607e285ad0.webp?v=1714704046","width":2000},{"alt":null,"id":23875106504803,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fc2ce0e962cd558d34d7737261409a7dcd6b9bd_112c1515-94dc-414d-aa72-e5351f866100.webp?v=1714704049"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3fc2ce0e962cd558d34d7737261409a7dcd6b9bd_112c1515-94dc-414d-aa72-e5351f866100.webp?v=1714704049","width":2000},{"alt":null,"id":23875106996323,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d15382479c80d6c9d5c5e664523cf68e9623a3dc_5d04779f-8493-4bc4-82e7-59e29fdb8309.webp?v=1714704051"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d15382479c80d6c9d5c5e664523cf68e9623a3dc_5d04779f-8493-4bc4-82e7-59e29fdb8309.webp?v=1714704051","width":2000},{"alt":null,"id":23875107651683,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1827cc1b460a5d504e8451362a0c35d86f5f89ae_16821365-63c5-4860-9226-4f9c8a6f884c.webp?v=1714704054"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1827cc1b460a5d504e8451362a0c35d86f5f89ae_16821365-63c5-4860-9226-4f9c8a6f884c.webp?v=1714704054","width":2000},{"alt":null,"id":23875108601955,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88488c13748f9eddb1790375e3074535259d1fb1_33022546-ff7a-431f-a025-e19b0d3874b6.webp?v=1714704056"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88488c13748f9eddb1790375e3074535259d1fb1_33022546-ff7a-431f-a025-e19b0d3874b6.webp?v=1714704056","width":2000},{"alt":null,"id":23875109191779,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc57004b0cc5243363cf6fc596c4e5828f0d66_4fa5d9a1-0f09-49d4-b62e-c21df7c7e566.webp?v=1714704059"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5efc57004b0cc5243363cf6fc596c4e5828f0d66_4fa5d9a1-0f09-49d4-b62e-c21df7c7e566.webp?v=1714704059","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41877534998627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC02","requires_shipping":true,"taxable":true,"featured_image":{"id":31470202126435,"product_id":7407678095459,"position":4,"created_at":"2024-05-03T10:40:44+08:00","updated_at":"2024-05-03T10:40:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecfff670dbe4fdcbd8543425cbfb5e27d9e4c132_ae9f2302-06a4-41a0-a7f8-fc152b4056f9.webp?v=1714704044","variant_ids":[41877534998627]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PC02","featured_media":{"alt":null,"id":23875105095779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecfff670dbe4fdcbd8543425cbfb5e27d9e4c132_ae9f2302-06a4-41a0-a7f8-fc152b4056f9.webp?v=1714704044"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41877534998627,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0126124-PC02","requires_shipping":true,"taxable":true,"featured_image":{"id":31470202126435,"product_id":7407678095459,"position":4,"created_at":"2024-05-03T10:40:44+08:00","updated_at":"2024-05-03T10:40:44+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecfff670dbe4fdcbd8543425cbfb5e27d9e4c132_ae9f2302-06a4-41a0-a7f8-fc152b4056f9.webp?v=1714704044","variant_ids":[41877534998627]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 14 Plus - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0126124-PC02","featured_media":{"alt":null,"id":23875105095779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ecfff670dbe4fdcbd8543425cbfb5e27d9e4c132_ae9f2302-06a4-41a0-a7f8-fc152b4056f9.webp?v=1714704044"}},"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: "停產" }