$product = {"id":7919955738723,"title":"iPhone 15 Plus Mod NX Incrediville 怪奇事物所 所長的星際迷航","handle":"iphone-15-plus-mod-nx-hd71","description":null,"published_at":"2025-11-13T10:06:37+08:00","created_at":"2025-11-10T09:52:14+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-incrediville","device-iPhone 15 Plus","merge","reseller-incrediville"],"price":90000,"price_min":90000,"price_max":90000,"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":43827529089123,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NPB0129657-HD71","requires_shipping":true,"taxable":true,"featured_image":{"id":34785897807971,"product_id":7919955738723,"position":16,"created_at":"2025-11-11T09:33:11+08:00","updated_at":"2025-11-11T09:33:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce_73f6f6b6-3ee0-413e-a37b-e5a41588d1ef.webp?v=1762824793","variant_ids":[43827529089123]},"available":true,"name":"iPhone 15 Plus Mod NX Incrediville 怪奇事物所 所長的星際迷航 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0129657-HD71","featured_media":{"alt":null,"id":26351354970211,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce_73f6f6b6-3ee0-413e-a37b-e5a41588d1ef.webp?v=1762824793"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43827529220195,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0129624-HD71","requires_shipping":true,"taxable":true,"featured_image":{"id":34785896267875,"product_id":7919955738723,"position":11,"created_at":"2025-11-11T09:33:07+08:00","updated_at":"2025-11-11T09:33:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0862178a0c8518a26ec0e4a7fe3479368af6c0d0_f447650f-b516-469b-a8d1-1e945c546a8b.webp?v=1762824789","variant_ids":[43827529220195]},"available":true,"name":"iPhone 15 Plus Mod NX Incrediville 怪奇事物所 所長的星際迷航 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0129624-HD71","featured_media":{"alt":null,"id":26351353528419,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0862178a0c8518a26ec0e4a7fe3479368af6c0d0_f447650f-b516-469b-a8d1-1e945c546a8b.webp?v=1762824789"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd25600267f9ba33ed31bde9f24fe67267c6a41e.webp?v=1762739542","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e284975b8a77feb56e7827edad107973101daff.webp?v=1762739542","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d93009aee7b33356d40b6328435470970e53a0c4.webp?v=1762739543","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0862178a0c8518a26ec0e4a7fe3479368af6c0d0.webp?v=1762739544","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce.webp?v=1762739544","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/592fda62baefd382993b187d85cdf5633942b5a8.webp?v=1762739545","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f92cb9243b1e7ce47d9c639b6bbbc790dc4baef0.webp?v=1762739546","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b7dcc435101d5985164be63e0dc9de326f908a0.webp?v=1762739547","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f6b457e5ac3859ea25ffb57eee3589a098d733d.webp?v=1762739547","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f6b457e5ac3859ea25ffb57eee3589a098d733d_16bbdce9-12d9-42d7-9e8d-b1f2e824533b.webp?v=1762824789","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0862178a0c8518a26ec0e4a7fe3479368af6c0d0_f447650f-b516-469b-a8d1-1e945c546a8b.webp?v=1762824789","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/592fda62baefd382993b187d85cdf5633942b5a8_ad0f60e4-0e23-4541-b415-9f1bdf6066ca.webp?v=1762824790","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b7dcc435101d5985164be63e0dc9de326f908a0_bb4a581a-08f0-4ec5-b234-f0a5fa67ebf8.webp?v=1762824791","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd25600267f9ba33ed31bde9f24fe67267c6a41e_90b9f738-c208-4079-9f12-144abf8b53aa.webp?v=1762824791","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e284975b8a77feb56e7827edad107973101daff_04bd0dfe-973c-4a0a-be03-d4dbd72e17d3.webp?v=1762824792","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce_73f6f6b6-3ee0-413e-a37b-e5a41588d1ef.webp?v=1762824793","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d93009aee7b33356d40b6328435470970e53a0c4_2288b879-81d4-4589-a207-e770ac94937b.webp?v=1762824794","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f92cb9243b1e7ce47d9c639b6bbbc790dc4baef0_be768564-1e68-43db-951e-5fdd329b9260.webp?v=1762824794"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd25600267f9ba33ed31bde9f24fe67267c6a41e.webp?v=1762739542","options":["color"],"media":[{"alt":null,"id":26345437364323,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd25600267f9ba33ed31bde9f24fe67267c6a41e.webp?v=1762739542"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd25600267f9ba33ed31bde9f24fe67267c6a41e.webp?v=1762739542","width":2000},{"alt":null,"id":26345437560931,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e284975b8a77feb56e7827edad107973101daff.webp?v=1762739542"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e284975b8a77feb56e7827edad107973101daff.webp?v=1762739542","width":2000},{"alt":null,"id":26345437757539,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d93009aee7b33356d40b6328435470970e53a0c4.webp?v=1762739543"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d93009aee7b33356d40b6328435470970e53a0c4.webp?v=1762739543","width":2000},{"alt":null,"id":26345437986915,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0862178a0c8518a26ec0e4a7fe3479368af6c0d0.webp?v=1762739544"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0862178a0c8518a26ec0e4a7fe3479368af6c0d0.webp?v=1762739544","width":2000},{"alt":null,"id":26345438117987,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce.webp?v=1762739544"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce.webp?v=1762739544","width":2000},{"alt":null,"id":26345438281827,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/592fda62baefd382993b187d85cdf5633942b5a8.webp?v=1762739545"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/592fda62baefd382993b187d85cdf5633942b5a8.webp?v=1762739545","width":2000},{"alt":null,"id":26345438609507,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f92cb9243b1e7ce47d9c639b6bbbc790dc4baef0.webp?v=1762739546"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f92cb9243b1e7ce47d9c639b6bbbc790dc4baef0.webp?v=1762739546","width":2000},{"alt":null,"id":26345438871651,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b7dcc435101d5985164be63e0dc9de326f908a0.webp?v=1762739547"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b7dcc435101d5985164be63e0dc9de326f908a0.webp?v=1762739547","width":2000},{"alt":null,"id":26345438969955,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f6b457e5ac3859ea25ffb57eee3589a098d733d.webp?v=1762739547"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f6b457e5ac3859ea25ffb57eee3589a098d733d.webp?v=1762739547","width":2000},{"alt":null,"id":26351353135203,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f6b457e5ac3859ea25ffb57eee3589a098d733d_16bbdce9-12d9-42d7-9e8d-b1f2e824533b.webp?v=1762824789"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0f6b457e5ac3859ea25ffb57eee3589a098d733d_16bbdce9-12d9-42d7-9e8d-b1f2e824533b.webp?v=1762824789","width":2000},{"alt":null,"id":26351353528419,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0862178a0c8518a26ec0e4a7fe3479368af6c0d0_f447650f-b516-469b-a8d1-1e945c546a8b.webp?v=1762824789"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0862178a0c8518a26ec0e4a7fe3479368af6c0d0_f447650f-b516-469b-a8d1-1e945c546a8b.webp?v=1762824789","width":2000},{"alt":null,"id":26351353888867,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/592fda62baefd382993b187d85cdf5633942b5a8_ad0f60e4-0e23-4541-b415-9f1bdf6066ca.webp?v=1762824790"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/592fda62baefd382993b187d85cdf5633942b5a8_ad0f60e4-0e23-4541-b415-9f1bdf6066ca.webp?v=1762824790","width":2000},{"alt":null,"id":26351354183779,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b7dcc435101d5985164be63e0dc9de326f908a0_bb4a581a-08f0-4ec5-b234-f0a5fa67ebf8.webp?v=1762824791"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0b7dcc435101d5985164be63e0dc9de326f908a0_bb4a581a-08f0-4ec5-b234-f0a5fa67ebf8.webp?v=1762824791","width":2000},{"alt":null,"id":26351354445923,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd25600267f9ba33ed31bde9f24fe67267c6a41e_90b9f738-c208-4079-9f12-144abf8b53aa.webp?v=1762824791"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd25600267f9ba33ed31bde9f24fe67267c6a41e_90b9f738-c208-4079-9f12-144abf8b53aa.webp?v=1762824791","width":2000},{"alt":null,"id":26351354675299,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e284975b8a77feb56e7827edad107973101daff_04bd0dfe-973c-4a0a-be03-d4dbd72e17d3.webp?v=1762824792"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8e284975b8a77feb56e7827edad107973101daff_04bd0dfe-973c-4a0a-be03-d4dbd72e17d3.webp?v=1762824792","width":2000},{"alt":null,"id":26351354970211,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce_73f6f6b6-3ee0-413e-a37b-e5a41588d1ef.webp?v=1762824793"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce_73f6f6b6-3ee0-413e-a37b-e5a41588d1ef.webp?v=1762824793","width":2000},{"alt":null,"id":26351355330659,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d93009aee7b33356d40b6328435470970e53a0c4_2288b879-81d4-4589-a207-e770ac94937b.webp?v=1762824794"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d93009aee7b33356d40b6328435470970e53a0c4_2288b879-81d4-4589-a207-e770ac94937b.webp?v=1762824794","width":2000},{"alt":null,"id":26351355723875,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f92cb9243b1e7ce47d9c639b6bbbc790dc4baef0_be768564-1e68-43db-951e-5fdd329b9260.webp?v=1762824794"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f92cb9243b1e7ce47d9c639b6bbbc790dc4baef0_be768564-1e68-43db-951e-5fdd329b9260.webp?v=1762824794","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43827529089123,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NPB0129657-HD71","requires_shipping":true,"taxable":true,"featured_image":{"id":34785897807971,"product_id":7919955738723,"position":16,"created_at":"2025-11-11T09:33:11+08:00","updated_at":"2025-11-11T09:33:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce_73f6f6b6-3ee0-413e-a37b-e5a41588d1ef.webp?v=1762824793","variant_ids":[43827529089123]},"available":true,"name":"iPhone 15 Plus Mod NX Incrediville 怪奇事物所 所長的星際迷航 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0129657-HD71","featured_media":{"alt":null,"id":26351354970211,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce_73f6f6b6-3ee0-413e-a37b-e5a41588d1ef.webp?v=1762824793"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43827529220195,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NPB0129624-HD71","requires_shipping":true,"taxable":true,"featured_image":{"id":34785896267875,"product_id":7919955738723,"position":11,"created_at":"2025-11-11T09:33:07+08:00","updated_at":"2025-11-11T09:33:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0862178a0c8518a26ec0e4a7fe3479368af6c0d0_f447650f-b516-469b-a8d1-1e945c546a8b.webp?v=1762824789","variant_ids":[43827529220195]},"available":true,"name":"iPhone 15 Plus Mod NX Incrediville 怪奇事物所 所長的星際迷航 - Black","public_title":"Black","options":["Black"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0129624-HD71","featured_media":{"alt":null,"id":26351353528419,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0862178a0c8518a26ec0e4a7fe3479368af6c0d0_f447650f-b516-469b-a8d1-1e945c546a8b.webp?v=1762824789"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43827529089123,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"NPB0129657-HD71","requires_shipping":true,"taxable":true,"featured_image":{"id":34785897807971,"product_id":7919955738723,"position":16,"created_at":"2025-11-11T09:33:11+08:00","updated_at":"2025-11-11T09:33:13+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce_73f6f6b6-3ee0-413e-a37b-e5a41588d1ef.webp?v=1762824793","variant_ids":[43827529089123]},"available":true,"name":"iPhone 15 Plus Mod NX Incrediville 怪奇事物所 所長的星際迷航 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":90000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0129657-HD71","featured_media":{"alt":null,"id":26351354970211,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/67eda6b980977d0214a0a1dbf5718ec7c12776ce_73f6f6b6-3ee0-413e-a37b-e5a41588d1ef.webp?v=1762824793"}},"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: "停產" }