$product = {"id":7876199088227,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!!","handle":"iphone-12-pro-mod-nx-magsafe-printable-em50","description":null,"published_at":"2025-09-04T09:01:18+08:00","created_at":"2025-09-03T12:27:42+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-xiaolaofu","device-iPhone 12 Pro","merge","reseller-xiaolaofu"],"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":43675815280739,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-EM50","requires_shipping":true,"taxable":true,"featured_image":{"id":34416790405219,"product_id":7876199088227,"position":9,"created_at":"2025-09-03T12:27:52+08:00","updated_at":"2025-09-03T12:27:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03479b075f7f8d52185ca84bf0fb10c3c4e44f73.webp?v=1756873674","variant_ids":[43675815280739]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!! - 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-EM50","featured_media":{"alt":null,"id":25989065212003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03479b075f7f8d52185ca84bf0fb10c3c4e44f73.webp?v=1756873674"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43675818000483,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-EM50","requires_shipping":true,"taxable":true,"featured_image":{"id":34416790798435,"product_id":7876199088227,"position":10,"created_at":"2025-09-03T12:27:53+08:00","updated_at":"2025-09-03T12:27:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/460bb762096b7cf91cc0c0a47b94130a9f1117e9.webp?v=1756873675","variant_ids":[43675818000483]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!! - 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-EM50","featured_media":{"alt":null,"id":25989065605219,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/460bb762096b7cf91cc0c0a47b94130a9f1117e9.webp?v=1756873675"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43675818066019,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-EM50","requires_shipping":true,"taxable":true,"featured_image":{"id":34416791126115,"product_id":7876199088227,"position":11,"created_at":"2025-09-03T12:27:54+08:00","updated_at":"2025-09-03T12:27:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63256eee55bfe36f15ea275db6c4b4c617e4308e.webp?v=1756873676","variant_ids":[43675818066019]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!! - 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-EM50","featured_media":{"alt":null,"id":25989065932899,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63256eee55bfe36f15ea275db6c4b4c617e4308e.webp?v=1756873676"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43675818164323,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-EM50","requires_shipping":true,"taxable":true,"featured_image":{"id":34416788930659,"product_id":7876199088227,"position":2,"created_at":"2025-09-03T12:27:47+08:00","updated_at":"2025-09-03T12:27:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b4f089e604d2a1dab262889f6dd1b1bd683590.webp?v=1756873669","variant_ids":[43675818164323]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!! - 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-EM50","featured_media":{"alt":null,"id":25989063737443,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b4f089e604d2a1dab262889f6dd1b1bd683590.webp?v=1756873669"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43675818262627,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-EM50","requires_shipping":true,"taxable":true,"featured_image":{"id":34416790077539,"product_id":7876199088227,"position":7,"created_at":"2025-09-03T12:27:51+08:00","updated_at":"2025-09-03T12:27:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44bd802bb62bbfc454cd1d2f0d6e7ce345cdfcfa.webp?v=1756873673","variant_ids":[43675818262627]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!! - 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-EM50","featured_media":{"alt":null,"id":25989064884323,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44bd802bb62bbfc454cd1d2f0d6e7ce345cdfcfa.webp?v=1756873673"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ce19e1fbdd47a61f8a2a0f6bcceaf50fbe90085.webp?v=1756873668","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b4f089e604d2a1dab262889f6dd1b1bd683590.webp?v=1756873669","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9c02f168012b32d477b99610ef9d2f3a5102345.webp?v=1756873670","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6d96cc7b4983813a8290941608cb4ca5c030490.webp?v=1756873670","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02c98d9dc92adcd37a820d0d4fa8f700e35e99f3.webp?v=1756873671","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78b3bfe55ee31f6e4b42acdd69e5ddb2b15d8bd8.webp?v=1756873672","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44bd802bb62bbfc454cd1d2f0d6e7ce345cdfcfa.webp?v=1756873673","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afbf4cdced8fb908aff4c76928f27479a539c8e1.webp?v=1756873674","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03479b075f7f8d52185ca84bf0fb10c3c4e44f73.webp?v=1756873674","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/460bb762096b7cf91cc0c0a47b94130a9f1117e9.webp?v=1756873675","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63256eee55bfe36f15ea275db6c4b4c617e4308e.webp?v=1756873676"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ce19e1fbdd47a61f8a2a0f6bcceaf50fbe90085.webp?v=1756873668","options":["color"],"media":[{"alt":null,"id":25989063606371,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ce19e1fbdd47a61f8a2a0f6bcceaf50fbe90085.webp?v=1756873668"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9ce19e1fbdd47a61f8a2a0f6bcceaf50fbe90085.webp?v=1756873668","width":2000},{"alt":null,"id":25989063737443,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b4f089e604d2a1dab262889f6dd1b1bd683590.webp?v=1756873669"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b4f089e604d2a1dab262889f6dd1b1bd683590.webp?v=1756873669","width":2000},{"alt":null,"id":25989063966819,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9c02f168012b32d477b99610ef9d2f3a5102345.webp?v=1756873670"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9c02f168012b32d477b99610ef9d2f3a5102345.webp?v=1756873670","width":2000},{"alt":null,"id":25989064196195,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6d96cc7b4983813a8290941608cb4ca5c030490.webp?v=1756873670"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d6d96cc7b4983813a8290941608cb4ca5c030490.webp?v=1756873670","width":2000},{"alt":null,"id":25989064392803,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02c98d9dc92adcd37a820d0d4fa8f700e35e99f3.webp?v=1756873671"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02c98d9dc92adcd37a820d0d4fa8f700e35e99f3.webp?v=1756873671","width":2000},{"alt":null,"id":25989064556643,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78b3bfe55ee31f6e4b42acdd69e5ddb2b15d8bd8.webp?v=1756873672"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78b3bfe55ee31f6e4b42acdd69e5ddb2b15d8bd8.webp?v=1756873672","width":2000},{"alt":null,"id":25989064884323,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44bd802bb62bbfc454cd1d2f0d6e7ce345cdfcfa.webp?v=1756873673"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44bd802bb62bbfc454cd1d2f0d6e7ce345cdfcfa.webp?v=1756873673","width":2000},{"alt":null,"id":25989065048163,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afbf4cdced8fb908aff4c76928f27479a539c8e1.webp?v=1756873674"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/afbf4cdced8fb908aff4c76928f27479a539c8e1.webp?v=1756873674","width":2000},{"alt":null,"id":25989065212003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03479b075f7f8d52185ca84bf0fb10c3c4e44f73.webp?v=1756873674"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03479b075f7f8d52185ca84bf0fb10c3c4e44f73.webp?v=1756873674","width":2000},{"alt":null,"id":25989065605219,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/460bb762096b7cf91cc0c0a47b94130a9f1117e9.webp?v=1756873675"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/460bb762096b7cf91cc0c0a47b94130a9f1117e9.webp?v=1756873675","width":2000},{"alt":null,"id":25989065932899,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63256eee55bfe36f15ea275db6c4b4c617e4308e.webp?v=1756873676"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63256eee55bfe36f15ea275db6c4b4c617e4308e.webp?v=1756873676","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43675815280739,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-EM50","requires_shipping":true,"taxable":true,"featured_image":{"id":34416790405219,"product_id":7876199088227,"position":9,"created_at":"2025-09-03T12:27:52+08:00","updated_at":"2025-09-03T12:27:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03479b075f7f8d52185ca84bf0fb10c3c4e44f73.webp?v=1756873674","variant_ids":[43675815280739]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!! - 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-EM50","featured_media":{"alt":null,"id":25989065212003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03479b075f7f8d52185ca84bf0fb10c3c4e44f73.webp?v=1756873674"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43675818000483,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-EM50","requires_shipping":true,"taxable":true,"featured_image":{"id":34416790798435,"product_id":7876199088227,"position":10,"created_at":"2025-09-03T12:27:53+08:00","updated_at":"2025-09-03T12:27:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/460bb762096b7cf91cc0c0a47b94130a9f1117e9.webp?v=1756873675","variant_ids":[43675818000483]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!! - 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-EM50","featured_media":{"alt":null,"id":25989065605219,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/460bb762096b7cf91cc0c0a47b94130a9f1117e9.webp?v=1756873675"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43675818066019,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-EM50","requires_shipping":true,"taxable":true,"featured_image":{"id":34416791126115,"product_id":7876199088227,"position":11,"created_at":"2025-09-03T12:27:54+08:00","updated_at":"2025-09-03T12:27:56+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63256eee55bfe36f15ea275db6c4b4c617e4308e.webp?v=1756873676","variant_ids":[43675818066019]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!! - 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-EM50","featured_media":{"alt":null,"id":25989065932899,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/63256eee55bfe36f15ea275db6c4b4c617e4308e.webp?v=1756873676"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43675818164323,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-EM50","requires_shipping":true,"taxable":true,"featured_image":{"id":34416788930659,"product_id":7876199088227,"position":2,"created_at":"2025-09-03T12:27:47+08:00","updated_at":"2025-09-03T12:27:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b4f089e604d2a1dab262889f6dd1b1bd683590.webp?v=1756873669","variant_ids":[43675818164323]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!! - 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-EM50","featured_media":{"alt":null,"id":25989063737443,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b4f089e604d2a1dab262889f6dd1b1bd683590.webp?v=1756873669"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43675818262627,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-EM50","requires_shipping":true,"taxable":true,"featured_image":{"id":34416790077539,"product_id":7876199088227,"position":7,"created_at":"2025-09-03T12:27:51+08:00","updated_at":"2025-09-03T12:27:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44bd802bb62bbfc454cd1d2f0d6e7ce345cdfcfa.webp?v=1756873673","variant_ids":[43675818262627]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!! - 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-EM50","featured_media":{"alt":null,"id":25989064884323,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44bd802bb62bbfc454cd1d2f0d6e7ce345cdfcfa.webp?v=1756873673"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43675815280739,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-EM50","requires_shipping":true,"taxable":true,"featured_image":{"id":34416790405219,"product_id":7876199088227,"position":9,"created_at":"2025-09-03T12:27:52+08:00","updated_at":"2025-09-03T12:27:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03479b075f7f8d52185ca84bf0fb10c3c4e44f73.webp?v=1756873674","variant_ids":[43675815280739]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) 小勞撫 我好棒!! - 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-EM50","featured_media":{"alt":null,"id":25989065212003,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/03479b075f7f8d52185ca84bf0fb10c3c4e44f73.webp?v=1756873674"}},"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: "停產" }