$product = {"id":7942060965987,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺","handle":"iphone-12-pro-mod-nx-magsafe-nya13","description":null,"published_at":"2025-12-23T10:04:57+08:00","created_at":"2025-12-22T11:37:46+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nyangsongi","device-iPhone 12 Pro","merge","reseller-nyangsongi"],"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":43903289819235,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-NYA13","requires_shipping":true,"taxable":true,"featured_image":{"id":34985918300259,"product_id":7942060965987,"position":6,"created_at":"2025-12-22T11:38:19+08:00","updated_at":"2025-12-22T11:38:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316db370c4e82a0559bb60ad317ca65c898da821.webp?v=1766374701","variant_ids":[43903289819235]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺 - 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-NYA13","featured_media":{"alt":null,"id":26546994348131,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316db370c4e82a0559bb60ad317ca65c898da821.webp?v=1766374701"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903289884771,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-NYA13","requires_shipping":true,"taxable":true,"featured_image":{"id":34985917939811,"product_id":7942060965987,"position":2,"created_at":"2025-12-22T11:38:17+08:00","updated_at":"2025-12-22T11:38:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36a16f0e2b7ca78d790151634ce249a64f8fccf0.webp?v=1766374699","variant_ids":[43903289884771]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺 - 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-NYA13","featured_media":{"alt":null,"id":26546993987683,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36a16f0e2b7ca78d790151634ce249a64f8fccf0.webp?v=1766374699"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903289983075,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-NYA13","requires_shipping":true,"taxable":true,"featured_image":{"id":34985918070883,"product_id":7942060965987,"position":4,"created_at":"2025-12-22T11:38:18+08:00","updated_at":"2025-12-22T11:38:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/715c6c855d37a0ed218b928b917abb9804b14c52.webp?v=1766374700","variant_ids":[43903289983075]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺 - 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-NYA13","featured_media":{"alt":null,"id":26546994151523,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/715c6c855d37a0ed218b928b917abb9804b14c52.webp?v=1766374700"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903290245219,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-NYA13","requires_shipping":true,"taxable":true,"featured_image":{"id":34985918595171,"product_id":7942060965987,"position":9,"created_at":"2025-12-22T11:38:21+08:00","updated_at":"2025-12-22T11:38:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0807d767b3eebb83cf9b7cf8e5b4871d61cf6dd.webp?v=1766374703","variant_ids":[43903290245219]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺 - 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-NYA13","featured_media":{"alt":null,"id":26546994643043,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0807d767b3eebb83cf9b7cf8e5b4871d61cf6dd.webp?v=1766374703"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903290540131,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-NYA13","requires_shipping":true,"taxable":true,"featured_image":{"id":34985918627939,"product_id":7942060965987,"position":10,"created_at":"2025-12-22T11:38:21+08:00","updated_at":"2025-12-22T11:38:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc3484205d79763d89ac5febb2d7974b86cc403.webp?v=1766374703","variant_ids":[43903290540131]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺 - 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-NYA13","featured_media":{"alt":null,"id":26546994708579,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc3484205d79763d89ac5febb2d7974b86cc403.webp?v=1766374703"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feff4fd70854ade4294f10a702e6a4263b47c89c.webp?v=1766374699","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36a16f0e2b7ca78d790151634ce249a64f8fccf0.webp?v=1766374699","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d893c746e447ccd66b1b3322e152e611887e70e.webp?v=1766374700","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/715c6c855d37a0ed218b928b917abb9804b14c52.webp?v=1766374700","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32442a0728160adb86b563a00b237e410c0a12d5.webp?v=1766374701","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316db370c4e82a0559bb60ad317ca65c898da821.webp?v=1766374701","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c95e5b0db60b017cfbd4cc5a0a5f9f2218461130.webp?v=1766374702","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ff658f277dd3fdb500c6de9ebbb860e155b36e.webp?v=1766374702","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0807d767b3eebb83cf9b7cf8e5b4871d61cf6dd.webp?v=1766374703","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc3484205d79763d89ac5febb2d7974b86cc403.webp?v=1766374703","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f246a5e7960d45a77177928a53bf1e4e29135ce.webp?v=1766374704"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feff4fd70854ade4294f10a702e6a4263b47c89c.webp?v=1766374699","options":["color"],"media":[{"alt":null,"id":26546993922147,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feff4fd70854ade4294f10a702e6a4263b47c89c.webp?v=1766374699"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/feff4fd70854ade4294f10a702e6a4263b47c89c.webp?v=1766374699","width":2000},{"alt":null,"id":26546993987683,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36a16f0e2b7ca78d790151634ce249a64f8fccf0.webp?v=1766374699"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36a16f0e2b7ca78d790151634ce249a64f8fccf0.webp?v=1766374699","width":2000},{"alt":null,"id":26546994085987,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d893c746e447ccd66b1b3322e152e611887e70e.webp?v=1766374700"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6d893c746e447ccd66b1b3322e152e611887e70e.webp?v=1766374700","width":2000},{"alt":null,"id":26546994151523,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/715c6c855d37a0ed218b928b917abb9804b14c52.webp?v=1766374700"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/715c6c855d37a0ed218b928b917abb9804b14c52.webp?v=1766374700","width":2000},{"alt":null,"id":26546994282595,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32442a0728160adb86b563a00b237e410c0a12d5.webp?v=1766374701"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32442a0728160adb86b563a00b237e410c0a12d5.webp?v=1766374701","width":2000},{"alt":null,"id":26546994348131,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316db370c4e82a0559bb60ad317ca65c898da821.webp?v=1766374701"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316db370c4e82a0559bb60ad317ca65c898da821.webp?v=1766374701","width":2000},{"alt":null,"id":26546994446435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c95e5b0db60b017cfbd4cc5a0a5f9f2218461130.webp?v=1766374702"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c95e5b0db60b017cfbd4cc5a0a5f9f2218461130.webp?v=1766374702","width":2000},{"alt":null,"id":26546994577507,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ff658f277dd3fdb500c6de9ebbb860e155b36e.webp?v=1766374702"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/51ff658f277dd3fdb500c6de9ebbb860e155b36e.webp?v=1766374702","width":2000},{"alt":null,"id":26546994643043,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0807d767b3eebb83cf9b7cf8e5b4871d61cf6dd.webp?v=1766374703"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0807d767b3eebb83cf9b7cf8e5b4871d61cf6dd.webp?v=1766374703","width":2000},{"alt":null,"id":26546994708579,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc3484205d79763d89ac5febb2d7974b86cc403.webp?v=1766374703"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc3484205d79763d89ac5febb2d7974b86cc403.webp?v=1766374703","width":2000},{"alt":null,"id":26546994806883,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f246a5e7960d45a77177928a53bf1e4e29135ce.webp?v=1766374704"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6f246a5e7960d45a77177928a53bf1e4e29135ce.webp?v=1766374704","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43903289819235,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-NYA13","requires_shipping":true,"taxable":true,"featured_image":{"id":34985918300259,"product_id":7942060965987,"position":6,"created_at":"2025-12-22T11:38:19+08:00","updated_at":"2025-12-22T11:38:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316db370c4e82a0559bb60ad317ca65c898da821.webp?v=1766374701","variant_ids":[43903289819235]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺 - 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-NYA13","featured_media":{"alt":null,"id":26546994348131,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316db370c4e82a0559bb60ad317ca65c898da821.webp?v=1766374701"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903289884771,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-NYA13","requires_shipping":true,"taxable":true,"featured_image":{"id":34985917939811,"product_id":7942060965987,"position":2,"created_at":"2025-12-22T11:38:17+08:00","updated_at":"2025-12-22T11:38:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36a16f0e2b7ca78d790151634ce249a64f8fccf0.webp?v=1766374699","variant_ids":[43903289884771]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺 - 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-NYA13","featured_media":{"alt":null,"id":26546993987683,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/36a16f0e2b7ca78d790151634ce249a64f8fccf0.webp?v=1766374699"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903289983075,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-NYA13","requires_shipping":true,"taxable":true,"featured_image":{"id":34985918070883,"product_id":7942060965987,"position":4,"created_at":"2025-12-22T11:38:18+08:00","updated_at":"2025-12-22T11:38:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/715c6c855d37a0ed218b928b917abb9804b14c52.webp?v=1766374700","variant_ids":[43903289983075]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺 - 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-NYA13","featured_media":{"alt":null,"id":26546994151523,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/715c6c855d37a0ed218b928b917abb9804b14c52.webp?v=1766374700"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903290245219,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-NYA13","requires_shipping":true,"taxable":true,"featured_image":{"id":34985918595171,"product_id":7942060965987,"position":9,"created_at":"2025-12-22T11:38:21+08:00","updated_at":"2025-12-22T11:38:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0807d767b3eebb83cf9b7cf8e5b4871d61cf6dd.webp?v=1766374703","variant_ids":[43903290245219]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺 - 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-NYA13","featured_media":{"alt":null,"id":26546994643043,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0807d767b3eebb83cf9b7cf8e5b4871d61cf6dd.webp?v=1766374703"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903290540131,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-NYA13","requires_shipping":true,"taxable":true,"featured_image":{"id":34985918627939,"product_id":7942060965987,"position":10,"created_at":"2025-12-22T11:38:21+08:00","updated_at":"2025-12-22T11:38:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc3484205d79763d89ac5febb2d7974b86cc403.webp?v=1766374703","variant_ids":[43903290540131]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺 - 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-NYA13","featured_media":{"alt":null,"id":26546994708579,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7cc3484205d79763d89ac5febb2d7974b86cc403.webp?v=1766374703"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43903289819235,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-NYA13","requires_shipping":true,"taxable":true,"featured_image":{"id":34985918300259,"product_id":7942060965987,"position":6,"created_at":"2025-12-22T11:38:19+08:00","updated_at":"2025-12-22T11:38:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316db370c4e82a0559bb60ad317ca65c898da821.webp?v=1766374701","variant_ids":[43903289819235]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Nyangsongi 柑橘躺躺 - 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-NYA13","featured_media":{"alt":null,"id":26546994348131,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/316db370c4e82a0559bb60ad317ca65c898da821.webp?v=1766374701"}},"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: "停產" }