$product = {"id":6978100822115,"title":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪","handle":"iphone-12-mini-solidsuit-classic-pd02","description":null,"published_at":"2023-08-01T14:48:54+08:00","created_at":"2023-07-22T23:01:04+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit MagSafe專區-華納兄弟百年慶典 Warner Bros 100th Anniversary","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-pixar","device-iPhone 12 Mini","merge","reseller-pixar"],"price":83000,"price_min":83000,"price_max":83000,"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":40569431916643,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131154788451,"product_id":6978100822115,"position":5,"created_at":"2026-06-30T15:14:25+08:00","updated_at":"2026-06-30T15:14:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb5fbe561451370be1e07a107903afdf5016498.webp?v=1782803667","variant_ids":[40569431916643]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-PD02","featured_media":{"alt":null,"id":27636102234211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb5fbe561451370be1e07a107903afdf5016498.webp?v=1782803667"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40569432047715,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131155443811,"product_id":6978100822115,"position":6,"created_at":"2026-06-30T15:14:25+08:00","updated_at":"2026-06-30T15:14:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d42dfece523e6d570cf4d49d87b1a9f99ac76831.webp?v=1782803667","variant_ids":[40569432047715]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-PD02","featured_media":{"alt":null,"id":27636102889571,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d42dfece523e6d570cf4d49d87b1a9f99ac76831.webp?v=1782803667"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40569432113251,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"SST01184P2-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131153084515,"product_id":6978100822115,"position":2,"created_at":"2026-06-30T15:14:23+08:00","updated_at":"2026-06-30T15:14:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/815a51192464f9b6fe5fa391231e6c4646fe4498.webp?v=1782803665","variant_ids":[40569432113251]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184P2-PD02","featured_media":{"alt":null,"id":27636100530275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/815a51192464f9b6fe5fa391231e6c4646fe4498.webp?v=1782803665"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40569432178787,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"SST01184Z8-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131153608803,"product_id":6978100822115,"position":3,"created_at":"2026-06-30T15:14:24+08:00","updated_at":"2026-06-30T15:14:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9b5f8a32b1ea2997391bcfae66a6992d0380014.webp?v=1782803666","variant_ids":[40569432178787]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184Z8-PD02","featured_media":{"alt":null,"id":27636101054563,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9b5f8a32b1ea2997391bcfae66a6992d0380014.webp?v=1782803666"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40569432244323,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"SST011840A-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131156033635,"product_id":6978100822115,"position":7,"created_at":"2026-06-30T15:14:26+08:00","updated_at":"2026-06-30T15:14:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91ae53f53568b60262ec92731d9f74b55539dfe4.webp?v=1782803668","variant_ids":[40569432244323]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840A-PD02","featured_media":{"alt":null,"id":27636103446627,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91ae53f53568b60262ec92731d9f74b55539dfe4.webp?v=1782803668"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40569432277091,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131154231395,"product_id":6978100822115,"position":4,"created_at":"2026-06-30T15:14:24+08:00","updated_at":"2026-06-30T15:14:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c8d1c1929651be59aa4b7d65dedc99d41d5f32.webp?v=1782803666","variant_ids":[40569432277091]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-PD02","featured_media":{"alt":null,"id":27636101677155,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c8d1c1929651be59aa4b7d65dedc99d41d5f32.webp?v=1782803666"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-184-PD02_3b19889f-9161-4d12-863a-0e1de27de64a.png?v=1690038066","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/815a51192464f9b6fe5fa391231e6c4646fe4498.webp?v=1782803665","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9b5f8a32b1ea2997391bcfae66a6992d0380014.webp?v=1782803666","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c8d1c1929651be59aa4b7d65dedc99d41d5f32.webp?v=1782803666","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb5fbe561451370be1e07a107903afdf5016498.webp?v=1782803667","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d42dfece523e6d570cf4d49d87b1a9f99ac76831.webp?v=1782803667","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91ae53f53568b60262ec92731d9f74b55539dfe4.webp?v=1782803668"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-184-PD02_3b19889f-9161-4d12-863a-0e1de27de64a.png?v=1690038066","options":["color"],"media":[{"alt":null,"id":22622697848931,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-184-PD02_3b19889f-9161-4d12-863a-0e1de27de64a.png?v=1690038066"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-184-PD02_3b19889f-9161-4d12-863a-0e1de27de64a.png?v=1690038066","width":2000},{"alt":null,"id":27636100530275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/815a51192464f9b6fe5fa391231e6c4646fe4498.webp?v=1782803665"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/815a51192464f9b6fe5fa391231e6c4646fe4498.webp?v=1782803665","width":2000},{"alt":null,"id":27636101054563,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9b5f8a32b1ea2997391bcfae66a6992d0380014.webp?v=1782803666"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9b5f8a32b1ea2997391bcfae66a6992d0380014.webp?v=1782803666","width":2000},{"alt":null,"id":27636101677155,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c8d1c1929651be59aa4b7d65dedc99d41d5f32.webp?v=1782803666"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c8d1c1929651be59aa4b7d65dedc99d41d5f32.webp?v=1782803666","width":2000},{"alt":null,"id":27636102234211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb5fbe561451370be1e07a107903afdf5016498.webp?v=1782803667"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb5fbe561451370be1e07a107903afdf5016498.webp?v=1782803667","width":2000},{"alt":null,"id":27636102889571,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d42dfece523e6d570cf4d49d87b1a9f99ac76831.webp?v=1782803667"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d42dfece523e6d570cf4d49d87b1a9f99ac76831.webp?v=1782803667","width":2000},{"alt":null,"id":27636103446627,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91ae53f53568b60262ec92731d9f74b55539dfe4.webp?v=1782803668"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91ae53f53568b60262ec92731d9f74b55539dfe4.webp?v=1782803668","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":40569431916643,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131154788451,"product_id":6978100822115,"position":5,"created_at":"2026-06-30T15:14:25+08:00","updated_at":"2026-06-30T15:14:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb5fbe561451370be1e07a107903afdf5016498.webp?v=1782803667","variant_ids":[40569431916643]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-PD02","featured_media":{"alt":null,"id":27636102234211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb5fbe561451370be1e07a107903afdf5016498.webp?v=1782803667"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40569432047715,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131155443811,"product_id":6978100822115,"position":6,"created_at":"2026-06-30T15:14:25+08:00","updated_at":"2026-06-30T15:14:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d42dfece523e6d570cf4d49d87b1a9f99ac76831.webp?v=1782803667","variant_ids":[40569432047715]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-PD02","featured_media":{"alt":null,"id":27636102889571,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d42dfece523e6d570cf4d49d87b1a9f99ac76831.webp?v=1782803667"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40569432113251,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"SST01184P2-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131153084515,"product_id":6978100822115,"position":2,"created_at":"2026-06-30T15:14:23+08:00","updated_at":"2026-06-30T15:14:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/815a51192464f9b6fe5fa391231e6c4646fe4498.webp?v=1782803665","variant_ids":[40569432113251]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184P2-PD02","featured_media":{"alt":null,"id":27636100530275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/815a51192464f9b6fe5fa391231e6c4646fe4498.webp?v=1782803665"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40569432178787,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"SST01184Z8-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131153608803,"product_id":6978100822115,"position":3,"created_at":"2026-06-30T15:14:24+08:00","updated_at":"2026-06-30T15:14:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9b5f8a32b1ea2997391bcfae66a6992d0380014.webp?v=1782803666","variant_ids":[40569432178787]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184Z8-PD02","featured_media":{"alt":null,"id":27636101054563,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c9b5f8a32b1ea2997391bcfae66a6992d0380014.webp?v=1782803666"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40569432244323,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"SST011840A-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131156033635,"product_id":6978100822115,"position":7,"created_at":"2026-06-30T15:14:26+08:00","updated_at":"2026-06-30T15:14:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91ae53f53568b60262ec92731d9f74b55539dfe4.webp?v=1782803668","variant_ids":[40569432244323]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840A-PD02","featured_media":{"alt":null,"id":27636103446627,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91ae53f53568b60262ec92731d9f74b55539dfe4.webp?v=1782803668"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40569432277091,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131154231395,"product_id":6978100822115,"position":4,"created_at":"2026-06-30T15:14:24+08:00","updated_at":"2026-06-30T15:14:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c8d1c1929651be59aa4b7d65dedc99d41d5f32.webp?v=1782803666","variant_ids":[40569432277091]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-PD02","featured_media":{"alt":null,"id":27636101677155,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/71c8d1c1929651be59aa4b7d65dedc99d41d5f32.webp?v=1782803666"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":40569431916643,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-PD02","requires_shipping":true,"taxable":true,"featured_image":{"id":36131154788451,"product_id":6978100822115,"position":5,"created_at":"2026-06-30T15:14:25+08:00","updated_at":"2026-06-30T15:14:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb5fbe561451370be1e07a107903afdf5016498.webp?v=1782803667","variant_ids":[40569431916643]},"available":true,"name":"iPhone 12 mini SolidSuit 迪士尼-皮克斯 Knock! 毛怪 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-PD02","featured_media":{"alt":null,"id":27636102234211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/efb5fbe561451370be1e07a107903afdf5016498.webp?v=1782803667"}},"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: "停產" }