Home
›
iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款
$product = {"id":8024690360419,"title":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款","handle":"iphone-12-mini-solidsuit-classic-magsafe-kp18","description":null,"published_at":"2026-06-01T13:50:41+08:00","created_at":"2026-06-01T09:37:56+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-kpop-demon-hunter","device-iPhone 12 Mini","merge","reseller-kpop-demon-hunter"],"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":44226608660579,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01184Z9-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912829010019,"product_id":8024690360419,"position":2,"created_at":"2026-06-01T09:38:24+08:00","updated_at":"2026-06-01T09:38:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45072e862b8b80c95a3f24bf724524cbdca57c0c.webp?v=1780277906","variant_ids":[44226608660579]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - 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":"MST01184Z9-KP18","featured_media":{"alt":null,"id":27436619399267,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45072e862b8b80c95a3f24bf724524cbdca57c0c.webp?v=1780277906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44226620129379,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST011840E-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912829206627,"product_id":8024690360419,"position":3,"created_at":"2026-06-01T09:38:25+08:00","updated_at":"2026-06-01T09:38:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29f97858cd6a7582b144edb513d78c8815f013f8.webp?v=1780277907","variant_ids":[44226620129379]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - Parakeet Green","public_title":"Parakeet Green","options":["Parakeet Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840E-KP18","featured_media":{"alt":null,"id":27436619595875,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29f97858cd6a7582b144edb513d78c8815f013f8.webp?v=1780277907"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44226620719203,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST011840D-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912830058595,"product_id":8024690360419,"position":6,"created_at":"2026-06-01T09:38:27+08:00","updated_at":"2026-06-01T09:38:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0dd2fd916a67c165ec21bad5fd309337a44033e.webp?v=1780277909","variant_ids":[44226620719203]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - Bordeaux Red","public_title":"Bordeaux Red","options":["Bordeaux Red"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840D-KP18","featured_media":{"alt":null,"id":27436620447843,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0dd2fd916a67c165ec21bad5fd309337a44033e.webp?v=1780277909"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44226620883043,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"MST011840A-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912829567075,"product_id":8024690360419,"position":4,"created_at":"2026-06-01T09:38:26+08:00","updated_at":"2026-06-01T09:38:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514f6ed66684562aab8526ff753cb762139508bf.webp?v=1780277908","variant_ids":[44226620883043]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840A-KP18","featured_media":{"alt":null,"id":27436619923555,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514f6ed66684562aab8526ff753cb762139508bf.webp?v=1780277908"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44226621145187,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01184Z8-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912829829219,"product_id":8024690360419,"position":5,"created_at":"2026-06-01T09:38:26+08:00","updated_at":"2026-06-01T09:38:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a17085697ae33e61b2bc038d904929a147f9021.webp?v=1780277909","variant_ids":[44226621145187]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - 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":"MST01184Z8-KP18","featured_media":{"alt":null,"id":27436620185699,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a17085697ae33e61b2bc038d904929a147f9021.webp?v=1780277909"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44226621440099,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0118452-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912828747875,"product_id":8024690360419,"position":1,"created_at":"2026-06-01T09:38:23+08:00","updated_at":"2026-06-01T09:38:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2c74fecf6a68807e27be6acf928d0edc96b1d1.webp?v=1780277905","variant_ids":[44226621440099]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0118452-KP18","featured_media":{"alt":null,"id":27436619104355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2c74fecf6a68807e27be6acf928d0edc96b1d1.webp?v=1780277905"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2c74fecf6a68807e27be6acf928d0edc96b1d1.webp?v=1780277905","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45072e862b8b80c95a3f24bf724524cbdca57c0c.webp?v=1780277906","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29f97858cd6a7582b144edb513d78c8815f013f8.webp?v=1780277907","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514f6ed66684562aab8526ff753cb762139508bf.webp?v=1780277908","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a17085697ae33e61b2bc038d904929a147f9021.webp?v=1780277909","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0dd2fd916a67c165ec21bad5fd309337a44033e.webp?v=1780277909"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2c74fecf6a68807e27be6acf928d0edc96b1d1.webp?v=1780277905","options":["color"],"media":[{"alt":null,"id":27436619104355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2c74fecf6a68807e27be6acf928d0edc96b1d1.webp?v=1780277905"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2c74fecf6a68807e27be6acf928d0edc96b1d1.webp?v=1780277905","width":2000},{"alt":null,"id":27436619399267,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45072e862b8b80c95a3f24bf724524cbdca57c0c.webp?v=1780277906"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45072e862b8b80c95a3f24bf724524cbdca57c0c.webp?v=1780277906","width":2000},{"alt":null,"id":27436619595875,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29f97858cd6a7582b144edb513d78c8815f013f8.webp?v=1780277907"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29f97858cd6a7582b144edb513d78c8815f013f8.webp?v=1780277907","width":2000},{"alt":null,"id":27436619923555,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514f6ed66684562aab8526ff753cb762139508bf.webp?v=1780277908"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514f6ed66684562aab8526ff753cb762139508bf.webp?v=1780277908","width":2000},{"alt":null,"id":27436620185699,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a17085697ae33e61b2bc038d904929a147f9021.webp?v=1780277909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a17085697ae33e61b2bc038d904929a147f9021.webp?v=1780277909","width":2000},{"alt":null,"id":27436620447843,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0dd2fd916a67c165ec21bad5fd309337a44033e.webp?v=1780277909"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0dd2fd916a67c165ec21bad5fd309337a44033e.webp?v=1780277909","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":44226608660579,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01184Z9-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912829010019,"product_id":8024690360419,"position":2,"created_at":"2026-06-01T09:38:24+08:00","updated_at":"2026-06-01T09:38:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45072e862b8b80c95a3f24bf724524cbdca57c0c.webp?v=1780277906","variant_ids":[44226608660579]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - 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":"MST01184Z9-KP18","featured_media":{"alt":null,"id":27436619399267,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45072e862b8b80c95a3f24bf724524cbdca57c0c.webp?v=1780277906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44226620129379,"title":"Parakeet Green","option1":"Parakeet Green","option2":null,"option3":null,"sku":"MST011840E-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912829206627,"product_id":8024690360419,"position":3,"created_at":"2026-06-01T09:38:25+08:00","updated_at":"2026-06-01T09:38:27+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29f97858cd6a7582b144edb513d78c8815f013f8.webp?v=1780277907","variant_ids":[44226620129379]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - Parakeet Green","public_title":"Parakeet Green","options":["Parakeet Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840E-KP18","featured_media":{"alt":null,"id":27436619595875,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/29f97858cd6a7582b144edb513d78c8815f013f8.webp?v=1780277907"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44226620719203,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST011840D-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912830058595,"product_id":8024690360419,"position":6,"created_at":"2026-06-01T09:38:27+08:00","updated_at":"2026-06-01T09:38:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0dd2fd916a67c165ec21bad5fd309337a44033e.webp?v=1780277909","variant_ids":[44226620719203]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - Bordeaux Red","public_title":"Bordeaux Red","options":["Bordeaux Red"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840D-KP18","featured_media":{"alt":null,"id":27436620447843,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e0dd2fd916a67c165ec21bad5fd309337a44033e.webp?v=1780277909"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44226620883043,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"MST011840A-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912829567075,"product_id":8024690360419,"position":4,"created_at":"2026-06-01T09:38:26+08:00","updated_at":"2026-06-01T09:38:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514f6ed66684562aab8526ff753cb762139508bf.webp?v=1780277908","variant_ids":[44226620883043]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST011840A-KP18","featured_media":{"alt":null,"id":27436619923555,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/514f6ed66684562aab8526ff753cb762139508bf.webp?v=1780277908"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44226621145187,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"MST01184Z8-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912829829219,"product_id":8024690360419,"position":5,"created_at":"2026-06-01T09:38:26+08:00","updated_at":"2026-06-01T09:38:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a17085697ae33e61b2bc038d904929a147f9021.webp?v=1780277909","variant_ids":[44226621145187]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - 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":"MST01184Z8-KP18","featured_media":{"alt":null,"id":27436620185699,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8a17085697ae33e61b2bc038d904929a147f9021.webp?v=1780277909"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44226621440099,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0118452-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912828747875,"product_id":8024690360419,"position":1,"created_at":"2026-06-01T09:38:23+08:00","updated_at":"2026-06-01T09:38:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2c74fecf6a68807e27be6acf928d0edc96b1d1.webp?v=1780277905","variant_ids":[44226621440099]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0118452-KP18","featured_media":{"alt":null,"id":27436619104355,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d2c74fecf6a68807e27be6acf928d0edc96b1d1.webp?v=1780277905"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":44226608660579,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"MST01184Z9-KP18","requires_shipping":true,"taxable":true,"featured_image":{"id":35912829010019,"product_id":8024690360419,"position":2,"created_at":"2026-06-01T09:38:24+08:00","updated_at":"2026-06-01T09:38:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45072e862b8b80c95a3f24bf724524cbdca57c0c.webp?v=1780277906","variant_ids":[44226608660579]},"available":true,"name":"iPhone 12 mini SolidSuit (MagSafe 兼容) KPop獵魔女團 Derpy 拼貼款 - 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":"MST01184Z9-KP18","featured_media":{"alt":null,"id":27436619399267,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/45072e862b8b80c95a3f24bf724524cbdca57c0c.webp?v=1780277906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null;
$type = "";
var sellingStatus
if ($isMerge) {
$(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: "停產"
}