$product = {"id":7893880143971,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩","handle":"iphone-12-pro-mod-nx-magsafe-printable-chu05","description":null,"published_at":"2025-10-09T09:20:33+08:00","created_at":"2025-10-07T10:35:18+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-chubbynida","device-iPhone 12 Pro","merge","reseller-chubbynida"],"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":43763628245091,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-CHU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34553359040611,"product_id":7893880143971,"position":1,"created_at":"2025-10-07T10:35:19+08:00","updated_at":"2025-10-07T10:35:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89facd9a165d19ee4f8d935f4d5b9d53d972fab2.webp?v=1759804522","variant_ids":[43763628245091]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩 - 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-CHU05","featured_media":{"alt":null,"id":26123006640227,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89facd9a165d19ee4f8d935f4d5b9d53d972fab2.webp?v=1759804522"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763631325283,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-CHU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34553359564899,"product_id":7893880143971,"position":3,"created_at":"2025-10-07T10:35:23+08:00","updated_at":"2025-10-07T10:35:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1265568b995587297daa7bad737c0ba838b697f.webp?v=1759804525","variant_ids":[43763631325283]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩 - 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-CHU05","featured_media":{"alt":null,"id":26123007197283,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1265568b995587297daa7bad737c0ba838b697f.webp?v=1759804525"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763631390819,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-CHU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34553362022499,"product_id":7893880143971,"position":11,"created_at":"2025-10-07T10:35:29+08:00","updated_at":"2025-10-07T10:35:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd45158579adb92dfb6d302797e2b740002e521a.webp?v=1759804531","variant_ids":[43763631390819]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩 - 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-CHU05","featured_media":{"alt":null,"id":26123009622115,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd45158579adb92dfb6d302797e2b740002e521a.webp?v=1759804531"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763631456355,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-CHU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34553361793123,"product_id":7893880143971,"position":10,"created_at":"2025-10-07T10:35:28+08:00","updated_at":"2025-10-07T10:35:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb8d0a9758905ab0f044c6ef3b9eb1f29bbd2c89.webp?v=1759804530","variant_ids":[43763631456355]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩 - 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-CHU05","featured_media":{"alt":null,"id":26123009458275,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb8d0a9758905ab0f044c6ef3b9eb1f29bbd2c89.webp?v=1759804530"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763631489123,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-CHU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34553359958115,"product_id":7893880143971,"position":4,"created_at":"2025-10-07T10:35:24+08:00","updated_at":"2025-10-07T10:35:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85d146d17bf2369e8aa09f92ec297f15fa99f9a6.webp?v=1759804526","variant_ids":[43763631489123]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩 - 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-CHU05","featured_media":{"alt":null,"id":26123007590499,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85d146d17bf2369e8aa09f92ec297f15fa99f9a6.webp?v=1759804526"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89facd9a165d19ee4f8d935f4d5b9d53d972fab2.webp?v=1759804522","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/021036e17cd5c4a2e9e9933b9855b89710dda404.webp?v=1759804524","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1265568b995587297daa7bad737c0ba838b697f.webp?v=1759804525","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85d146d17bf2369e8aa09f92ec297f15fa99f9a6.webp?v=1759804526","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41bd72704bf47d6b97624eafaff8bf1d094fc41c.webp?v=1759804527","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b27ba71be62bf3b3eaaaab565da6e3f64cc78cd.webp?v=1759804528","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e68121753bceeb87e46a99002c8cc03f3c8ac3f.webp?v=1759804528","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b3f41d839c350c3683d72adba6833e3cdf1598.webp?v=1759804529","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfa1cc54f1ae9402a4960818f411bfc4f12950a2.webp?v=1759804529","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb8d0a9758905ab0f044c6ef3b9eb1f29bbd2c89.webp?v=1759804530","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd45158579adb92dfb6d302797e2b740002e521a.webp?v=1759804531"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89facd9a165d19ee4f8d935f4d5b9d53d972fab2.webp?v=1759804522","options":["color"],"media":[{"alt":null,"id":26123006640227,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89facd9a165d19ee4f8d935f4d5b9d53d972fab2.webp?v=1759804522"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89facd9a165d19ee4f8d935f4d5b9d53d972fab2.webp?v=1759804522","width":2000},{"alt":null,"id":26123006902371,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/021036e17cd5c4a2e9e9933b9855b89710dda404.webp?v=1759804524"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/021036e17cd5c4a2e9e9933b9855b89710dda404.webp?v=1759804524","width":2000},{"alt":null,"id":26123007197283,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1265568b995587297daa7bad737c0ba838b697f.webp?v=1759804525"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1265568b995587297daa7bad737c0ba838b697f.webp?v=1759804525","width":2000},{"alt":null,"id":26123007590499,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85d146d17bf2369e8aa09f92ec297f15fa99f9a6.webp?v=1759804526"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85d146d17bf2369e8aa09f92ec297f15fa99f9a6.webp?v=1759804526","width":2000},{"alt":null,"id":26123007950947,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41bd72704bf47d6b97624eafaff8bf1d094fc41c.webp?v=1759804527"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/41bd72704bf47d6b97624eafaff8bf1d094fc41c.webp?v=1759804527","width":2000},{"alt":null,"id":26123008213091,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b27ba71be62bf3b3eaaaab565da6e3f64cc78cd.webp?v=1759804528"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2b27ba71be62bf3b3eaaaab565da6e3f64cc78cd.webp?v=1759804528","width":2000},{"alt":null,"id":26123008442467,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e68121753bceeb87e46a99002c8cc03f3c8ac3f.webp?v=1759804528"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e68121753bceeb87e46a99002c8cc03f3c8ac3f.webp?v=1759804528","width":2000},{"alt":null,"id":26123008737379,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b3f41d839c350c3683d72adba6833e3cdf1598.webp?v=1759804529"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/14b3f41d839c350c3683d72adba6833e3cdf1598.webp?v=1759804529","width":2000},{"alt":null,"id":26123009097827,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfa1cc54f1ae9402a4960818f411bfc4f12950a2.webp?v=1759804529"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bfa1cc54f1ae9402a4960818f411bfc4f12950a2.webp?v=1759804529","width":2000},{"alt":null,"id":26123009458275,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb8d0a9758905ab0f044c6ef3b9eb1f29bbd2c89.webp?v=1759804530"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb8d0a9758905ab0f044c6ef3b9eb1f29bbd2c89.webp?v=1759804530","width":2000},{"alt":null,"id":26123009622115,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd45158579adb92dfb6d302797e2b740002e521a.webp?v=1759804531"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd45158579adb92dfb6d302797e2b740002e521a.webp?v=1759804531","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43763628245091,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-CHU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34553359040611,"product_id":7893880143971,"position":1,"created_at":"2025-10-07T10:35:19+08:00","updated_at":"2025-10-07T10:35:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89facd9a165d19ee4f8d935f4d5b9d53d972fab2.webp?v=1759804522","variant_ids":[43763628245091]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩 - 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-CHU05","featured_media":{"alt":null,"id":26123006640227,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89facd9a165d19ee4f8d935f4d5b9d53d972fab2.webp?v=1759804522"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763631325283,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-CHU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34553359564899,"product_id":7893880143971,"position":3,"created_at":"2025-10-07T10:35:23+08:00","updated_at":"2025-10-07T10:35:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1265568b995587297daa7bad737c0ba838b697f.webp?v=1759804525","variant_ids":[43763631325283]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩 - 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-CHU05","featured_media":{"alt":null,"id":26123007197283,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1265568b995587297daa7bad737c0ba838b697f.webp?v=1759804525"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763631390819,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-CHU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34553362022499,"product_id":7893880143971,"position":11,"created_at":"2025-10-07T10:35:29+08:00","updated_at":"2025-10-07T10:35:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd45158579adb92dfb6d302797e2b740002e521a.webp?v=1759804531","variant_ids":[43763631390819]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩 - 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-CHU05","featured_media":{"alt":null,"id":26123009622115,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cd45158579adb92dfb6d302797e2b740002e521a.webp?v=1759804531"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763631456355,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-CHU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34553361793123,"product_id":7893880143971,"position":10,"created_at":"2025-10-07T10:35:28+08:00","updated_at":"2025-10-07T10:35:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb8d0a9758905ab0f044c6ef3b9eb1f29bbd2c89.webp?v=1759804530","variant_ids":[43763631456355]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩 - 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-CHU05","featured_media":{"alt":null,"id":26123009458275,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb8d0a9758905ab0f044c6ef3b9eb1f29bbd2c89.webp?v=1759804530"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43763631489123,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-CHU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34553359958115,"product_id":7893880143971,"position":4,"created_at":"2025-10-07T10:35:24+08:00","updated_at":"2025-10-07T10:35:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85d146d17bf2369e8aa09f92ec297f15fa99f9a6.webp?v=1759804526","variant_ids":[43763631489123]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩 - 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-CHU05","featured_media":{"alt":null,"id":26123007590499,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/85d146d17bf2369e8aa09f92ec297f15fa99f9a6.webp?v=1759804526"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43763628245091,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-CHU05","requires_shipping":true,"taxable":true,"featured_image":{"id":34553359040611,"product_id":7893880143971,"position":1,"created_at":"2025-10-07T10:35:19+08:00","updated_at":"2025-10-07T10:35:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89facd9a165d19ee4f8d935f4d5b9d53d972fab2.webp?v=1759804522","variant_ids":[43763628245091]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Chubbynida 悠游海之詩 - 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-CHU05","featured_media":{"alt":null,"id":26123006640227,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/89facd9a165d19ee4f8d935f4d5b9d53d972fab2.webp?v=1759804522"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}; $device_handle = null; $type = ""; var sellingStatus if ($isMerge) { $(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: "停產" }