$product = {"id":7827272695907,"title":"iPhone 15 Plus SolidX Tour de France 1903","handle":"iphone-15-plus-solidx-bumper-back-crossover-design-tdf06","description":null,"published_at":"2025-07-14T11:04:14+08:00","created_at":"2025-06-26T15:24:23+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-tour-de-france","device-iPhone 15 Plus","merge","reseller-tour-de-france"],"price":125000,"price_min":125000,"price_max":125000,"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":43497397125219,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012960B-TDF06","requires_shipping":true,"taxable":true,"featured_image":{"id":34099503071331,"product_id":7827272695907,"position":16,"created_at":"2025-06-30T15:57:18+08:00","updated_at":"2025-06-30T15:57:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539_9ed814be-2f00-4160-ab04-865f45f2b0f5.webp?v=1751270240","variant_ids":[43497397125219]},"available":true,"name":"iPhone 15 Plus SolidX Tour de France 1903 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST012960B-TDF06","featured_media":{"alt":null,"id":25756152954979,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539_9ed814be-2f00-4160-ab04-865f45f2b0f5.webp?v=1751270240"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43497399943267,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129652-TDF06","requires_shipping":true,"taxable":true,"featured_image":{"id":34099502022755,"product_id":7827272695907,"position":14,"created_at":"2025-06-30T15:57:17+08:00","updated_at":"2025-06-30T15:57:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6094add465f0706aec1d76a89cd1142ef73ec838_c11267d9-8833-4c4b-aff5-2aa3e066c520.webp?v=1751270239","variant_ids":[43497399943267]},"available":true,"name":"iPhone 15 Plus SolidX Tour de France 1903 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129652-TDF06","featured_media":{"alt":null,"id":25756152463459,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6094add465f0706aec1d76a89cd1142ef73ec838_c11267d9-8833-4c4b-aff5-2aa3e066c520.webp?v=1751270239"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10fe0d2daeb0d0233d6d67ece25c6f11fd76e18f.webp?v=1750922668","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6094add465f0706aec1d76a89cd1142ef73ec838.webp?v=1750922669","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539.webp?v=1750922669","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2b94f1b6a8ad954d86c5a7ced11844f69e160a8.webp?v=1750922669","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bef3fd7f02208d35916847a40a74c13b281e5546.webp?v=1750922671","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358f57e7480bd4337d4ab9747ac6206e951c22b9.webp?v=1750922671","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a562406e9b48536fabb3d8c455ae0750690e93e.webp?v=1750922671","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e986ad27036ab4f76e6ecc598e8261199473e85.webp?v=1750922672","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/333968a385278c6c4bf39fe2569d56522332268a.webp?v=1750922672","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a02861f42ce412c22c38b7ddeac38eeef301883.webp?v=1750922673","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/333968a385278c6c4bf39fe2569d56522332268a_a9f1b964-f37a-4e45-9f1e-1117fecea41a.webp?v=1751270238","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e986ad27036ab4f76e6ecc598e8261199473e85_bf87d064-d658-4268-b227-5889ffd9bb01.webp?v=1751270238","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10fe0d2daeb0d0233d6d67ece25c6f11fd76e18f_692395a2-0548-4ce5-9943-fa3969b19d96.webp?v=1751270239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6094add465f0706aec1d76a89cd1142ef73ec838_c11267d9-8833-4c4b-aff5-2aa3e066c520.webp?v=1751270239","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358f57e7480bd4337d4ab9747ac6206e951c22b9_a9c71503-9473-463b-8b2d-9b0717674ca9.webp?v=1751270240","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539_9ed814be-2f00-4160-ab04-865f45f2b0f5.webp?v=1751270240","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a562406e9b48536fabb3d8c455ae0750690e93e_707f4d49-a5a6-4679-9428-3b23ff8c5a12.webp?v=1751270241","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bef3fd7f02208d35916847a40a74c13b281e5546_bcc67143-59b4-43a2-b6b9-b7c142aec9f4.webp?v=1751270241","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2b94f1b6a8ad954d86c5a7ced11844f69e160a8_4acd09ef-0b1e-4715-91bf-25e609aabcb7.webp?v=1751270242","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a02861f42ce412c22c38b7ddeac38eeef301883_6bfe386d-32d9-4865-83a4-dd6966e0254b.webp?v=1751270242"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10fe0d2daeb0d0233d6d67ece25c6f11fd76e18f.webp?v=1750922668","options":["color"],"media":[{"alt":null,"id":25742873329763,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10fe0d2daeb0d0233d6d67ece25c6f11fd76e18f.webp?v=1750922668"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10fe0d2daeb0d0233d6d67ece25c6f11fd76e18f.webp?v=1750922668","width":2000},{"alt":null,"id":25742873395299,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6094add465f0706aec1d76a89cd1142ef73ec838.webp?v=1750922669"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6094add465f0706aec1d76a89cd1142ef73ec838.webp?v=1750922669","width":2000},{"alt":null,"id":25742873493603,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539.webp?v=1750922669"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539.webp?v=1750922669","width":2000},{"alt":null,"id":25742873624675,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2b94f1b6a8ad954d86c5a7ced11844f69e160a8.webp?v=1750922669"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2b94f1b6a8ad954d86c5a7ced11844f69e160a8.webp?v=1750922669","width":2000},{"alt":null,"id":25742873788515,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bef3fd7f02208d35916847a40a74c13b281e5546.webp?v=1750922671"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bef3fd7f02208d35916847a40a74c13b281e5546.webp?v=1750922671","width":2000},{"alt":null,"id":25742874017891,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358f57e7480bd4337d4ab9747ac6206e951c22b9.webp?v=1750922671"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358f57e7480bd4337d4ab9747ac6206e951c22b9.webp?v=1750922671","width":2000},{"alt":null,"id":25742874312803,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a562406e9b48536fabb3d8c455ae0750690e93e.webp?v=1750922671"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a562406e9b48536fabb3d8c455ae0750690e93e.webp?v=1750922671","width":2000},{"alt":null,"id":25742874574947,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e986ad27036ab4f76e6ecc598e8261199473e85.webp?v=1750922672"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e986ad27036ab4f76e6ecc598e8261199473e85.webp?v=1750922672","width":2000},{"alt":null,"id":25742874869859,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/333968a385278c6c4bf39fe2569d56522332268a.webp?v=1750922672"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/333968a385278c6c4bf39fe2569d56522332268a.webp?v=1750922672","width":2000},{"alt":null,"id":25742875033699,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a02861f42ce412c22c38b7ddeac38eeef301883.webp?v=1750922673"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a02861f42ce412c22c38b7ddeac38eeef301883.webp?v=1750922673","width":2000},{"alt":null,"id":25756150956131,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/333968a385278c6c4bf39fe2569d56522332268a_a9f1b964-f37a-4e45-9f1e-1117fecea41a.webp?v=1751270238"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/333968a385278c6c4bf39fe2569d56522332268a_a9f1b964-f37a-4e45-9f1e-1117fecea41a.webp?v=1751270238","width":2000},{"alt":null,"id":25756151414883,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e986ad27036ab4f76e6ecc598e8261199473e85_bf87d064-d658-4268-b227-5889ffd9bb01.webp?v=1751270238"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9e986ad27036ab4f76e6ecc598e8261199473e85_bf87d064-d658-4268-b227-5889ffd9bb01.webp?v=1751270238","width":2000},{"alt":null,"id":25756151906403,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10fe0d2daeb0d0233d6d67ece25c6f11fd76e18f_692395a2-0548-4ce5-9943-fa3969b19d96.webp?v=1751270239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/10fe0d2daeb0d0233d6d67ece25c6f11fd76e18f_692395a2-0548-4ce5-9943-fa3969b19d96.webp?v=1751270239","width":2000},{"alt":null,"id":25756152463459,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6094add465f0706aec1d76a89cd1142ef73ec838_c11267d9-8833-4c4b-aff5-2aa3e066c520.webp?v=1751270239"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6094add465f0706aec1d76a89cd1142ef73ec838_c11267d9-8833-4c4b-aff5-2aa3e066c520.webp?v=1751270239","width":2000},{"alt":null,"id":25756152725603,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358f57e7480bd4337d4ab9747ac6206e951c22b9_a9c71503-9473-463b-8b2d-9b0717674ca9.webp?v=1751270240"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/358f57e7480bd4337d4ab9747ac6206e951c22b9_a9c71503-9473-463b-8b2d-9b0717674ca9.webp?v=1751270240","width":2000},{"alt":null,"id":25756152954979,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539_9ed814be-2f00-4160-ab04-865f45f2b0f5.webp?v=1751270240"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539_9ed814be-2f00-4160-ab04-865f45f2b0f5.webp?v=1751270240","width":2000},{"alt":null,"id":25756153086051,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a562406e9b48536fabb3d8c455ae0750690e93e_707f4d49-a5a6-4679-9428-3b23ff8c5a12.webp?v=1751270241"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2a562406e9b48536fabb3d8c455ae0750690e93e_707f4d49-a5a6-4679-9428-3b23ff8c5a12.webp?v=1751270241","width":2000},{"alt":null,"id":25756153348195,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bef3fd7f02208d35916847a40a74c13b281e5546_bcc67143-59b4-43a2-b6b9-b7c142aec9f4.webp?v=1751270241"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bef3fd7f02208d35916847a40a74c13b281e5546_bcc67143-59b4-43a2-b6b9-b7c142aec9f4.webp?v=1751270241","width":2000},{"alt":null,"id":25756153675875,"position":19,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2b94f1b6a8ad954d86c5a7ced11844f69e160a8_4acd09ef-0b1e-4715-91bf-25e609aabcb7.webp?v=1751270242"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e2b94f1b6a8ad954d86c5a7ced11844f69e160a8_4acd09ef-0b1e-4715-91bf-25e609aabcb7.webp?v=1751270242","width":2000},{"alt":null,"id":25756154101859,"position":20,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a02861f42ce412c22c38b7ddeac38eeef301883_6bfe386d-32d9-4865-83a4-dd6966e0254b.webp?v=1751270242"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a02861f42ce412c22c38b7ddeac38eeef301883_6bfe386d-32d9-4865-83a4-dd6966e0254b.webp?v=1751270242","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43497397125219,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012960B-TDF06","requires_shipping":true,"taxable":true,"featured_image":{"id":34099503071331,"product_id":7827272695907,"position":16,"created_at":"2025-06-30T15:57:18+08:00","updated_at":"2025-06-30T15:57:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539_9ed814be-2f00-4160-ab04-865f45f2b0f5.webp?v=1751270240","variant_ids":[43497397125219]},"available":true,"name":"iPhone 15 Plus SolidX Tour de France 1903 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST012960B-TDF06","featured_media":{"alt":null,"id":25756152954979,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539_9ed814be-2f00-4160-ab04-865f45f2b0f5.webp?v=1751270240"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43497399943267,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129652-TDF06","requires_shipping":true,"taxable":true,"featured_image":{"id":34099502022755,"product_id":7827272695907,"position":14,"created_at":"2025-06-30T15:57:17+08:00","updated_at":"2025-06-30T15:57:19+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6094add465f0706aec1d76a89cd1142ef73ec838_c11267d9-8833-4c4b-aff5-2aa3e066c520.webp?v=1751270239","variant_ids":[43497399943267]},"available":true,"name":"iPhone 15 Plus SolidX Tour de France 1903 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129652-TDF06","featured_media":{"alt":null,"id":25756152463459,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6094add465f0706aec1d76a89cd1142ef73ec838_c11267d9-8833-4c4b-aff5-2aa3e066c520.webp?v=1751270239"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43497397125219,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012960B-TDF06","requires_shipping":true,"taxable":true,"featured_image":{"id":34099503071331,"product_id":7827272695907,"position":16,"created_at":"2025-06-30T15:57:18+08:00","updated_at":"2025-06-30T15:57:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539_9ed814be-2f00-4160-ab04-865f45f2b0f5.webp?v=1751270240","variant_ids":[43497397125219]},"available":true,"name":"iPhone 15 Plus SolidX Tour de France 1903 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST012960B-TDF06","featured_media":{"alt":null,"id":25756152954979,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/496f5d8ae32fa383d56541830781efc61fe93539_9ed814be-2f00-4160-ab04-865f45f2b0f5.webp?v=1751270240"}},"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: "停產" }