Home
›
iPhone 17 Pro Clear (MagSafe 兼容 & 相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks
$product = {"id":7863300751459,"title":"iPhone 17 Pro Clear (MagSafe 兼容 \u0026 相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks","handle":"iphone-17-pro-jellytint-magsafe-with-capture-button-pm14","description":null,"published_at":"2025-09-10T18:51:37+08:00","created_at":"2025-08-22T18:50:22+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nba","device-iPhone 17 Pro","merge","reseller-nba"],"price":148000,"price_min":148000,"price_max":148000,"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":43608594514019,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MJB013520G-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152516378723,"product_id":7863300751459,"position":11,"created_at":"2026-07-02T12:24:32+08:00","updated_at":"2026-07-02T12:24:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_7243bdbf-89d8-4bff-872d-4b7263c1d4f8.webp?v=1782966273","variant_ids":[43608594514019]},"available":true,"name":"iPhone 17 Pro Clear (MagSafe 兼容 \u0026 相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013520G-PM14","featured_media":{"alt":null,"id":27657389867107,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_7243bdbf-89d8-4bff-872d-4b7263c1d4f8.webp?v=1782966273"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43608595431523,"title":"Nocturne Blue","option1":"Nocturne Blue","option2":null,"option3":null,"sku":"MJB013524M-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152516837475,"product_id":7863300751459,"position":12,"created_at":"2026-07-02T12:24:32+08:00","updated_at":"2026-07-02T12:24:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_cfcf422a-f1d0-4101-af9b-5049b776f061.webp?v=1782966274","variant_ids":[43608595431523]},"available":true,"name":"iPhone 17 Pro Clear (MagSafe 兼容 \u0026 相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - Nocturne Blue","public_title":"Nocturne Blue","options":["Nocturne Blue"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013524M-PM14","featured_media":{"alt":null,"id":27657390325859,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_cfcf422a-f1d0-4101-af9b-5049b776f061.webp?v=1782966274"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43608595464291,"title":"Gleam Rosé","option1":"Gleam Rosé","option2":null,"option3":null,"sku":"MJB013524L-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152517296227,"product_id":7863300751459,"position":13,"created_at":"2026-07-02T12:24:33+08:00","updated_at":"2026-07-02T12:24:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_6a4be279-c96a-4393-9c76-71c7a1a786b3.webp?v=1782966275","variant_ids":[43608595464291]},"available":true,"name":"iPhone 17 Pro Clear (MagSafe 兼容 \u0026 相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - Gleam Rosé","public_title":"Gleam Rosé","options":["Gleam Rosé"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013524L-PM14","featured_media":{"alt":null,"id":27657390784611,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_6a4be279-c96a-4393-9c76-71c7a1a786b3.webp?v=1782966275"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-352-PM14_b16d2de6-6bab-4269-a3a7-86e7025e552a.png?v=1755859825","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1.webp?v=1782213316","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753.webp?v=1782213317","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8.webp?v=1782213317","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_59e0c0c9-000d-40aa-925a-75ddcf6d55e2.webp?v=1782958606","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_e0b096d8-9607-45c4-af8c-ee560b97260b.webp?v=1782958607","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_0a8c2a06-bfad-4481-bb8b-59fc80abbea2.webp?v=1782958607","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_a8b9b6fa-ae1b-41ad-acb4-7bb982664ef7.webp?v=1782961975","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_599ef9c9-48cc-4e59-82c8-af80802fa7e2.webp?v=1782961977","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_c23206ff-f6ca-48f7-8ee6-7b977dd206cb.webp?v=1782961980","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_7243bdbf-89d8-4bff-872d-4b7263c1d4f8.webp?v=1782966273","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_cfcf422a-f1d0-4101-af9b-5049b776f061.webp?v=1782966274","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_6a4be279-c96a-4393-9c76-71c7a1a786b3.webp?v=1782966275"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-352-PM14_b16d2de6-6bab-4269-a3a7-86e7025e552a.png?v=1755859825","options":["color"],"media":[{"alt":null,"id":25941324496995,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-352-PM14_b16d2de6-6bab-4269-a3a7-86e7025e552a.png?v=1755859825"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/Clear-F5-352-PM14_b16d2de6-6bab-4269-a3a7-86e7025e552a.png?v=1755859825","width":2000},{"alt":null,"id":27578452705379,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1.webp?v=1782213316"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1.webp?v=1782213316","width":2000},{"alt":null,"id":27578452934755,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753.webp?v=1782213317"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753.webp?v=1782213317","width":2000},{"alt":null,"id":27578453164131,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8.webp?v=1782213317"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8.webp?v=1782213317","width":2000},{"alt":null,"id":27656225882211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_59e0c0c9-000d-40aa-925a-75ddcf6d55e2.webp?v=1782958606"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_59e0c0c9-000d-40aa-925a-75ddcf6d55e2.webp?v=1782958606","width":2000},{"alt":null,"id":27656226603107,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_e0b096d8-9607-45c4-af8c-ee560b97260b.webp?v=1782958607"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_e0b096d8-9607-45c4-af8c-ee560b97260b.webp?v=1782958607","width":2000},{"alt":null,"id":27656227324003,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_0a8c2a06-bfad-4481-bb8b-59fc80abbea2.webp?v=1782958607"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_0a8c2a06-bfad-4481-bb8b-59fc80abbea2.webp?v=1782958607","width":2000},{"alt":null,"id":27656897101923,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_a8b9b6fa-ae1b-41ad-acb4-7bb982664ef7.webp?v=1782961975"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_a8b9b6fa-ae1b-41ad-acb4-7bb982664ef7.webp?v=1782961975","width":2000},{"alt":null,"id":27656897888355,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_599ef9c9-48cc-4e59-82c8-af80802fa7e2.webp?v=1782961977"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_599ef9c9-48cc-4e59-82c8-af80802fa7e2.webp?v=1782961977","width":2000},{"alt":null,"id":27656898216035,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_c23206ff-f6ca-48f7-8ee6-7b977dd206cb.webp?v=1782961980"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_c23206ff-f6ca-48f7-8ee6-7b977dd206cb.webp?v=1782961980","width":2000},{"alt":null,"id":27657389867107,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_7243bdbf-89d8-4bff-872d-4b7263c1d4f8.webp?v=1782966273"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_7243bdbf-89d8-4bff-872d-4b7263c1d4f8.webp?v=1782966273","width":2000},{"alt":null,"id":27657390325859,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_cfcf422a-f1d0-4101-af9b-5049b776f061.webp?v=1782966274"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_cfcf422a-f1d0-4101-af9b-5049b776f061.webp?v=1782966274","width":2000},{"alt":null,"id":27657390784611,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_6a4be279-c96a-4393-9c76-71c7a1a786b3.webp?v=1782966275"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_6a4be279-c96a-4393-9c76-71c7a1a786b3.webp?v=1782966275","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43608594514019,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MJB013520G-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152516378723,"product_id":7863300751459,"position":11,"created_at":"2026-07-02T12:24:32+08:00","updated_at":"2026-07-02T12:24:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_7243bdbf-89d8-4bff-872d-4b7263c1d4f8.webp?v=1782966273","variant_ids":[43608594514019]},"available":true,"name":"iPhone 17 Pro Clear (MagSafe 兼容 \u0026 相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013520G-PM14","featured_media":{"alt":null,"id":27657389867107,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_7243bdbf-89d8-4bff-872d-4b7263c1d4f8.webp?v=1782966273"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43608595431523,"title":"Nocturne Blue","option1":"Nocturne Blue","option2":null,"option3":null,"sku":"MJB013524M-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152516837475,"product_id":7863300751459,"position":12,"created_at":"2026-07-02T12:24:32+08:00","updated_at":"2026-07-02T12:24:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_cfcf422a-f1d0-4101-af9b-5049b776f061.webp?v=1782966274","variant_ids":[43608595431523]},"available":true,"name":"iPhone 17 Pro Clear (MagSafe 兼容 \u0026 相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - Nocturne Blue","public_title":"Nocturne Blue","options":["Nocturne Blue"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013524M-PM14","featured_media":{"alt":null,"id":27657390325859,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2157656fd6cb53365b995f1ee90444c72a25b7d1_cfcf422a-f1d0-4101-af9b-5049b776f061.webp?v=1782966274"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43608595464291,"title":"Gleam Rosé","option1":"Gleam Rosé","option2":null,"option3":null,"sku":"MJB013524L-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152517296227,"product_id":7863300751459,"position":13,"created_at":"2026-07-02T12:24:33+08:00","updated_at":"2026-07-02T12:24:35+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_6a4be279-c96a-4393-9c76-71c7a1a786b3.webp?v=1782966275","variant_ids":[43608595464291]},"available":true,"name":"iPhone 17 Pro Clear (MagSafe 兼容 \u0026 相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - Gleam Rosé","public_title":"Gleam Rosé","options":["Gleam Rosé"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013524L-PM14","featured_media":{"alt":null,"id":27657390784611,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6227ab46da81748c3f34baa03606f90c44af4da8_6a4be279-c96a-4393-9c76-71c7a1a786b3.webp?v=1782966275"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43608594514019,"title":"Ash Black","option1":"Ash Black","option2":null,"option3":null,"sku":"MJB013520G-PM14","requires_shipping":true,"taxable":true,"featured_image":{"id":36152516378723,"product_id":7863300751459,"position":11,"created_at":"2026-07-02T12:24:32+08:00","updated_at":"2026-07-02T12:24:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_7243bdbf-89d8-4bff-872d-4b7263c1d4f8.webp?v=1782966273","variant_ids":[43608594514019]},"available":true,"name":"iPhone 17 Pro Clear (MagSafe 兼容 \u0026 相機按鈕) NBA Logo-密爾瓦基公鹿 Milwaukee Bucks - Ash Black","public_title":"Ash Black","options":["Ash Black"],"price":148000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MJB013520G-PM14","featured_media":{"alt":null,"id":27657389867107,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b2acd9e6b42c10f38181883035dea1b6d5141753_7243bdbf-89d8-4bff-872d-4b7263c1d4f8.webp?v=1782966273"}},"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: "停產"
}