Home
›
iPhone X SolidSuit 1G 左看看
$product = {"id":7155893928035,"title":"iPhone X SolidSuit 1G 左看看","handle":"iphone-x-solidsuit-classic-iv05","description":null,"published_at":"2024-01-24T16:39:55+08:00","created_at":"2024-01-23T17:07:46+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit專區1G","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-1chun","device-iPhone X","merge","reseller-1chun"],"price":83000,"price_min":83000,"price_max":83000,"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":41197167935587,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0106452-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":36144741810275,"product_id":7155893928035,"position":18,"created_at":"2026-07-01T14:33:28+08:00","updated_at":"2026-07-01T14:33:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d66f1f4410fbee0f84c88ec096412a31e72afb0.webp?v=1782887610","variant_ids":[41197167935587]},"available":true,"name":"iPhone X SolidSuit 1G 左看看 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0106452-IV05","featured_media":{"alt":null,"id":27649629061219,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d66f1f4410fbee0f84c88ec096412a31e72afb0.webp?v=1782887610"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41197168164963,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"SST01064P2-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":30837701902435,"product_id":7155893928035,"position":12,"created_at":"2024-01-24T11:27:32+08:00","updated_at":"2024-01-24T11:27:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80933cef6ca022b509cf20e7404a3a3520894e9d_f4063c44-ad78-4c5b-8ab3-f48b55866c3b.webp?v=1706066852","variant_ids":[41197168164963]},"available":true,"name":"iPhone X SolidSuit 1G 左看看 - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":23208634974307,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80933cef6ca022b509cf20e7404a3a3520894e9d_f4063c44-ad78-4c5b-8ab3-f48b55866c3b.webp?v=1706066852"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80933cef6ca022b509cf20e7404a3a3520894e9d_97155970-bb27-4f85-850e-58ddddb15960.webp?v=1706000871","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f01f9f79a386cc2d5abd28d0873af1a790f172_080f4f9f-d9af-47f5-9864-ca9a52f6363d.webp?v=1706000873","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2062ea2e1fba55d83f5bc70af9c18ed5a9848ff7_da56d401-2069-4f2b-bfd9-a489c546b9a5.webp?v=1706000875","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bf722923d88237582b5d3069abd0eb66aae2a2e_517b8c28-5343-4c26-a57c-e7d833c0ce21.webp?v=1706000878","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9247c1e801996f272f7c83ada5a216c4dddb6aa1_118be19e-e5f9-43b3-98bf-29e828bec014.webp?v=1706000880","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509a43c50d7dbbf371463a3d0c9b1ce50aabf70c_04ad89aa-6c64-4603-84bc-b8e24e8416dc.webp?v=1706000882","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bf722923d88237582b5d3069abd0eb66aae2a2e_4a93d785-1c75-493c-a390-bbf540175e1a.webp?v=1706062576","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f01f9f79a386cc2d5abd28d0873af1a790f172_3e0bca7d-b6ab-4bff-ae8f-83e78385bb45.webp?v=1706062585","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509a43c50d7dbbf371463a3d0c9b1ce50aabf70c_bcb7143f-34f6-4eac-84cd-cb920948e3bc.webp?v=1706062587","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9247c1e801996f272f7c83ada5a216c4dddb6aa1_74b1e87e-ed33-4eba-8615-3f2685a2dae0.webp?v=1706062589","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509a43c50d7dbbf371463a3d0c9b1ce50aabf70c_92788597-3ef9-4dba-b216-6557813518dc.webp?v=1706066850","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80933cef6ca022b509cf20e7404a3a3520894e9d_f4063c44-ad78-4c5b-8ab3-f48b55866c3b.webp?v=1706066852","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2062ea2e1fba55d83f5bc70af9c18ed5a9848ff7_fb8de221-a64d-4c25-b124-7d453a37bc30.webp?v=1706066854","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bf722923d88237582b5d3069abd0eb66aae2a2e_82ac0b9f-55d2-4a0b-8616-0ba257a277a3.webp?v=1706066857","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9247c1e801996f272f7c83ada5a216c4dddb6aa1_d248e049-bdae-40d6-bdbc-dfcee3de118c.webp?v=1706066859","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02e6c23b0c6c4dc32b36f2cfabe1e9980f621465_482c14e2-2dd7-4daa-a7fd-44276c9200dc.webp?v=1706066861","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f01f9f79a386cc2d5abd28d0873af1a790f172_b2004e03-2653-43fb-ad97-e835b5f7aca1.webp?v=1706066864","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d66f1f4410fbee0f84c88ec096412a31e72afb0.webp?v=1782887610"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80933cef6ca022b509cf20e7404a3a3520894e9d_97155970-bb27-4f85-850e-58ddddb15960.webp?v=1706000871","options":["color"],"media":[{"alt":null,"id":23201997717603,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80933cef6ca022b509cf20e7404a3a3520894e9d_97155970-bb27-4f85-850e-58ddddb15960.webp?v=1706000871"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80933cef6ca022b509cf20e7404a3a3520894e9d_97155970-bb27-4f85-850e-58ddddb15960.webp?v=1706000871","width":2000},{"alt":null,"id":23201998700643,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f01f9f79a386cc2d5abd28d0873af1a790f172_080f4f9f-d9af-47f5-9864-ca9a52f6363d.webp?v=1706000873"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f01f9f79a386cc2d5abd28d0873af1a790f172_080f4f9f-d9af-47f5-9864-ca9a52f6363d.webp?v=1706000873","width":2000},{"alt":null,"id":23201999290467,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2062ea2e1fba55d83f5bc70af9c18ed5a9848ff7_da56d401-2069-4f2b-bfd9-a489c546b9a5.webp?v=1706000875"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2062ea2e1fba55d83f5bc70af9c18ed5a9848ff7_da56d401-2069-4f2b-bfd9-a489c546b9a5.webp?v=1706000875","width":2000},{"alt":null,"id":23202000339043,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bf722923d88237582b5d3069abd0eb66aae2a2e_517b8c28-5343-4c26-a57c-e7d833c0ce21.webp?v=1706000878"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bf722923d88237582b5d3069abd0eb66aae2a2e_517b8c28-5343-4c26-a57c-e7d833c0ce21.webp?v=1706000878","width":2000},{"alt":null,"id":23202000994403,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9247c1e801996f272f7c83ada5a216c4dddb6aa1_118be19e-e5f9-43b3-98bf-29e828bec014.webp?v=1706000880"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9247c1e801996f272f7c83ada5a216c4dddb6aa1_118be19e-e5f9-43b3-98bf-29e828bec014.webp?v=1706000880","width":2000},{"alt":null,"id":23202001584227,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509a43c50d7dbbf371463a3d0c9b1ce50aabf70c_04ad89aa-6c64-4603-84bc-b8e24e8416dc.webp?v=1706000882"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509a43c50d7dbbf371463a3d0c9b1ce50aabf70c_04ad89aa-6c64-4603-84bc-b8e24e8416dc.webp?v=1706000882","width":2000},{"alt":null,"id":23207133184099,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bf722923d88237582b5d3069abd0eb66aae2a2e_4a93d785-1c75-493c-a390-bbf540175e1a.webp?v=1706062576"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bf722923d88237582b5d3069abd0eb66aae2a2e_4a93d785-1c75-493c-a390-bbf540175e1a.webp?v=1706062576","width":2000},{"alt":null,"id":23207136985187,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f01f9f79a386cc2d5abd28d0873af1a790f172_3e0bca7d-b6ab-4bff-ae8f-83e78385bb45.webp?v=1706062585"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f01f9f79a386cc2d5abd28d0873af1a790f172_3e0bca7d-b6ab-4bff-ae8f-83e78385bb45.webp?v=1706062585","width":2000},{"alt":null,"id":23207137804387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509a43c50d7dbbf371463a3d0c9b1ce50aabf70c_bcb7143f-34f6-4eac-84cd-cb920948e3bc.webp?v=1706062587"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509a43c50d7dbbf371463a3d0c9b1ce50aabf70c_bcb7143f-34f6-4eac-84cd-cb920948e3bc.webp?v=1706062587","width":2000},{"alt":null,"id":23207138918499,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9247c1e801996f272f7c83ada5a216c4dddb6aa1_74b1e87e-ed33-4eba-8615-3f2685a2dae0.webp?v=1706062589"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9247c1e801996f272f7c83ada5a216c4dddb6aa1_74b1e87e-ed33-4eba-8615-3f2685a2dae0.webp?v=1706062589","width":2000},{"alt":null,"id":23208634581091,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509a43c50d7dbbf371463a3d0c9b1ce50aabf70c_92788597-3ef9-4dba-b216-6557813518dc.webp?v=1706066850"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/509a43c50d7dbbf371463a3d0c9b1ce50aabf70c_92788597-3ef9-4dba-b216-6557813518dc.webp?v=1706066850","width":2000},{"alt":null,"id":23208634974307,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80933cef6ca022b509cf20e7404a3a3520894e9d_f4063c44-ad78-4c5b-8ab3-f48b55866c3b.webp?v=1706066852"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80933cef6ca022b509cf20e7404a3a3520894e9d_f4063c44-ad78-4c5b-8ab3-f48b55866c3b.webp?v=1706066852","width":2000},{"alt":null,"id":23208635236451,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2062ea2e1fba55d83f5bc70af9c18ed5a9848ff7_fb8de221-a64d-4c25-b124-7d453a37bc30.webp?v=1706066854"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2062ea2e1fba55d83f5bc70af9c18ed5a9848ff7_fb8de221-a64d-4c25-b124-7d453a37bc30.webp?v=1706066854","width":2000},{"alt":null,"id":23208635465827,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bf722923d88237582b5d3069abd0eb66aae2a2e_82ac0b9f-55d2-4a0b-8616-0ba257a277a3.webp?v=1706066857"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3bf722923d88237582b5d3069abd0eb66aae2a2e_82ac0b9f-55d2-4a0b-8616-0ba257a277a3.webp?v=1706066857","width":2000},{"alt":null,"id":23208635629667,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9247c1e801996f272f7c83ada5a216c4dddb6aa1_d248e049-bdae-40d6-bdbc-dfcee3de118c.webp?v=1706066859"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9247c1e801996f272f7c83ada5a216c4dddb6aa1_d248e049-bdae-40d6-bdbc-dfcee3de118c.webp?v=1706066859","width":2000},{"alt":null,"id":23208635826275,"position":16,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02e6c23b0c6c4dc32b36f2cfabe1e9980f621465_482c14e2-2dd7-4daa-a7fd-44276c9200dc.webp?v=1706066861"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02e6c23b0c6c4dc32b36f2cfabe1e9980f621465_482c14e2-2dd7-4daa-a7fd-44276c9200dc.webp?v=1706066861","width":2000},{"alt":null,"id":23208636285027,"position":17,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f01f9f79a386cc2d5abd28d0873af1a790f172_b2004e03-2653-43fb-ad97-e835b5f7aca1.webp?v=1706066864"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/43f01f9f79a386cc2d5abd28d0873af1a790f172_b2004e03-2653-43fb-ad97-e835b5f7aca1.webp?v=1706066864","width":2000},{"alt":null,"id":27649629061219,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d66f1f4410fbee0f84c88ec096412a31e72afb0.webp?v=1782887610"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d66f1f4410fbee0f84c88ec096412a31e72afb0.webp?v=1782887610","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41197167935587,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0106452-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":36144741810275,"product_id":7155893928035,"position":18,"created_at":"2026-07-01T14:33:28+08:00","updated_at":"2026-07-01T14:33:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d66f1f4410fbee0f84c88ec096412a31e72afb0.webp?v=1782887610","variant_ids":[41197167935587]},"available":true,"name":"iPhone X SolidSuit 1G 左看看 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0106452-IV05","featured_media":{"alt":null,"id":27649629061219,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d66f1f4410fbee0f84c88ec096412a31e72afb0.webp?v=1782887610"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41197168164963,"title":"Sage Green","option1":"Sage Green","option2":null,"option3":null,"sku":"SST01064P2-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":30837701902435,"product_id":7155893928035,"position":12,"created_at":"2024-01-24T11:27:32+08:00","updated_at":"2024-01-24T11:27:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80933cef6ca022b509cf20e7404a3a3520894e9d_f4063c44-ad78-4c5b-8ab3-f48b55866c3b.webp?v=1706066852","variant_ids":[41197168164963]},"available":true,"name":"iPhone X SolidSuit 1G 左看看 - Sage Green","public_title":"Sage Green","options":["Sage Green"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":null,"featured_media":{"alt":null,"id":23208634974307,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/80933cef6ca022b509cf20e7404a3a3520894e9d_f4063c44-ad78-4c5b-8ab3-f48b55866c3b.webp?v=1706066852"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41197167935587,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0106452-IV05","requires_shipping":true,"taxable":true,"featured_image":{"id":36144741810275,"product_id":7155893928035,"position":18,"created_at":"2026-07-01T14:33:28+08:00","updated_at":"2026-07-01T14:33:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d66f1f4410fbee0f84c88ec096412a31e72afb0.webp?v=1782887610","variant_ids":[41197167935587]},"available":true,"name":"iPhone X SolidSuit 1G 左看看 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":830,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0106452-IV05","featured_media":{"alt":null,"id":27649629061219,"position":18,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d66f1f4410fbee0f84c88ec096412a31e72afb0.webp?v=1782887610"}},"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: "停產"
}