$product = {"id":7411274678371,"title":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - X翼戰機-經典","handle":"iphone-14-pro-mod-nx-magsafe-printable-pb80","description":null,"published_at":"2024-06-11T17:40:32+08:00","created_at":"2024-05-04T23:58:16+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX MagSafe專區迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 14 Pro","merge","mod-nx-magsafe-printable","new-modnx-sku","reseller-modnx-magsafe-star-wars","Top50","type-Mod NX Printable MagSafe Printable"],"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":41896831451235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31480022040675,"product_id":7411274678371,"position":5,"created_at":"2024-05-04T23:58:28+08:00","updated_at":"2024-05-04T23:58:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96744b7987d050d91e09f69dbb3b48f7107b68f0_2cb7c615-ce7b-4e4d-baf1-506f208cd50a.webp?v=1714838308","variant_ids":[41896831451235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-PB80","featured_media":{"alt":null,"id":23885272645731,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96744b7987d050d91e09f69dbb3b48f7107b68f0_2cb7c615-ce7b-4e4d-baf1-506f208cd50a.webp?v=1714838308"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896831582307,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0126204-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31480023384163,"product_id":7411274678371,"position":8,"created_at":"2024-05-04T23:58:34+08:00","updated_at":"2024-05-04T23:58:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/240cfd22233479a8b7666b4b0a253efd7cbbcbd3_e6af5e0d-fad1-4b49-a0dd-2ec3dca96d7a.webp?v=1714838314","variant_ids":[41896831582307]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126204-PB80","featured_media":{"alt":null,"id":23885273956451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/240cfd22233479a8b7666b4b0a253efd7cbbcbd3_e6af5e0d-fad1-4b49-a0dd-2ec3dca96d7a.webp?v=1714838314"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896831975523,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01262J5-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31480019550307,"product_id":7411274678371,"position":1,"created_at":"2024-05-04T23:58:18+08:00","updated_at":"2024-05-04T23:58:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3de30c07a207d2abde6146ed5b1bb7d44f8e36_5f04c96a-9cc3-48fa-83ae-86ddc6ab5dc7.webp?v=1714838298","variant_ids":[41896831975523]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01262J5-PB80","featured_media":{"alt":null,"id":23885270319203,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3de30c07a207d2abde6146ed5b1bb7d44f8e36_5f04c96a-9cc3-48fa-83ae-86ddc6ab5dc7.webp?v=1714838298"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3de30c07a207d2abde6146ed5b1bb7d44f8e36_5f04c96a-9cc3-48fa-83ae-86ddc6ab5dc7.webp?v=1714838298","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32937f4a0bc4e47eaf9574471a70eec51ff237f3_fd9c8899-1206-45e0-8a38-0900eba78962.webp?v=1714838301","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e67b47ddd419525f1269d0133da180d159ecf8d_ece3c1d9-57c1-4844-b95e-c532b16b9c42.webp?v=1714838303","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af8a0e18160451f1165de463b1b97d9a9ae7ac8_4537820b-6927-4e6f-8e6b-59bd3de666a8.webp?v=1714838305","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96744b7987d050d91e09f69dbb3b48f7107b68f0_2cb7c615-ce7b-4e4d-baf1-506f208cd50a.webp?v=1714838308","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cccec49cd8776a86cf7577dd428861b819767146_4a4b4a37-487c-494f-9274-15526772bd5c.webp?v=1714838310","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8fc494d3a83c5aa0f42137217a6e53aee42868c_d9488fd0-9b70-4a74-ba59-4076fa2a0920.webp?v=1714838312","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/240cfd22233479a8b7666b4b0a253efd7cbbcbd3_e6af5e0d-fad1-4b49-a0dd-2ec3dca96d7a.webp?v=1714838314","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a259d5d47bf0ee5ecef278229b1de9eda3e4455_0e5b880d-e7fc-4f12-a1a9-f4333e40fdfd.webp?v=1714838317","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/748d1bbd3147d2b3cf686f6af4cbc70ad4d8a2da_841bb082-ea83-49a9-82ac-2451c3b7382f.webp?v=1714838319"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3de30c07a207d2abde6146ed5b1bb7d44f8e36_5f04c96a-9cc3-48fa-83ae-86ddc6ab5dc7.webp?v=1714838298","options":["color"],"media":[{"alt":null,"id":23885270319203,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3de30c07a207d2abde6146ed5b1bb7d44f8e36_5f04c96a-9cc3-48fa-83ae-86ddc6ab5dc7.webp?v=1714838298"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3de30c07a207d2abde6146ed5b1bb7d44f8e36_5f04c96a-9cc3-48fa-83ae-86ddc6ab5dc7.webp?v=1714838298","width":2000},{"alt":null,"id":23885270876259,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32937f4a0bc4e47eaf9574471a70eec51ff237f3_fd9c8899-1206-45e0-8a38-0900eba78962.webp?v=1714838301"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32937f4a0bc4e47eaf9574471a70eec51ff237f3_fd9c8899-1206-45e0-8a38-0900eba78962.webp?v=1714838301","width":2000},{"alt":null,"id":23885271466083,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e67b47ddd419525f1269d0133da180d159ecf8d_ece3c1d9-57c1-4844-b95e-c532b16b9c42.webp?v=1714838303"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1e67b47ddd419525f1269d0133da180d159ecf8d_ece3c1d9-57c1-4844-b95e-c532b16b9c42.webp?v=1714838303","width":2000},{"alt":null,"id":23885272154211,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af8a0e18160451f1165de463b1b97d9a9ae7ac8_4537820b-6927-4e6f-8e6b-59bd3de666a8.webp?v=1714838305"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5af8a0e18160451f1165de463b1b97d9a9ae7ac8_4537820b-6927-4e6f-8e6b-59bd3de666a8.webp?v=1714838305","width":2000},{"alt":null,"id":23885272645731,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96744b7987d050d91e09f69dbb3b48f7107b68f0_2cb7c615-ce7b-4e4d-baf1-506f208cd50a.webp?v=1714838308"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96744b7987d050d91e09f69dbb3b48f7107b68f0_2cb7c615-ce7b-4e4d-baf1-506f208cd50a.webp?v=1714838308","width":2000},{"alt":null,"id":23885273104483,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cccec49cd8776a86cf7577dd428861b819767146_4a4b4a37-487c-494f-9274-15526772bd5c.webp?v=1714838310"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cccec49cd8776a86cf7577dd428861b819767146_4a4b4a37-487c-494f-9274-15526772bd5c.webp?v=1714838310","width":2000},{"alt":null,"id":23885273464931,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8fc494d3a83c5aa0f42137217a6e53aee42868c_d9488fd0-9b70-4a74-ba59-4076fa2a0920.webp?v=1714838312"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c8fc494d3a83c5aa0f42137217a6e53aee42868c_d9488fd0-9b70-4a74-ba59-4076fa2a0920.webp?v=1714838312","width":2000},{"alt":null,"id":23885273956451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/240cfd22233479a8b7666b4b0a253efd7cbbcbd3_e6af5e0d-fad1-4b49-a0dd-2ec3dca96d7a.webp?v=1714838314"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/240cfd22233479a8b7666b4b0a253efd7cbbcbd3_e6af5e0d-fad1-4b49-a0dd-2ec3dca96d7a.webp?v=1714838314","width":2000},{"alt":null,"id":23885274415203,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a259d5d47bf0ee5ecef278229b1de9eda3e4455_0e5b880d-e7fc-4f12-a1a9-f4333e40fdfd.webp?v=1714838317"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a259d5d47bf0ee5ecef278229b1de9eda3e4455_0e5b880d-e7fc-4f12-a1a9-f4333e40fdfd.webp?v=1714838317","width":2000},{"alt":null,"id":23885274873955,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/748d1bbd3147d2b3cf686f6af4cbc70ad4d8a2da_841bb082-ea83-49a9-82ac-2451c3b7382f.webp?v=1714838319"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/748d1bbd3147d2b3cf686f6af4cbc70ad4d8a2da_841bb082-ea83-49a9-82ac-2451c3b7382f.webp?v=1714838319","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41896831451235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31480022040675,"product_id":7411274678371,"position":5,"created_at":"2024-05-04T23:58:28+08:00","updated_at":"2024-05-04T23:58:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96744b7987d050d91e09f69dbb3b48f7107b68f0_2cb7c615-ce7b-4e4d-baf1-506f208cd50a.webp?v=1714838308","variant_ids":[41896831451235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-PB80","featured_media":{"alt":null,"id":23885272645731,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96744b7987d050d91e09f69dbb3b48f7107b68f0_2cb7c615-ce7b-4e4d-baf1-506f208cd50a.webp?v=1714838308"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896831582307,"title":"Mod NX-白色邊框","option1":"Mod NX-白色邊框","option2":null,"option3":null,"sku":"MPB0126204-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31480023384163,"product_id":7411274678371,"position":8,"created_at":"2024-05-04T23:58:34+08:00","updated_at":"2024-05-04T23:58:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/240cfd22233479a8b7666b4b0a253efd7cbbcbd3_e6af5e0d-fad1-4b49-a0dd-2ec3dca96d7a.webp?v=1714838314","variant_ids":[41896831582307]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-白色邊框","public_title":"Mod NX-白色邊框","options":["Mod NX-白色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126204-PB80","featured_media":{"alt":null,"id":23885273956451,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/240cfd22233479a8b7666b4b0a253efd7cbbcbd3_e6af5e0d-fad1-4b49-a0dd-2ec3dca96d7a.webp?v=1714838314"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41896831975523,"title":"Mod NX-海軍藍邊框","option1":"Mod NX-海軍藍邊框","option2":null,"option3":null,"sku":"MPB01262J5-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31480019550307,"product_id":7411274678371,"position":1,"created_at":"2024-05-04T23:58:18+08:00","updated_at":"2024-05-04T23:58:18+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3de30c07a207d2abde6146ed5b1bb7d44f8e36_5f04c96a-9cc3-48fa-83ae-86ddc6ab5dc7.webp?v=1714838298","variant_ids":[41896831975523]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-海軍藍邊框","public_title":"Mod NX-海軍藍邊框","options":["Mod NX-海軍藍邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB01262J5-PB80","featured_media":{"alt":null,"id":23885270319203,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5d3de30c07a207d2abde6146ed5b1bb7d44f8e36_5f04c96a-9cc3-48fa-83ae-86ddc6ab5dc7.webp?v=1714838298"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41896831451235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"MPB0126224-PB80","requires_shipping":true,"taxable":true,"featured_image":{"id":31480022040675,"product_id":7411274678371,"position":5,"created_at":"2024-05-04T23:58:28+08:00","updated_at":"2024-05-04T23:58:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96744b7987d050d91e09f69dbb3b48f7107b68f0_2cb7c615-ce7b-4e4d-baf1-506f208cd50a.webp?v=1714838308","variant_ids":[41896831451235]},"available":true,"name":"犀牛盾Mod NX (MagSafe 兼容)手機殼 - iPhone 14 Pro - 迪士尼-星際大戰 Star Wars - X翼戰機-經典 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":110000,"weight":1500,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MPB0126224-PB80","featured_media":{"alt":null,"id":23885272645731,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96744b7987d050d91e09f69dbb3b48f7107b68f0_2cb7c615-ce7b-4e4d-baf1-506f208cd50a.webp?v=1714838308"}},"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: "停產" }