$product = {"id":7892614479971,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys","handle":"iphone-12-pro-mod-nx-magsafe-printable-aar10","description":null,"published_at":"2025-10-03T09:51:53+08:00","created_at":"2025-10-02T09:48:54+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-aaronchang","device-iPhone 12 Pro","merge","reseller-aaronchang"],"price":110000,"price_min":110000,"price_max":110000,"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":43756493242467,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-AAR10","requires_shipping":true,"taxable":true,"featured_image":{"id":34543544795235,"product_id":7892614479971,"position":11,"created_at":"2025-10-02T09:49:06+08:00","updated_at":"2025-10-02T09:49:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e202a824be1753213d4c8da565737e4a7a4b62be.webp?v=1759369748","variant_ids":[43756493242467]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-AAR10","featured_media":{"alt":null,"id":26113299644515,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e202a824be1753213d4c8da565737e4a7a4b62be.webp?v=1759369748"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756496846947,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-AAR10","requires_shipping":true,"taxable":true,"featured_image":{"id":34543543746659,"product_id":7892614479971,"position":7,"created_at":"2025-10-02T09:49:03+08:00","updated_at":"2025-10-02T09:49:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12b3ddbca3b74d0c546643032bdfa364d709880.webp?v=1759369745","variant_ids":[43756496846947]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185J5-AAR10","featured_media":{"alt":null,"id":26113298628707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12b3ddbca3b74d0c546643032bdfa364d709880.webp?v=1759369745"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756496879715,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-AAR10","requires_shipping":true,"taxable":true,"featured_image":{"id":34543542435939,"product_id":7892614479971,"position":1,"created_at":"2025-10-02T09:48:58+08:00","updated_at":"2025-10-02T09:49:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52e88d99221370ecd8b50f2c28bf0271a74e57aa.webp?v=1759369741","variant_ids":[43756496879715]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118504-AAR10","featured_media":{"alt":null,"id":26113297317987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52e88d99221370ecd8b50f2c28bf0271a74e57aa.webp?v=1759369741"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756496945251,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-AAR10","requires_shipping":true,"taxable":true,"featured_image":{"id":34543543222371,"product_id":7892614479971,"position":5,"created_at":"2025-10-02T09:49:02+08:00","updated_at":"2025-10-02T09:49:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/910e74fd71cc94cbdb5452352d1d67f5cdf16005.webp?v=1759369744","variant_ids":[43756496945251]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys - Graphite","public_title":"Graphite","options":["Graphite"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118569-AAR10","featured_media":{"alt":null,"id":26113298104419,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/910e74fd71cc94cbdb5452352d1d67f5cdf16005.webp?v=1759369744"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756497076323,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-AAR10","requires_shipping":true,"taxable":true,"featured_image":{"id":34543543517283,"product_id":7892614479971,"position":6,"created_at":"2025-10-02T09:49:03+08:00","updated_at":"2025-10-02T09:49:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f27d818360a07c859360bdc9baeff54a7a0a68b7.webp?v=1759369745","variant_ids":[43756497076323]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118524-AAR10","featured_media":{"alt":null,"id":26113298399331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f27d818360a07c859360bdc9baeff54a7a0a68b7.webp?v=1759369745"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52e88d99221370ecd8b50f2c28bf0271a74e57aa.webp?v=1759369741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c459f33dc6f4935c7505de9dd4bcaff3b6e6d5f.webp?v=1759369742","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ddd4414899e0f25a8919aec81af2d737ac5a161.webp?v=1759369743","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab28667fe6825292cdc4403be451ee692798db91.webp?v=1759369743","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/910e74fd71cc94cbdb5452352d1d67f5cdf16005.webp?v=1759369744","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f27d818360a07c859360bdc9baeff54a7a0a68b7.webp?v=1759369745","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12b3ddbca3b74d0c546643032bdfa364d709880.webp?v=1759369745","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c467c5d62249ea78d8105b93e718a67556dad37.webp?v=1759369746","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c44b5ff0a5d8fa62fe643c2f9279bdd190e46925.webp?v=1759369747","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52e9f6d6ff0ff3e1b112a66b9f401e0e4c0a3fa9.webp?v=1759369747","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e202a824be1753213d4c8da565737e4a7a4b62be.webp?v=1759369748"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52e88d99221370ecd8b50f2c28bf0271a74e57aa.webp?v=1759369741","options":["color"],"media":[{"alt":null,"id":26113297317987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52e88d99221370ecd8b50f2c28bf0271a74e57aa.webp?v=1759369741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52e88d99221370ecd8b50f2c28bf0271a74e57aa.webp?v=1759369741","width":2000},{"alt":null,"id":26113297514595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c459f33dc6f4935c7505de9dd4bcaff3b6e6d5f.webp?v=1759369742"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8c459f33dc6f4935c7505de9dd4bcaff3b6e6d5f.webp?v=1759369742","width":2000},{"alt":null,"id":26113297678435,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ddd4414899e0f25a8919aec81af2d737ac5a161.webp?v=1759369743"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3ddd4414899e0f25a8919aec81af2d737ac5a161.webp?v=1759369743","width":2000},{"alt":null,"id":26113297875043,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab28667fe6825292cdc4403be451ee692798db91.webp?v=1759369743"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ab28667fe6825292cdc4403be451ee692798db91.webp?v=1759369743","width":2000},{"alt":null,"id":26113298104419,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/910e74fd71cc94cbdb5452352d1d67f5cdf16005.webp?v=1759369744"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/910e74fd71cc94cbdb5452352d1d67f5cdf16005.webp?v=1759369744","width":2000},{"alt":null,"id":26113298399331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f27d818360a07c859360bdc9baeff54a7a0a68b7.webp?v=1759369745"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f27d818360a07c859360bdc9baeff54a7a0a68b7.webp?v=1759369745","width":2000},{"alt":null,"id":26113298628707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12b3ddbca3b74d0c546643032bdfa364d709880.webp?v=1759369745"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12b3ddbca3b74d0c546643032bdfa364d709880.webp?v=1759369745","width":2000},{"alt":null,"id":26113298858083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c467c5d62249ea78d8105b93e718a67556dad37.webp?v=1759369746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c467c5d62249ea78d8105b93e718a67556dad37.webp?v=1759369746","width":2000},{"alt":null,"id":26113299087459,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c44b5ff0a5d8fa62fe643c2f9279bdd190e46925.webp?v=1759369747"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c44b5ff0a5d8fa62fe643c2f9279bdd190e46925.webp?v=1759369747","width":2000},{"alt":null,"id":26113299349603,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52e9f6d6ff0ff3e1b112a66b9f401e0e4c0a3fa9.webp?v=1759369747"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52e9f6d6ff0ff3e1b112a66b9f401e0e4c0a3fa9.webp?v=1759369747","width":2000},{"alt":null,"id":26113299644515,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e202a824be1753213d4c8da565737e4a7a4b62be.webp?v=1759369748"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e202a824be1753213d4c8da565737e4a7a4b62be.webp?v=1759369748","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43756493242467,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-AAR10","requires_shipping":true,"taxable":true,"featured_image":{"id":34543544795235,"product_id":7892614479971,"position":11,"created_at":"2025-10-02T09:49:06+08:00","updated_at":"2025-10-02T09:49:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e202a824be1753213d4c8da565737e4a7a4b62be.webp?v=1759369748","variant_ids":[43756493242467]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-AAR10","featured_media":{"alt":null,"id":26113299644515,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e202a824be1753213d4c8da565737e4a7a4b62be.webp?v=1759369748"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756496846947,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-AAR10","requires_shipping":true,"taxable":true,"featured_image":{"id":34543543746659,"product_id":7892614479971,"position":7,"created_at":"2025-10-02T09:49:03+08:00","updated_at":"2025-10-02T09:49:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12b3ddbca3b74d0c546643032bdfa364d709880.webp?v=1759369745","variant_ids":[43756496846947]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys - Navy Blue","public_title":"Navy Blue","options":["Navy Blue"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185J5-AAR10","featured_media":{"alt":null,"id":26113298628707,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a12b3ddbca3b74d0c546643032bdfa364d709880.webp?v=1759369745"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756496879715,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-AAR10","requires_shipping":true,"taxable":true,"featured_image":{"id":34543542435939,"product_id":7892614479971,"position":1,"created_at":"2025-10-02T09:48:58+08:00","updated_at":"2025-10-02T09:49:01+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52e88d99221370ecd8b50f2c28bf0271a74e57aa.webp?v=1759369741","variant_ids":[43756496879715]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys - White","public_title":"White","options":["White"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118504-AAR10","featured_media":{"alt":null,"id":26113297317987,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/52e88d99221370ecd8b50f2c28bf0271a74e57aa.webp?v=1759369741"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756496945251,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-AAR10","requires_shipping":true,"taxable":true,"featured_image":{"id":34543543222371,"product_id":7892614479971,"position":5,"created_at":"2025-10-02T09:49:02+08:00","updated_at":"2025-10-02T09:49:04+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/910e74fd71cc94cbdb5452352d1d67f5cdf16005.webp?v=1759369744","variant_ids":[43756496945251]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys - Graphite","public_title":"Graphite","options":["Graphite"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118569-AAR10","featured_media":{"alt":null,"id":26113298104419,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/910e74fd71cc94cbdb5452352d1d67f5cdf16005.webp?v=1759369744"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43756497076323,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-AAR10","requires_shipping":true,"taxable":true,"featured_image":{"id":34543543517283,"product_id":7892614479971,"position":6,"created_at":"2025-10-02T09:49:03+08:00","updated_at":"2025-10-02T09:49:05+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f27d818360a07c859360bdc9baeff54a7a0a68b7.webp?v=1759369745","variant_ids":[43756497076323]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys - Black","public_title":"Black","options":["Black"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0118524-AAR10","featured_media":{"alt":null,"id":26113298399331,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f27d818360a07c859360bdc9baeff54a7a0a68b7.webp?v=1759369745"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43756493242467,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-AAR10","requires_shipping":true,"taxable":true,"featured_image":{"id":34543544795235,"product_id":7892614479971,"position":11,"created_at":"2025-10-02T09:49:06+08:00","updated_at":"2025-10-02T09:49:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e202a824be1753213d4c8da565737e4a7a4b62be.webp?v=1759369748","variant_ids":[43756493242467]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Aaron Chang Posters Rogbys - Lavender","public_title":"Lavender","options":["Lavender"],"price":110000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01185C1-AAR10","featured_media":{"alt":null,"id":26113299644515,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e202a824be1753213d4c8da565737e4a7a4b62be.webp?v=1759369748"}},"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: "停產" }