Home
›
iPhone 7 / 8 / SE / SE2 SolidSuit 太空 阿波羅飛行計劃
$product = {"id":4509068066915,"title":"iPhone 7 \/ 8 \/ SE \/ SE2 SolidSuit 太空 阿波羅飛行計劃","handle":"iphone-8-solidsuit-classic-xk16","description":"\u003cp\u003e\u003c\/p\u003e","published_at":"2020-03-18T17:30:16+08:00","created_at":"2020-03-18T16:01:36+08:00","vendor":"Rhinoshield","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nasa","device-iPhone 8","merge","reseller-nasa"],"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":33369987219555,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0116452-XK16","requires_shipping":true,"taxable":true,"featured_image":{"id":36480530448483,"product_id":4509068066915,"position":10,"created_at":"2026-08-04T19:01:09+08:00","updated_at":"2026-08-04T19:01:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe_ccb02eaa-83d1-45b2-ade1-0bb6e55e9d96.webp?v=1785841271","variant_ids":[33369987219555]},"available":true,"name":"iPhone 7 \/ 8 \/ SE \/ SE2 SolidSuit 太空 阿波羅飛行計劃 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0116452-XK16","featured_media":{"alt":null,"id":27983849291875,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe_ccb02eaa-83d1-45b2-ade1-0bb6e55e9d96.webp?v=1785841271"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":33369987252323,"title":"White","option1":"White","option2":null,"option3":null,"sku":"SST0116453-XK16","requires_shipping":true,"taxable":true,"featured_image":{"id":36480531857507,"product_id":4509068066915,"position":12,"created_at":"2026-08-04T19:01:13+08:00","updated_at":"2026-08-04T19:01:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4c9d2e8c80af0b6f78518b4cb6fe9c2bf1febc_fce1f91d-7c97-41dd-a05a-7a7461c74038.webp?v=1785841275","variant_ids":[33369987252323]},"available":true,"name":"iPhone 7 \/ 8 \/ SE \/ SE2 SolidSuit 太空 阿波羅飛行計劃 - White","public_title":"White","options":["White"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0116453-XK16","featured_media":{"alt":null,"id":27983850799203,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4c9d2e8c80af0b6f78518b4cb6fe9c2bf1febc_fce1f91d-7c97-41dd-a05a-7a7461c74038.webp?v=1785841275"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40306296881251,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"SST01164O8-XK16","requires_shipping":true,"taxable":true,"featured_image":{"id":36480529760355,"product_id":4509068066915,"position":9,"created_at":"2026-08-04T19:01:08+08:00","updated_at":"2026-08-04T19:01:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4347654c85308a2849077ccaae9aa8129793ceb5_6b8816e6-2fb2-4f74-ba14-cc9db09f264f.webp?v=1785841270","variant_ids":[40306296881251]},"available":true,"name":"iPhone 7 \/ 8 \/ SE \/ SE2 SolidSuit 太空 阿波羅飛行計劃 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01164O8-XK16","featured_media":{"alt":null,"id":27983848636515,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4347654c85308a2849077ccaae9aa8129793ceb5_6b8816e6-2fb2-4f74-ba14-cc9db09f264f.webp?v=1785841270"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/product-SST0116453-XK16_2f9061e3-8192-4892-8eb1-1c83f261f41b.png?v=1679987330","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe.webp?v=1784001464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f62414be9e921c809056f39d72b21b594e5cdf8d.webp?v=1784001465","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4347654c85308a2849077ccaae9aa8129793ceb5.webp?v=1784001466","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26654c4af990344aa4666e01af12af1f813f0349.webp?v=1784001466","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4c9d2e8c80af0b6f78518b4cb6fe9c2bf1febc.webp?v=1784001468","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1742d0ef9504dda279f3d5b39ac2bd003d7a16f.webp?v=1784001468","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e4bd5c461fb4b4f9a21da5db14d35c3ef56675.webp?v=1784001469","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4347654c85308a2849077ccaae9aa8129793ceb5_6b8816e6-2fb2-4f74-ba14-cc9db09f264f.webp?v=1785841270","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe_ccb02eaa-83d1-45b2-ade1-0bb6e55e9d96.webp?v=1785841271","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e4bd5c461fb4b4f9a21da5db14d35c3ef56675_63868624-013e-4b27-b8b6-7e864538b2d7.webp?v=1785841274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4c9d2e8c80af0b6f78518b4cb6fe9c2bf1febc_fce1f91d-7c97-41dd-a05a-7a7461c74038.webp?v=1785841275","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26654c4af990344aa4666e01af12af1f813f0349_e964824c-3825-4be7-b5a8-39eb032d5c5f.webp?v=1785841277","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1742d0ef9504dda279f3d5b39ac2bd003d7a16f_e6e5944b-9f66-467c-a8a4-a655ad1584a3.webp?v=1785841278"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/product-SST0116453-XK16_2f9061e3-8192-4892-8eb1-1c83f261f41b.png?v=1679987330","options":["color"],"media":[{"alt":null,"id":22295174873187,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/product-SST0116453-XK16_2f9061e3-8192-4892-8eb1-1c83f261f41b.png?v=1679987330"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/products\/product-SST0116453-XK16_2f9061e3-8192-4892-8eb1-1c83f261f41b.png?v=1679987330","width":2000},{"alt":null,"id":27760439165027,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe.webp?v=1784001464"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe.webp?v=1784001464","width":2000},{"alt":null,"id":27760439459939,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f62414be9e921c809056f39d72b21b594e5cdf8d.webp?v=1784001465"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f62414be9e921c809056f39d72b21b594e5cdf8d.webp?v=1784001465","width":2000},{"alt":null,"id":27760439853155,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4347654c85308a2849077ccaae9aa8129793ceb5.webp?v=1784001466"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4347654c85308a2849077ccaae9aa8129793ceb5.webp?v=1784001466","width":2000},{"alt":null,"id":27760440213603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26654c4af990344aa4666e01af12af1f813f0349.webp?v=1784001466"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26654c4af990344aa4666e01af12af1f813f0349.webp?v=1784001466","width":2000},{"alt":null,"id":27760440410211,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4c9d2e8c80af0b6f78518b4cb6fe9c2bf1febc.webp?v=1784001468"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4c9d2e8c80af0b6f78518b4cb6fe9c2bf1febc.webp?v=1784001468","width":2000},{"alt":null,"id":27760441000035,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1742d0ef9504dda279f3d5b39ac2bd003d7a16f.webp?v=1784001468"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1742d0ef9504dda279f3d5b39ac2bd003d7a16f.webp?v=1784001468","width":2000},{"alt":null,"id":27760441589859,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e4bd5c461fb4b4f9a21da5db14d35c3ef56675.webp?v=1784001469"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e4bd5c461fb4b4f9a21da5db14d35c3ef56675.webp?v=1784001469","width":2000},{"alt":null,"id":27983848636515,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4347654c85308a2849077ccaae9aa8129793ceb5_6b8816e6-2fb2-4f74-ba14-cc9db09f264f.webp?v=1785841270"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4347654c85308a2849077ccaae9aa8129793ceb5_6b8816e6-2fb2-4f74-ba14-cc9db09f264f.webp?v=1785841270","width":2000},{"alt":null,"id":27983849291875,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe_ccb02eaa-83d1-45b2-ade1-0bb6e55e9d96.webp?v=1785841271"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe_ccb02eaa-83d1-45b2-ade1-0bb6e55e9d96.webp?v=1785841271","width":2000},{"alt":null,"id":27983850012771,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e4bd5c461fb4b4f9a21da5db14d35c3ef56675_63868624-013e-4b27-b8b6-7e864538b2d7.webp?v=1785841274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e6e4bd5c461fb4b4f9a21da5db14d35c3ef56675_63868624-013e-4b27-b8b6-7e864538b2d7.webp?v=1785841274","width":2000},{"alt":null,"id":27983850799203,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4c9d2e8c80af0b6f78518b4cb6fe9c2bf1febc_fce1f91d-7c97-41dd-a05a-7a7461c74038.webp?v=1785841275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4c9d2e8c80af0b6f78518b4cb6fe9c2bf1febc_fce1f91d-7c97-41dd-a05a-7a7461c74038.webp?v=1785841275","width":2000},{"alt":null,"id":27983851454563,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26654c4af990344aa4666e01af12af1f813f0349_e964824c-3825-4be7-b5a8-39eb032d5c5f.webp?v=1785841277"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/26654c4af990344aa4666e01af12af1f813f0349_e964824c-3825-4be7-b5a8-39eb032d5c5f.webp?v=1785841277","width":2000},{"alt":null,"id":27983852208227,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1742d0ef9504dda279f3d5b39ac2bd003d7a16f_e6e5944b-9f66-467c-a8a4-a655ad1584a3.webp?v=1785841278"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b1742d0ef9504dda279f3d5b39ac2bd003d7a16f_e6e5944b-9f66-467c-a8a4-a655ad1584a3.webp?v=1785841278","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":"\u003cp\u003e\u003c\/p\u003e"};
$isMerge = null;
$variants = [{"id":33369987219555,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0116452-XK16","requires_shipping":true,"taxable":true,"featured_image":{"id":36480530448483,"product_id":4509068066915,"position":10,"created_at":"2026-08-04T19:01:09+08:00","updated_at":"2026-08-04T19:01:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe_ccb02eaa-83d1-45b2-ade1-0bb6e55e9d96.webp?v=1785841271","variant_ids":[33369987219555]},"available":true,"name":"iPhone 7 \/ 8 \/ SE \/ SE2 SolidSuit 太空 阿波羅飛行計劃 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0116452-XK16","featured_media":{"alt":null,"id":27983849291875,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe_ccb02eaa-83d1-45b2-ade1-0bb6e55e9d96.webp?v=1785841271"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":33369987252323,"title":"White","option1":"White","option2":null,"option3":null,"sku":"SST0116453-XK16","requires_shipping":true,"taxable":true,"featured_image":{"id":36480531857507,"product_id":4509068066915,"position":12,"created_at":"2026-08-04T19:01:13+08:00","updated_at":"2026-08-04T19:01:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4c9d2e8c80af0b6f78518b4cb6fe9c2bf1febc_fce1f91d-7c97-41dd-a05a-7a7461c74038.webp?v=1785841275","variant_ids":[33369987252323]},"available":true,"name":"iPhone 7 \/ 8 \/ SE \/ SE2 SolidSuit 太空 阿波羅飛行計劃 - White","public_title":"White","options":["White"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0116453-XK16","featured_media":{"alt":null,"id":27983850799203,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae4c9d2e8c80af0b6f78518b4cb6fe9c2bf1febc_fce1f91d-7c97-41dd-a05a-7a7461c74038.webp?v=1785841275"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":40306296881251,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"SST01164O8-XK16","requires_shipping":true,"taxable":true,"featured_image":{"id":36480529760355,"product_id":4509068066915,"position":9,"created_at":"2026-08-04T19:01:08+08:00","updated_at":"2026-08-04T19:01:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4347654c85308a2849077ccaae9aa8129793ceb5_6b8816e6-2fb2-4f74-ba14-cc9db09f264f.webp?v=1785841270","variant_ids":[40306296881251]},"available":true,"name":"iPhone 7 \/ 8 \/ SE \/ SE2 SolidSuit 太空 阿波羅飛行計劃 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01164O8-XK16","featured_media":{"alt":null,"id":27983848636515,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4347654c85308a2849077ccaae9aa8129793ceb5_6b8816e6-2fb2-4f74-ba14-cc9db09f264f.webp?v=1785841270"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":33369987219555,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0116452-XK16","requires_shipping":true,"taxable":true,"featured_image":{"id":36480530448483,"product_id":4509068066915,"position":10,"created_at":"2026-08-04T19:01:09+08:00","updated_at":"2026-08-04T19:01:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe_ccb02eaa-83d1-45b2-ade1-0bb6e55e9d96.webp?v=1785841271","variant_ids":[33369987219555]},"available":true,"name":"iPhone 7 \/ 8 \/ SE \/ SE2 SolidSuit 太空 阿波羅飛行計劃 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0116452-XK16","featured_media":{"alt":null,"id":27983849291875,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0e80e9e36d715aa7b518cc5c1dec190b6dd267fe_ccb02eaa-83d1-45b2-ade1-0bb6e55e9d96.webp?v=1785841271"}},"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: "停產"
}