Home
›
iPhone 13 mini SolidSuit (MagSafe 兼容) 常態系列 倍感牙力
$product = {"id":7940037607523,"title":"iPhone 13 mini SolidSuit (MagSafe 兼容) 常態系列 倍感牙力","handle":"iphone-13-mini-solidsuit-classic-magsafe-fug02","description":null,"published_at":"2025-12-19T14:09:11+08:00","created_at":"2025-12-17T11:43:02+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-fuggler","device-iPhone 13 Mini","merge","reseller-fuggler"],"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":43894971891811,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01228Z9-FUG02","requires_shipping":true,"taxable":true,"featured_image":{"id":35673327566947,"product_id":7940037607523,"position":10,"created_at":"2026-04-20T09:44:06+08:00","updated_at":"2026-04-20T09:44:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c_2cc53419-ee97-47a9-9535-d93d373865c6.webp?v=1776649448","variant_ids":[43894971891811]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 常態系列 倍感牙力 - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z9-FUG02","featured_media":{"alt":null,"id":27200598736995,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c_2cc53419-ee97-47a9-9535-d93d373865c6.webp?v=1776649448"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43894971924579,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-FUG02","requires_shipping":true,"taxable":true,"featured_image":{"id":35673328386147,"product_id":7940037607523,"position":13,"created_at":"2026-04-20T09:44:07+08:00","updated_at":"2026-04-20T09:44:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210f59ab5bdef21ab84657c6c3c383eb04a8d24d_32515089-a597-40df-9366-554a22b318df.webp?v=1776649449","variant_ids":[43894971924579]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 常態系列 倍感牙力 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-FUG02","featured_media":{"alt":null,"id":27200599556195,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210f59ab5bdef21ab84657c6c3c383eb04a8d24d_32515089-a597-40df-9366-554a22b318df.webp?v=1776649449"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43894972022883,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-FUG02","requires_shipping":true,"taxable":true,"featured_image":{"id":35673328124003,"product_id":7940037607523,"position":12,"created_at":"2026-04-20T09:44:07+08:00","updated_at":"2026-04-20T09:44:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45e58c4796a0ab8bd3951f69a5e7ab95f541dfa_83ca010c-878a-4858-b124-fadfb4c84288.webp?v=1776649449","variant_ids":[43894972022883]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 常態系列 倍感牙力 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-FUG02","featured_media":{"alt":null,"id":27200599294051,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45e58c4796a0ab8bd3951f69a5e7ab95f541dfa_83ca010c-878a-4858-b124-fadfb4c84288.webp?v=1776649449"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c.webp?v=1765943015","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56ad842f6289c4da493fab7dfd40e1c6b1d3a850.webp?v=1765943016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e084971cf3ef86978eee53e72852c252da11fa1a.webp?v=1765943016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d16b3aa5900dc20c4619bc8610d4b646bb265974.webp?v=1765943017","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b771a52a6e9bb246634911a61c5ded58fbc724a.webp?v=1765943018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210f59ab5bdef21ab84657c6c3c383eb04a8d24d.webp?v=1765943018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/581ffec01480d18cfd93a2204263c03961eb9a45.webp?v=1765943019","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45e58c4796a0ab8bd3951f69a5e7ab95f541dfa.webp?v=1765943019","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e084971cf3ef86978eee53e72852c252da11fa1a_6d0fb37b-9172-428e-bd55-0de6d64f1885.webp?v=1776649447","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c_2cc53419-ee97-47a9-9535-d93d373865c6.webp?v=1776649448","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/581ffec01480d18cfd93a2204263c03961eb9a45_759a8563-597f-404a-af10-c5e227bced41.webp?v=1776649448","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45e58c4796a0ab8bd3951f69a5e7ab95f541dfa_83ca010c-878a-4858-b124-fadfb4c84288.webp?v=1776649449","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210f59ab5bdef21ab84657c6c3c383eb04a8d24d_32515089-a597-40df-9366-554a22b318df.webp?v=1776649449","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b771a52a6e9bb246634911a61c5ded58fbc724a_07df9900-f8cb-43f5-abf3-065f739e536d.webp?v=1776649450","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56ad842f6289c4da493fab7dfd40e1c6b1d3a850_bd9ed379-3708-4831-af71-3ecf4811d3ef.webp?v=1776649450"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c.webp?v=1765943015","options":["color"],"media":[{"alt":null,"id":26522044989539,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c.webp?v=1765943015"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c.webp?v=1765943015","width":2000},{"alt":null,"id":26522045055075,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56ad842f6289c4da493fab7dfd40e1c6b1d3a850.webp?v=1765943016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56ad842f6289c4da493fab7dfd40e1c6b1d3a850.webp?v=1765943016","width":2000},{"alt":null,"id":26522045087843,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e084971cf3ef86978eee53e72852c252da11fa1a.webp?v=1765943016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e084971cf3ef86978eee53e72852c252da11fa1a.webp?v=1765943016","width":2000},{"alt":null,"id":26522045153379,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d16b3aa5900dc20c4619bc8610d4b646bb265974.webp?v=1765943017"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d16b3aa5900dc20c4619bc8610d4b646bb265974.webp?v=1765943017","width":2000},{"alt":null,"id":26522045186147,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b771a52a6e9bb246634911a61c5ded58fbc724a.webp?v=1765943018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b771a52a6e9bb246634911a61c5ded58fbc724a.webp?v=1765943018","width":2000},{"alt":null,"id":26522045218915,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210f59ab5bdef21ab84657c6c3c383eb04a8d24d.webp?v=1765943018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210f59ab5bdef21ab84657c6c3c383eb04a8d24d.webp?v=1765943018","width":2000},{"alt":null,"id":26522045284451,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/581ffec01480d18cfd93a2204263c03961eb9a45.webp?v=1765943019"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/581ffec01480d18cfd93a2204263c03961eb9a45.webp?v=1765943019","width":2000},{"alt":null,"id":26522045349987,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45e58c4796a0ab8bd3951f69a5e7ab95f541dfa.webp?v=1765943019"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45e58c4796a0ab8bd3951f69a5e7ab95f541dfa.webp?v=1765943019","width":2000},{"alt":null,"id":27200598311011,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e084971cf3ef86978eee53e72852c252da11fa1a_6d0fb37b-9172-428e-bd55-0de6d64f1885.webp?v=1776649447"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e084971cf3ef86978eee53e72852c252da11fa1a_6d0fb37b-9172-428e-bd55-0de6d64f1885.webp?v=1776649447","width":2000},{"alt":null,"id":27200598736995,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c_2cc53419-ee97-47a9-9535-d93d373865c6.webp?v=1776649448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c_2cc53419-ee97-47a9-9535-d93d373865c6.webp?v=1776649448","width":2000},{"alt":null,"id":27200599064675,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/581ffec01480d18cfd93a2204263c03961eb9a45_759a8563-597f-404a-af10-c5e227bced41.webp?v=1776649448"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/581ffec01480d18cfd93a2204263c03961eb9a45_759a8563-597f-404a-af10-c5e227bced41.webp?v=1776649448","width":2000},{"alt":null,"id":27200599294051,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45e58c4796a0ab8bd3951f69a5e7ab95f541dfa_83ca010c-878a-4858-b124-fadfb4c84288.webp?v=1776649449"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45e58c4796a0ab8bd3951f69a5e7ab95f541dfa_83ca010c-878a-4858-b124-fadfb4c84288.webp?v=1776649449","width":2000},{"alt":null,"id":27200599556195,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210f59ab5bdef21ab84657c6c3c383eb04a8d24d_32515089-a597-40df-9366-554a22b318df.webp?v=1776649449"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210f59ab5bdef21ab84657c6c3c383eb04a8d24d_32515089-a597-40df-9366-554a22b318df.webp?v=1776649449","width":2000},{"alt":null,"id":27200599752803,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b771a52a6e9bb246634911a61c5ded58fbc724a_07df9900-f8cb-43f5-abf3-065f739e536d.webp?v=1776649450"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9b771a52a6e9bb246634911a61c5ded58fbc724a_07df9900-f8cb-43f5-abf3-065f739e536d.webp?v=1776649450","width":2000},{"alt":null,"id":27200599916643,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56ad842f6289c4da493fab7dfd40e1c6b1d3a850_bd9ed379-3708-4831-af71-3ecf4811d3ef.webp?v=1776649450"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/56ad842f6289c4da493fab7dfd40e1c6b1d3a850_bd9ed379-3708-4831-af71-3ecf4811d3ef.webp?v=1776649450","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43894971891811,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01228Z9-FUG02","requires_shipping":true,"taxable":true,"featured_image":{"id":35673327566947,"product_id":7940037607523,"position":10,"created_at":"2026-04-20T09:44:06+08:00","updated_at":"2026-04-20T09:44:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c_2cc53419-ee97-47a9-9535-d93d373865c6.webp?v=1776649448","variant_ids":[43894971891811]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 常態系列 倍感牙力 - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z9-FUG02","featured_media":{"alt":null,"id":27200598736995,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c_2cc53419-ee97-47a9-9535-d93d373865c6.webp?v=1776649448"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43894971924579,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01228Z8-FUG02","requires_shipping":true,"taxable":true,"featured_image":{"id":35673328386147,"product_id":7940037607523,"position":13,"created_at":"2026-04-20T09:44:07+08:00","updated_at":"2026-04-20T09:44:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210f59ab5bdef21ab84657c6c3c383eb04a8d24d_32515089-a597-40df-9366-554a22b318df.webp?v=1776649449","variant_ids":[43894971924579]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 常態系列 倍感牙力 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z8-FUG02","featured_media":{"alt":null,"id":27200599556195,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/210f59ab5bdef21ab84657c6c3c383eb04a8d24d_32515089-a597-40df-9366-554a22b318df.webp?v=1776649449"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43894972022883,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0122852-FUG02","requires_shipping":true,"taxable":true,"featured_image":{"id":35673328124003,"product_id":7940037607523,"position":12,"created_at":"2026-04-20T09:44:07+08:00","updated_at":"2026-04-20T09:44:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45e58c4796a0ab8bd3951f69a5e7ab95f541dfa_83ca010c-878a-4858-b124-fadfb4c84288.webp?v=1776649449","variant_ids":[43894972022883]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 常態系列 倍感牙力 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0122852-FUG02","featured_media":{"alt":null,"id":27200599294051,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45e58c4796a0ab8bd3951f69a5e7ab95f541dfa_83ca010c-878a-4858-b124-fadfb4c84288.webp?v=1776649449"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43894971891811,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01228Z9-FUG02","requires_shipping":true,"taxable":true,"featured_image":{"id":35673327566947,"product_id":7940037607523,"position":10,"created_at":"2026-04-20T09:44:06+08:00","updated_at":"2026-04-20T09:44:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c_2cc53419-ee97-47a9-9535-d93d373865c6.webp?v=1776649448","variant_ids":[43894971891811]},"available":true,"name":"iPhone 13 mini SolidSuit (MagSafe 兼容) 常態系列 倍感牙力 - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01228Z9-FUG02","featured_media":{"alt":null,"id":27200598736995,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9eba0a62fdf13a7778a33147e067be04b7d3c54c_2cc53419-ee97-47a9-9535-d93d373865c6.webp?v=1776649448"}},"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: "停產"
}