Home
›
iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 史迪奇 - 經典系列-Ohana是家人
$product = {"id":7234633924707,"title":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 史迪奇 - 經典系列-Ohana是家人","handle":"iphone-13-mini-solidsuit-classic-magsafe-yf10","description":null,"published_at":"2024-03-18T11:27:34+08:00","created_at":"2024-03-18T10:44:44+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit MagSafe專區-史迪奇","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-stitch","device-iPhone 13 mini","merge","reseller-solidsuit-magsafe-stitch","Top50","type-Solidsuit MagSafe"],"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":41444272472163,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31086456471651,"product_id":7234633924707,"position":15,"created_at":"2024-03-18T10:45:20+08:00","updated_at":"2024-03-18T10:45:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b526fea6edcfc825d74dbdc8e35bc6019a92ed_a1480e3a-276f-46b6-ab83-da7a820f0dbb.webp?v=1710729920","variant_ids":[41444272472163]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 史迪奇 - 經典系列-Ohana是家人 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-YF10","featured_media":{"alt":null,"id":23467040931939,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b526fea6edcfc825d74dbdc8e35bc6019a92ed_a1480e3a-276f-46b6-ab83-da7a820f0dbb.webp?v=1710729920"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41444272799843,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31086447558755,"product_id":7234633924707,"position":7,"created_at":"2024-03-18T10:45:02+08:00","updated_at":"2024-03-18T10:45:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a614618cbc7e51a0148dd6523e567a845b342d_806b52cf-4241-4c9d-8541-fc1aaba66c66.webp?v=1710729902","variant_ids":[41444272799843]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 史迪奇 - 經典系列-Ohana是家人 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-YF10","featured_media":{"alt":null,"id":23467031953507,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a614618cbc7e51a0148dd6523e567a845b342d_806b52cf-4241-4c9d-8541-fc1aaba66c66.webp?v=1710729902"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/788d6f372f4e4b00316a4013e15068cb5de8531d_9d7e3162-b0a8-4829-9088-b00e9b68edcc.webp?v=1710729887","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d235880547da796b50cba755d74646c53bf49f73_67c9a15c-d5d7-4574-972a-1665a74fd9ca.webp?v=1710729891","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39ef94b9e2c7b7e4c4d6ed75158507205811d466_f640b001-314a-4bfd-bee9-2d8f21f70ab6.webp?v=1710729893","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/597a560c23dfb1c59eeeff0b33da37090704a12b_38ba9546-2140-4bf0-9500-2e379d4c82cb.webp?v=1710729895","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0a9c1031be82d8f69ea13f91af4d28d820c75d4_c6ee3f4c-74cd-4487-9e21-5a6af9af54dd.webp?v=1710729898","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b94fcc2877e2ff9953aaac2ae013570528651fe_4e4efd77-1fe6-4aae-983f-f3c15193cc44.webp?v=1710729900","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a614618cbc7e51a0148dd6523e567a845b342d_806b52cf-4241-4c9d-8541-fc1aaba66c66.webp?v=1710729902","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9b4273f89a249784a130ae3c16766125b5a9db2_2e5ac59f-75ee-4cdd-b3fe-cd36e3b97dfb.webp?v=1710729904","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/001bf641ec5c9c6bdb6ecd26419f9bcfa336836d_0406757f-d568-481b-b2b4-c0f0cea36f2e.webp?v=1710729907","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7353a71e16804b8c4ae6bb8318156317b235409d_7736fe8e-3284-4f62-9f54-89d776876c80.webp?v=1710729909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b09f5c42e657f085fea7f5a609bd1aa6f5a39ed_038f1b3d-8c8c-4ff7-a8ea-22cb11ad1b38.webp?v=1710729911","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7a579cced63f5bed58e397565f4300bd1631a8b_a7ae7b7c-4fe6-439b-a893-0625ed41313e.webp?v=1710729913","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d96d229e66025170caf2236c335115a013ffdc73_430e417b-8756-4fef-acf3-6a37cd85011b.webp?v=1710729916","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c0790708e88085ad66e31286cc0538b80d61826_62ef412a-14be-4181-a980-0a8760f8eb16.webp?v=1710729918","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b526fea6edcfc825d74dbdc8e35bc6019a92ed_a1480e3a-276f-46b6-ab83-da7a820f0dbb.webp?v=1710729920"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/788d6f372f4e4b00316a4013e15068cb5de8531d_9d7e3162-b0a8-4829-9088-b00e9b68edcc.webp?v=1710729887","options":["color"],"media":[{"alt":null,"id":23467023302755,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/788d6f372f4e4b00316a4013e15068cb5de8531d_9d7e3162-b0a8-4829-9088-b00e9b68edcc.webp?v=1710729887"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/788d6f372f4e4b00316a4013e15068cb5de8531d_9d7e3162-b0a8-4829-9088-b00e9b68edcc.webp?v=1710729887","width":2000},{"alt":null,"id":23467025530979,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d235880547da796b50cba755d74646c53bf49f73_67c9a15c-d5d7-4574-972a-1665a74fd9ca.webp?v=1710729891"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d235880547da796b50cba755d74646c53bf49f73_67c9a15c-d5d7-4574-972a-1665a74fd9ca.webp?v=1710729891","width":2000},{"alt":null,"id":23467026776163,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39ef94b9e2c7b7e4c4d6ed75158507205811d466_f640b001-314a-4bfd-bee9-2d8f21f70ab6.webp?v=1710729893"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/39ef94b9e2c7b7e4c4d6ed75158507205811d466_f640b001-314a-4bfd-bee9-2d8f21f70ab6.webp?v=1710729893","width":2000},{"alt":null,"id":23467028021347,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/597a560c23dfb1c59eeeff0b33da37090704a12b_38ba9546-2140-4bf0-9500-2e379d4c82cb.webp?v=1710729895"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/597a560c23dfb1c59eeeff0b33da37090704a12b_38ba9546-2140-4bf0-9500-2e379d4c82cb.webp?v=1710729895","width":2000},{"alt":null,"id":23467029397603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0a9c1031be82d8f69ea13f91af4d28d820c75d4_c6ee3f4c-74cd-4487-9e21-5a6af9af54dd.webp?v=1710729898"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f0a9c1031be82d8f69ea13f91af4d28d820c75d4_c6ee3f4c-74cd-4487-9e21-5a6af9af54dd.webp?v=1710729898","width":2000},{"alt":null,"id":23467030675555,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b94fcc2877e2ff9953aaac2ae013570528651fe_4e4efd77-1fe6-4aae-983f-f3c15193cc44.webp?v=1710729900"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6b94fcc2877e2ff9953aaac2ae013570528651fe_4e4efd77-1fe6-4aae-983f-f3c15193cc44.webp?v=1710729900","width":2000},{"alt":null,"id":23467031953507,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a614618cbc7e51a0148dd6523e567a845b342d_806b52cf-4241-4c9d-8541-fc1aaba66c66.webp?v=1710729902"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a614618cbc7e51a0148dd6523e567a845b342d_806b52cf-4241-4c9d-8541-fc1aaba66c66.webp?v=1710729902","width":2000},{"alt":null,"id":23467033067619,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9b4273f89a249784a130ae3c16766125b5a9db2_2e5ac59f-75ee-4cdd-b3fe-cd36e3b97dfb.webp?v=1710729904"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d9b4273f89a249784a130ae3c16766125b5a9db2_2e5ac59f-75ee-4cdd-b3fe-cd36e3b97dfb.webp?v=1710729904","width":2000},{"alt":null,"id":23467034280035,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/001bf641ec5c9c6bdb6ecd26419f9bcfa336836d_0406757f-d568-481b-b2b4-c0f0cea36f2e.webp?v=1710729907"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/001bf641ec5c9c6bdb6ecd26419f9bcfa336836d_0406757f-d568-481b-b2b4-c0f0cea36f2e.webp?v=1710729907","width":2000},{"alt":null,"id":23467035263075,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7353a71e16804b8c4ae6bb8318156317b235409d_7736fe8e-3284-4f62-9f54-89d776876c80.webp?v=1710729909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7353a71e16804b8c4ae6bb8318156317b235409d_7736fe8e-3284-4f62-9f54-89d776876c80.webp?v=1710729909","width":2000},{"alt":null,"id":23467036442723,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b09f5c42e657f085fea7f5a609bd1aa6f5a39ed_038f1b3d-8c8c-4ff7-a8ea-22cb11ad1b38.webp?v=1710729911"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4b09f5c42e657f085fea7f5a609bd1aa6f5a39ed_038f1b3d-8c8c-4ff7-a8ea-22cb11ad1b38.webp?v=1710729911","width":2000},{"alt":null,"id":23467037556835,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7a579cced63f5bed58e397565f4300bd1631a8b_a7ae7b7c-4fe6-439b-a893-0625ed41313e.webp?v=1710729913"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7a579cced63f5bed58e397565f4300bd1631a8b_a7ae7b7c-4fe6-439b-a893-0625ed41313e.webp?v=1710729913","width":2000},{"alt":null,"id":23467038703715,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d96d229e66025170caf2236c335115a013ffdc73_430e417b-8756-4fef-acf3-6a37cd85011b.webp?v=1710729916"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d96d229e66025170caf2236c335115a013ffdc73_430e417b-8756-4fef-acf3-6a37cd85011b.webp?v=1710729916","width":2000},{"alt":null,"id":23467039883363,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c0790708e88085ad66e31286cc0538b80d61826_62ef412a-14be-4181-a980-0a8760f8eb16.webp?v=1710729918"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9c0790708e88085ad66e31286cc0538b80d61826_62ef412a-14be-4181-a980-0a8760f8eb16.webp?v=1710729918","width":2000},{"alt":null,"id":23467040931939,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b526fea6edcfc825d74dbdc8e35bc6019a92ed_a1480e3a-276f-46b6-ab83-da7a820f0dbb.webp?v=1710729920"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b526fea6edcfc825d74dbdc8e35bc6019a92ed_a1480e3a-276f-46b6-ab83-da7a820f0dbb.webp?v=1710729920","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":41444272472163,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31086456471651,"product_id":7234633924707,"position":15,"created_at":"2024-03-18T10:45:20+08:00","updated_at":"2024-03-18T10:45:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b526fea6edcfc825d74dbdc8e35bc6019a92ed_a1480e3a-276f-46b6-ab83-da7a820f0dbb.webp?v=1710729920","variant_ids":[41444272472163]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 史迪奇 - 經典系列-Ohana是家人 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-YF10","featured_media":{"alt":null,"id":23467040931939,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b526fea6edcfc825d74dbdc8e35bc6019a92ed_a1480e3a-276f-46b6-ab83-da7a820f0dbb.webp?v=1710729920"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":41444272799843,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31086447558755,"product_id":7234633924707,"position":7,"created_at":"2024-03-18T10:45:02+08:00","updated_at":"2024-03-18T10:45:02+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a614618cbc7e51a0148dd6523e567a845b342d_806b52cf-4241-4c9d-8541-fc1aaba66c66.webp?v=1710729902","variant_ids":[41444272799843]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 史迪奇 - 經典系列-Ohana是家人 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-YF10","featured_media":{"alt":null,"id":23467031953507,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/83a614618cbc7e51a0148dd6523e567a845b342d_806b52cf-4241-4c9d-8541-fc1aaba66c66.webp?v=1710729902"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":41444272472163,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-YF10","requires_shipping":true,"taxable":true,"featured_image":{"id":31086456471651,"product_id":7234633924707,"position":15,"created_at":"2024-03-18T10:45:20+08:00","updated_at":"2024-03-18T10:45:20+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b526fea6edcfc825d74dbdc8e35bc6019a92ed_a1480e3a-276f-46b6-ab83-da7a820f0dbb.webp?v=1710729920","variant_ids":[41444272472163]},"available":true,"name":"iPhone 13 mini 犀牛盾SolidSuit (MagSafe 兼容)聯名設計款防摔背蓋手機殼 史迪奇 - 經典系列-Ohana是家人 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":1350,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-YF10","featured_media":{"alt":null,"id":23467040931939,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54b526fea6edcfc825d74dbdc8e35bc6019a92ed_a1480e3a-276f-46b6-ab83-da7a820f0dbb.webp?v=1710729920"}},"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: "停產"
}