$product = {"id":7942265208931,"title":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗","handle":"iphone-12-pro-mod-nx-magsafe-seu10","description":null,"published_at":"2025-12-23T09:33:48+08:00","created_at":"2025-12-22T17:42:35+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-seungyounkim","device-iPhone 12 Pro","merge","reseller-seungyounkim"],"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":43904420511843,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-SEU10","requires_shipping":true,"taxable":true,"featured_image":{"id":34987595071587,"product_id":7942265208931,"position":6,"created_at":"2025-12-22T17:43:15+08:00","updated_at":"2025-12-22T17:43:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a257c24ef59a2dfbadd4eaf6998546ccea474750.webp?v=1766396597","variant_ids":[43904420511843]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗 - 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-SEU10","featured_media":{"alt":null,"id":26548611940451,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a257c24ef59a2dfbadd4eaf6998546ccea474750.webp?v=1766396597"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43904420741219,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-SEU10","requires_shipping":true,"taxable":true,"featured_image":{"id":34987594842211,"product_id":7942265208931,"position":5,"created_at":"2025-12-22T17:43:14+08:00","updated_at":"2025-12-22T17:43:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/badf370a51b91c96ac0aba0c859958db815ac78a.webp?v=1766396596","variant_ids":[43904420741219]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗 - 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-SEU10","featured_media":{"alt":null,"id":26548611678307,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/badf370a51b91c96ac0aba0c859958db815ac78a.webp?v=1766396596"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43904420970595,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-SEU10","requires_shipping":true,"taxable":true,"featured_image":{"id":34987595366499,"product_id":7942265208931,"position":7,"created_at":"2025-12-22T17:43:15+08:00","updated_at":"2025-12-22T17:43:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be01cf1a6b61491385580d188218808febf018a2.webp?v=1766396598","variant_ids":[43904420970595]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗 - 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-SEU10","featured_media":{"alt":null,"id":26548612366435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be01cf1a6b61491385580d188218808febf018a2.webp?v=1766396598"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43904421527651,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-SEU10","requires_shipping":true,"taxable":true,"featured_image":{"id":34987594678371,"product_id":7942265208931,"position":4,"created_at":"2025-12-22T17:43:14+08:00","updated_at":"2025-12-22T17:43:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d310d2a94b2863642417bd898815f1759492fe64.webp?v=1766396596","variant_ids":[43904421527651]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗 - 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-SEU10","featured_media":{"alt":null,"id":26548611547235,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d310d2a94b2863642417bd898815f1759492fe64.webp?v=1766396596"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43904422969443,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-SEU10","requires_shipping":true,"taxable":true,"featured_image":{"id":34987593957475,"product_id":7942265208931,"position":2,"created_at":"2025-12-22T17:43:13+08:00","updated_at":"2025-12-22T17:43:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/376dee1a711e3e9a09a144bb1f13508f7f5d4fc0.webp?v=1766396594","variant_ids":[43904422969443]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗 - 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-SEU10","featured_media":{"alt":null,"id":26548610465891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/376dee1a711e3e9a09a144bb1f13508f7f5d4fc0.webp?v=1766396594"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1a2dff0255d83ac258039c341f1752ed4f8b0a7.webp?v=1766396594","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/376dee1a711e3e9a09a144bb1f13508f7f5d4fc0.webp?v=1766396594","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73eb48d82bfad02c519be043a9ebad538d0f56ed.webp?v=1766396595","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d310d2a94b2863642417bd898815f1759492fe64.webp?v=1766396596","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/badf370a51b91c96ac0aba0c859958db815ac78a.webp?v=1766396596","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a257c24ef59a2dfbadd4eaf6998546ccea474750.webp?v=1766396597","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be01cf1a6b61491385580d188218808febf018a2.webp?v=1766396598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dec77cdc77b3b1f1fc28cfc7d32695f64651f493.webp?v=1766396598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4abab3bbf40b467443859adcfe7a894cbc6739a1.webp?v=1766396598","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e4673eecfd76f1c211237ad0a77025796d1b34b.webp?v=1766396599","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff1695e54638f1878163db80b636c53d4ecea34b.webp?v=1766396599"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1a2dff0255d83ac258039c341f1752ed4f8b0a7.webp?v=1766396594","options":["color"],"media":[{"alt":null,"id":26548610269283,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1a2dff0255d83ac258039c341f1752ed4f8b0a7.webp?v=1766396594"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1a2dff0255d83ac258039c341f1752ed4f8b0a7.webp?v=1766396594","width":2000},{"alt":null,"id":26548610465891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/376dee1a711e3e9a09a144bb1f13508f7f5d4fc0.webp?v=1766396594"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/376dee1a711e3e9a09a144bb1f13508f7f5d4fc0.webp?v=1766396594","width":2000},{"alt":null,"id":26548611317859,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73eb48d82bfad02c519be043a9ebad538d0f56ed.webp?v=1766396595"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73eb48d82bfad02c519be043a9ebad538d0f56ed.webp?v=1766396595","width":2000},{"alt":null,"id":26548611547235,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d310d2a94b2863642417bd898815f1759492fe64.webp?v=1766396596"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d310d2a94b2863642417bd898815f1759492fe64.webp?v=1766396596","width":2000},{"alt":null,"id":26548611678307,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/badf370a51b91c96ac0aba0c859958db815ac78a.webp?v=1766396596"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/badf370a51b91c96ac0aba0c859958db815ac78a.webp?v=1766396596","width":2000},{"alt":null,"id":26548611940451,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a257c24ef59a2dfbadd4eaf6998546ccea474750.webp?v=1766396597"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a257c24ef59a2dfbadd4eaf6998546ccea474750.webp?v=1766396597","width":2000},{"alt":null,"id":26548612366435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be01cf1a6b61491385580d188218808febf018a2.webp?v=1766396598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be01cf1a6b61491385580d188218808febf018a2.webp?v=1766396598","width":2000},{"alt":null,"id":26548612661347,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dec77cdc77b3b1f1fc28cfc7d32695f64651f493.webp?v=1766396598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dec77cdc77b3b1f1fc28cfc7d32695f64651f493.webp?v=1766396598","width":2000},{"alt":null,"id":26548613316707,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4abab3bbf40b467443859adcfe7a894cbc6739a1.webp?v=1766396598"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4abab3bbf40b467443859adcfe7a894cbc6739a1.webp?v=1766396598","width":2000},{"alt":null,"id":26548613709923,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e4673eecfd76f1c211237ad0a77025796d1b34b.webp?v=1766396599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e4673eecfd76f1c211237ad0a77025796d1b34b.webp?v=1766396599","width":2000},{"alt":null,"id":26548614135907,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff1695e54638f1878163db80b636c53d4ecea34b.webp?v=1766396599"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ff1695e54638f1878163db80b636c53d4ecea34b.webp?v=1766396599","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43904420511843,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-SEU10","requires_shipping":true,"taxable":true,"featured_image":{"id":34987595071587,"product_id":7942265208931,"position":6,"created_at":"2025-12-22T17:43:15+08:00","updated_at":"2025-12-22T17:43:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a257c24ef59a2dfbadd4eaf6998546ccea474750.webp?v=1766396597","variant_ids":[43904420511843]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗 - 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-SEU10","featured_media":{"alt":null,"id":26548611940451,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a257c24ef59a2dfbadd4eaf6998546ccea474750.webp?v=1766396597"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43904420741219,"title":"Navy Blue","option1":"Navy Blue","option2":null,"option3":null,"sku":"MPB01185J5-SEU10","requires_shipping":true,"taxable":true,"featured_image":{"id":34987594842211,"product_id":7942265208931,"position":5,"created_at":"2025-12-22T17:43:14+08:00","updated_at":"2025-12-22T17:43:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/badf370a51b91c96ac0aba0c859958db815ac78a.webp?v=1766396596","variant_ids":[43904420741219]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗 - 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-SEU10","featured_media":{"alt":null,"id":26548611678307,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/badf370a51b91c96ac0aba0c859958db815ac78a.webp?v=1766396596"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43904420970595,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MPB0118524-SEU10","requires_shipping":true,"taxable":true,"featured_image":{"id":34987595366499,"product_id":7942265208931,"position":7,"created_at":"2025-12-22T17:43:15+08:00","updated_at":"2025-12-22T17:43:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be01cf1a6b61491385580d188218808febf018a2.webp?v=1766396598","variant_ids":[43904420970595]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗 - 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-SEU10","featured_media":{"alt":null,"id":26548612366435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/be01cf1a6b61491385580d188218808febf018a2.webp?v=1766396598"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43904421527651,"title":"Graphite","option1":"Graphite","option2":null,"option3":null,"sku":"MPB0118569-SEU10","requires_shipping":true,"taxable":true,"featured_image":{"id":34987594678371,"product_id":7942265208931,"position":4,"created_at":"2025-12-22T17:43:14+08:00","updated_at":"2025-12-22T17:43:16+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d310d2a94b2863642417bd898815f1759492fe64.webp?v=1766396596","variant_ids":[43904421527651]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗 - 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-SEU10","featured_media":{"alt":null,"id":26548611547235,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d310d2a94b2863642417bd898815f1759492fe64.webp?v=1766396596"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43904422969443,"title":"White","option1":"White","option2":null,"option3":null,"sku":"MPB0118504-SEU10","requires_shipping":true,"taxable":true,"featured_image":{"id":34987593957475,"product_id":7942265208931,"position":2,"created_at":"2025-12-22T17:43:13+08:00","updated_at":"2025-12-22T17:43:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/376dee1a711e3e9a09a144bb1f13508f7f5d4fc0.webp?v=1766396594","variant_ids":[43904422969443]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗 - 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-SEU10","featured_media":{"alt":null,"id":26548610465891,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/376dee1a711e3e9a09a144bb1f13508f7f5d4fc0.webp?v=1766396594"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43904420511843,"title":"Lavender","option1":"Lavender","option2":null,"option3":null,"sku":"MPB01185C1-SEU10","requires_shipping":true,"taxable":true,"featured_image":{"id":34987595071587,"product_id":7942265208931,"position":6,"created_at":"2025-12-22T17:43:15+08:00","updated_at":"2025-12-22T17:43:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a257c24ef59a2dfbadd4eaf6998546ccea474750.webp?v=1766396597","variant_ids":[43904420511843]},"available":true,"name":"iPhone 12 \/ 12 Pro Mod NX (MagSafe 兼容) Seungyoun Kim 戴風車帽的小狗 - 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-SEU10","featured_media":{"alt":null,"id":26548611940451,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a257c24ef59a2dfbadd4eaf6998546ccea474750.webp?v=1766396597"}},"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: "停產" }