$product = {"id":6902002483299,"title":"iPhone XS 犀牛盾SolidSuit防摔背蓋手機殼","handle":"iphone-xs-solidsuit-featured-product","description":"\u003cp\u003e\u003c\/p\u003e","published_at":"2023-03-21T09:12:45+08:00","created_at":"2023-03-21T09:13:03+08:00","vendor":"犀牛盾RHINOSHIELD","type":"SolidSuit","tags":["20%","2023-tagsAdd-reseller-PL","20240304-reseller-\u003ereplace_to-","25%","30%","35%","40%","45%","45degree","50%","brand-Apple","device-iphone XS","discountable-item","dropdownCollection-SolidSuit","dropdownDevice-Apple iPhone XS","iPhone XS","member","quickbuy","refresh-kelly-2025","reseller","reseller-asus","reseller-solidsuit","Top50","type-solidsuit-featured-product"],"price":73000,"price_min":73000,"price_max":73000,"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":40307748438115,"title":"黑色","option1":"黑色","option2":null,"option3":null,"sku":"SST0106452","requires_shipping":true,"taxable":true,"featured_image":{"id":29920944357475,"product_id":6902002483299,"position":1,"created_at":"2023-03-21T09:13:03+08:00","updated_at":"2023-03-21T09:13:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Black_6fe98c6b-b827-4311-8666-14c80b1ca719.png?v=1679361183","variant_ids":[40307748438115]},"available":true,"name":"iPhone XS 犀牛盾SolidSuit防摔背蓋手機殼 - 黑色","public_title":"黑色","options":["黑色"],"price":73000,"weight":0,"compare_at_price":null,"inventory_quantity":-583,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":22275165782115,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Black_6fe98c6b-b827-4311-8666-14c80b1ca719.png?v=1679361183"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40307748634723,"title":"鼠尾草綠","option1":"鼠尾草綠","option2":null,"option3":null,"sku":"SST01064P2","requires_shipping":true,"taxable":true,"featured_image":{"id":29920944554083,"product_id":6902002483299,"position":7,"created_at":"2023-03-21T09:13:03+08:00","updated_at":"2023-03-21T09:13:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Sage_Green_c34c3d69-2632-4eff-b93b-5a6c66035535.png?v=1679361183","variant_ids":[40307748634723]},"available":true,"name":"iPhone XS 犀牛盾SolidSuit防摔背蓋手機殼 - 鼠尾草綠","public_title":"鼠尾草綠","options":["鼠尾草綠"],"price":73000,"weight":0,"compare_at_price":null,"inventory_quantity":-214,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":22275165978723,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Sage_Green_c34c3d69-2632-4eff-b93b-5a6c66035535.png?v=1679361183"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Black_6fe98c6b-b827-4311-8666-14c80b1ca719.png?v=1679361183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_White_3a71cfb5-262d-4184-aefd-f4ca25733e9b.png?v=1679361183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Blush_Pink_375e63be-75db-40cc-a20e-d5e7ecc49836.png?v=1679361183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Ash_Grey_16e9ecc6-4c57-4f18-baad-35db1a2bb0d9.png?v=1679361183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Cobalt_Blue_29e7ca3c-b803-4838-929f-90a27039c109.png?v=1679361183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Violet_85ca1f29-f6dc-4479-be5a-2042a602a6bb.png?v=1679361183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Sage_Green_c34c3d69-2632-4eff-b93b-5a6c66035535.png?v=1679361183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone_carbon_SSA0106449_ed57b6c7-df81-4e6c-af7e-e92fbed7ab25.png?v=1679361183","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31864f621d627bab2b8fc1ba7ea4d5b7cd02d611_f9d5f338-7bb8-47de-978f-baf1f3c672c8.webp?v=1708658153"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Black_6fe98c6b-b827-4311-8666-14c80b1ca719.png?v=1679361183","options":["Color"],"media":[{"alt":null,"id":22275165782115,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Black_6fe98c6b-b827-4311-8666-14c80b1ca719.png?v=1679361183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Black_6fe98c6b-b827-4311-8666-14c80b1ca719.png?v=1679361183","width":2000},{"alt":null,"id":22275165814883,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_White_3a71cfb5-262d-4184-aefd-f4ca25733e9b.png?v=1679361183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_White_3a71cfb5-262d-4184-aefd-f4ca25733e9b.png?v=1679361183","width":2000},{"alt":null,"id":22275165847651,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Blush_Pink_375e63be-75db-40cc-a20e-d5e7ecc49836.png?v=1679361183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Blush_Pink_375e63be-75db-40cc-a20e-d5e7ecc49836.png?v=1679361183","width":2000},{"alt":null,"id":22275165880419,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Ash_Grey_16e9ecc6-4c57-4f18-baad-35db1a2bb0d9.png?v=1679361183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Ash_Grey_16e9ecc6-4c57-4f18-baad-35db1a2bb0d9.png?v=1679361183","width":2000},{"alt":null,"id":22275165913187,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Cobalt_Blue_29e7ca3c-b803-4838-929f-90a27039c109.png?v=1679361183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Cobalt_Blue_29e7ca3c-b803-4838-929f-90a27039c109.png?v=1679361183","width":2000},{"alt":null,"id":22275165945955,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Violet_85ca1f29-f6dc-4479-be5a-2042a602a6bb.png?v=1679361183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Violet_85ca1f29-f6dc-4479-be5a-2042a602a6bb.png?v=1679361183","width":2000},{"alt":null,"id":22275165978723,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Sage_Green_c34c3d69-2632-4eff-b93b-5a6c66035535.png?v=1679361183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Sage_Green_c34c3d69-2632-4eff-b93b-5a6c66035535.png?v=1679361183","width":2000},{"alt":null,"id":22275166011491,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone_carbon_SSA0106449_ed57b6c7-df81-4e6c-af7e-e92fbed7ab25.png?v=1679361183"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone_carbon_SSA0106449_ed57b6c7-df81-4e6c-af7e-e92fbed7ab25.png?v=1679361183","width":2000},{"alt":null,"id":23334766149731,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31864f621d627bab2b8fc1ba7ea4d5b7cd02d611_f9d5f338-7bb8-47de-978f-baf1f3c672c8.webp?v=1708658153"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/31864f621d627bab2b8fc1ba7ea4d5b7cd02d611_f9d5f338-7bb8-47de-978f-baf1f3c672c8.webp?v=1708658153","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cp\u003e\u003c\/p\u003e"}; $isMerge = null; $variants = [{"id":40307748438115,"title":"黑色","option1":"黑色","option2":null,"option3":null,"sku":"SST0106452","requires_shipping":true,"taxable":true,"featured_image":{"id":29920944357475,"product_id":6902002483299,"position":1,"created_at":"2023-03-21T09:13:03+08:00","updated_at":"2023-03-21T09:13:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Black_6fe98c6b-b827-4311-8666-14c80b1ca719.png?v=1679361183","variant_ids":[40307748438115]},"available":true,"name":"iPhone XS 犀牛盾SolidSuit防摔背蓋手機殼 - 黑色","public_title":"黑色","options":["黑色"],"price":73000,"weight":0,"compare_at_price":null,"inventory_quantity":-583,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":22275165782115,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Black_6fe98c6b-b827-4311-8666-14c80b1ca719.png?v=1679361183"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40307748634723,"title":"鼠尾草綠","option1":"鼠尾草綠","option2":null,"option3":null,"sku":"SST01064P2","requires_shipping":true,"taxable":true,"featured_image":{"id":29920944554083,"product_id":6902002483299,"position":7,"created_at":"2023-03-21T09:13:03+08:00","updated_at":"2023-03-21T09:13:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Sage_Green_c34c3d69-2632-4eff-b93b-5a6c66035535.png?v=1679361183","variant_ids":[40307748634723]},"available":true,"name":"iPhone XS 犀牛盾SolidSuit防摔背蓋手機殼 - 鼠尾草綠","public_title":"鼠尾草綠","options":["鼠尾草綠"],"price":73000,"weight":0,"compare_at_price":null,"inventory_quantity":-214,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":22275165978723,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Sage_Green_c34c3d69-2632-4eff-b93b-5a6c66035535.png?v=1679361183"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":40307748438115,"title":"黑色","option1":"黑色","option2":null,"option3":null,"sku":"SST0106452","requires_shipping":true,"taxable":true,"featured_image":{"id":29920944357475,"product_id":6902002483299,"position":1,"created_at":"2023-03-21T09:13:03+08:00","updated_at":"2023-03-21T09:13:03+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Black_6fe98c6b-b827-4311-8666-14c80b1ca719.png?v=1679361183","variant_ids":[40307748438115]},"available":true,"name":"iPhone XS 犀牛盾SolidSuit防摔背蓋手機殼 - 黑色","public_title":"黑色","options":["黑色"],"price":73000,"weight":0,"compare_at_price":null,"inventory_quantity":-583,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":22275165782115,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/iphone-xs-solidsuit-featured-product_Black_6fe98c6b-b827-4311-8666-14c80b1ca719.png?v=1679361183"}},"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: "停產" }