$product = {"id":6981159911523,"title":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車","handle":"iphone-12-mini-solidsuit-classic-gg49","description":null,"published_at":"2023-08-01T17:57:21+08:00","created_at":"2023-07-26T19:49:39+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit MagSafe專區-齊柏林《看見台灣》十週年原創設計系列","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-jimmy","device-iPhone 12 Mini","merge","reseller-jimmy"],"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":40583995392099,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179289636963,"product_id":6981159911523,"position":6,"created_at":"2026-07-06T09:44:51+08:00","updated_at":"2026-07-06T09:44:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dee49b86c3c5b728df0775172a1aabc3bc9366b.webp?v=1783302293","variant_ids":[40583995392099]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-GG49","featured_media":{"alt":null,"id":27684124033123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dee49b86c3c5b728df0775172a1aabc3bc9366b.webp?v=1783302293"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40583995523171,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179289178211,"product_id":6981159911523,"position":3,"created_at":"2026-07-06T09:44:49+08:00","updated_at":"2026-07-06T09:44:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96861027f2e19c6e1ea26bff9693009050956ad3.webp?v=1783302291","variant_ids":[40583995523171]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-GG49","featured_media":{"alt":null,"id":27684123574371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96861027f2e19c6e1ea26bff9693009050956ad3.webp?v=1783302291"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40583995654243,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"SST01184P2-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179289571427,"product_id":6981159911523,"position":5,"created_at":"2026-07-06T09:44:51+08:00","updated_at":"2026-07-06T09:44:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8b462853104a013a06196a2df583da187b4a86e.webp?v=1783302293","variant_ids":[40583995654243]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184P2-GG49","featured_media":{"alt":null,"id":27684123967587,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8b462853104a013a06196a2df583da187b4a86e.webp?v=1783302293"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40583995719779,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"SST01184Z8-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179289702499,"product_id":6981159911523,"position":7,"created_at":"2026-07-06T09:44:52+08:00","updated_at":"2026-07-06T09:44:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45dc48ade7f7dd1bb399d766fa5b9ee5eb8b0244.webp?v=1783302294","variant_ids":[40583995719779]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184Z8-GG49","featured_media":{"alt":null,"id":27684124098659,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45dc48ade7f7dd1bb399d766fa5b9ee5eb8b0244.webp?v=1783302294"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40583995785315,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"SST011840A-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179288555619,"product_id":6981159911523,"position":2,"created_at":"2026-07-06T09:44:48+08:00","updated_at":"2026-07-06T09:44:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d243f1e3daa8161024bf9b7960aa4d91c3e9071.webp?v=1783302290","variant_ids":[40583995785315]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840A-GG49","featured_media":{"alt":null,"id":27684122951779,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d243f1e3daa8161024bf9b7960aa4d91c3e9071.webp?v=1783302290"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40583995818083,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179289440355,"product_id":6981159911523,"position":4,"created_at":"2026-07-06T09:44:50+08:00","updated_at":"2026-07-06T09:44:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49a444c66330e9f56c01a9fa9a20ab8052c26f5f.webp?v=1783302292","variant_ids":[40583995818083]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-GG49","featured_media":{"alt":null,"id":27684123836515,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49a444c66330e9f56c01a9fa9a20ab8052c26f5f.webp?v=1783302292"}},"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-GG49_bcdc7e54-554a-4429-86f3-581ceab41c47.png?v=1690372182","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d243f1e3daa8161024bf9b7960aa4d91c3e9071.webp?v=1783302290","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96861027f2e19c6e1ea26bff9693009050956ad3.webp?v=1783302291","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49a444c66330e9f56c01a9fa9a20ab8052c26f5f.webp?v=1783302292","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8b462853104a013a06196a2df583da187b4a86e.webp?v=1783302293","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dee49b86c3c5b728df0775172a1aabc3bc9366b.webp?v=1783302293","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45dc48ade7f7dd1bb399d766fa5b9ee5eb8b0244.webp?v=1783302294"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-184-GG49_bcdc7e54-554a-4429-86f3-581ceab41c47.png?v=1690372182","options":["color"],"media":[{"alt":null,"id":22630591922275,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-184-GG49_bcdc7e54-554a-4429-86f3-581ceab41c47.png?v=1690372182"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidSuitTPE-53-184-GG49_bcdc7e54-554a-4429-86f3-581ceab41c47.png?v=1690372182","width":2000},{"alt":null,"id":27684122951779,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d243f1e3daa8161024bf9b7960aa4d91c3e9071.webp?v=1783302290"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d243f1e3daa8161024bf9b7960aa4d91c3e9071.webp?v=1783302290","width":2000},{"alt":null,"id":27684123574371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96861027f2e19c6e1ea26bff9693009050956ad3.webp?v=1783302291"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96861027f2e19c6e1ea26bff9693009050956ad3.webp?v=1783302291","width":2000},{"alt":null,"id":27684123836515,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49a444c66330e9f56c01a9fa9a20ab8052c26f5f.webp?v=1783302292"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49a444c66330e9f56c01a9fa9a20ab8052c26f5f.webp?v=1783302292","width":2000},{"alt":null,"id":27684123967587,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8b462853104a013a06196a2df583da187b4a86e.webp?v=1783302293"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8b462853104a013a06196a2df583da187b4a86e.webp?v=1783302293","width":2000},{"alt":null,"id":27684124033123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dee49b86c3c5b728df0775172a1aabc3bc9366b.webp?v=1783302293"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dee49b86c3c5b728df0775172a1aabc3bc9366b.webp?v=1783302293","width":2000},{"alt":null,"id":27684124098659,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45dc48ade7f7dd1bb399d766fa5b9ee5eb8b0244.webp?v=1783302294"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45dc48ade7f7dd1bb399d766fa5b9ee5eb8b0244.webp?v=1783302294","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":40583995392099,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179289636963,"product_id":6981159911523,"position":6,"created_at":"2026-07-06T09:44:51+08:00","updated_at":"2026-07-06T09:44:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dee49b86c3c5b728df0775172a1aabc3bc9366b.webp?v=1783302293","variant_ids":[40583995392099]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-GG49","featured_media":{"alt":null,"id":27684124033123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dee49b86c3c5b728df0775172a1aabc3bc9366b.webp?v=1783302293"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40583995523171,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179289178211,"product_id":6981159911523,"position":3,"created_at":"2026-07-06T09:44:49+08:00","updated_at":"2026-07-06T09:44:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96861027f2e19c6e1ea26bff9693009050956ad3.webp?v=1783302291","variant_ids":[40583995523171]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-GG49","featured_media":{"alt":null,"id":27684123574371,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96861027f2e19c6e1ea26bff9693009050956ad3.webp?v=1783302291"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40583995654243,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"SST01184P2-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179289571427,"product_id":6981159911523,"position":5,"created_at":"2026-07-06T09:44:51+08:00","updated_at":"2026-07-06T09:44:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8b462853104a013a06196a2df583da187b4a86e.webp?v=1783302293","variant_ids":[40583995654243]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184P2-GG49","featured_media":{"alt":null,"id":27684123967587,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a8b462853104a013a06196a2df583da187b4a86e.webp?v=1783302293"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40583995719779,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"SST01184Z8-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179289702499,"product_id":6981159911523,"position":7,"created_at":"2026-07-06T09:44:52+08:00","updated_at":"2026-07-06T09:44:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45dc48ade7f7dd1bb399d766fa5b9ee5eb8b0244.webp?v=1783302294","variant_ids":[40583995719779]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184Z8-GG49","featured_media":{"alt":null,"id":27684124098659,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45dc48ade7f7dd1bb399d766fa5b9ee5eb8b0244.webp?v=1783302294"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40583995785315,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"SST011840A-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179288555619,"product_id":6981159911523,"position":2,"created_at":"2026-07-06T09:44:48+08:00","updated_at":"2026-07-06T09:44:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d243f1e3daa8161024bf9b7960aa4d91c3e9071.webp?v=1783302290","variant_ids":[40583995785315]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840A-GG49","featured_media":{"alt":null,"id":27684122951779,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1d243f1e3daa8161024bf9b7960aa4d91c3e9071.webp?v=1783302290"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40583995818083,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179289440355,"product_id":6981159911523,"position":4,"created_at":"2026-07-06T09:44:50+08:00","updated_at":"2026-07-06T09:44:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49a444c66330e9f56c01a9fa9a20ab8052c26f5f.webp?v=1783302292","variant_ids":[40583995818083]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-GG49","featured_media":{"alt":null,"id":27684123836515,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/49a444c66330e9f56c01a9fa9a20ab8052c26f5f.webp?v=1783302292"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":40583995392099,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-GG49","requires_shipping":true,"taxable":true,"featured_image":{"id":36179289636963,"product_id":6981159911523,"position":6,"created_at":"2026-07-06T09:44:51+08:00","updated_at":"2026-07-06T09:44:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dee49b86c3c5b728df0775172a1aabc3bc9366b.webp?v=1783302293","variant_ids":[40583995392099]},"available":true,"name":"iPhone 12 mini SolidSuit 幾米Jimmy Liao 兔子系列-等車 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-GG49","featured_media":{"alt":null,"id":27684124033123,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7dee49b86c3c5b728df0775172a1aabc3bc9366b.webp?v=1783302293"}},"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: "停產" }