Home
›
iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶
$product = {"id":8035831808099,"title":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶","handle":"iphone-14-plus-solidsuit-classic-magsafe-rx06","description":null,"published_at":"2026-06-22T16:25:16+08:00","created_at":"2026-06-17T17:50:03+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-sanrio-family","device-iPhone 14 Plus","merge","reseller-sanrio-family"],"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":44265350758499,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012610C-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012268060771,"product_id":8035831808099,"position":6,"created_at":"2026-06-17T17:50:30+08:00","updated_at":"2026-06-17T17:50:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78dbfc26866b55b77796b7e0e60d43ce3a6a3c9a.webp?v=1781689832","variant_ids":[44265350758499]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶 - Classic Blue","public_title":"Classic Blue","options":["Classic Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012610C-RX06","featured_media":{"alt":null,"id":27531072307299,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78dbfc26866b55b77796b7e0e60d43ce3a6a3c9a.webp?v=1781689832"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44265356951651,"title":"Neon Orange","option1":"Neon Orange","option2":null,"option3":null,"sku":"MST012610F-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012267733091,"product_id":8035831808099,"position":5,"created_at":"2026-06-17T17:50:29+08:00","updated_at":"2026-06-17T17:50:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6504613588a590ccf37b8ce746dc7f0303af8e1d.webp?v=1781689831","variant_ids":[44265356951651]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶 - Neon Orange","public_title":"Neon Orange","options":["Neon Orange"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012610F-RX06","featured_media":{"alt":null,"id":27531071979619,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6504613588a590ccf37b8ce746dc7f0303af8e1d.webp?v=1781689831"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44265357312099,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST012610D-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012266815587,"product_id":8035831808099,"position":3,"created_at":"2026-06-17T17:50:28+08:00","updated_at":"2026-06-17T17:50:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/642804e3144502ec41b2bc869a517bf8e3e722dc.webp?v=1781689830","variant_ids":[44265357312099]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶 - 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":"MST012610D-RX06","featured_media":{"alt":null,"id":27531071094883,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/642804e3144502ec41b2bc869a517bf8e3e722dc.webp?v=1781689830"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44265357705315,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"MST01261O9-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012267307107,"product_id":8035831808099,"position":4,"created_at":"2026-06-17T17:50:28+08:00","updated_at":"2026-06-17T17:50:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92c4a92e1d82fd1ba073acd47023f58a67f83e7a.webp?v=1781689830","variant_ids":[44265357705315]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01261O9-RX06","featured_media":{"alt":null,"id":27531071619171,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92c4a92e1d82fd1ba073acd47023f58a67f83e7a.webp?v=1781689830"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44265357967459,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"MST0126157-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012266389603,"product_id":8035831808099,"position":2,"created_at":"2026-06-17T17:50:27+08:00","updated_at":"2026-06-17T17:50:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01142d669d5d83c54947643c37b2003a8c54190.webp?v=1781689829","variant_ids":[44265357967459]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0126157-RX06","featured_media":{"alt":null,"id":27531070636131,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01142d669d5d83c54947643c37b2003a8c54190.webp?v=1781689829"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44265358327907,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0126152-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012265865315,"product_id":8035831808099,"position":1,"created_at":"2026-06-17T17:50:27+08:00","updated_at":"2026-06-17T17:50:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60364945c931be25779cc7a50eea715f1860e692.webp?v=1781689829","variant_ids":[44265358327907]},"available":true,"name":"iPhone 14 Plus 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":"MST0126152-RX06","featured_media":{"alt":null,"id":27531070111843,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60364945c931be25779cc7a50eea715f1860e692.webp?v=1781689829"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60364945c931be25779cc7a50eea715f1860e692.webp?v=1781689829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01142d669d5d83c54947643c37b2003a8c54190.webp?v=1781689829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/642804e3144502ec41b2bc869a517bf8e3e722dc.webp?v=1781689830","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92c4a92e1d82fd1ba073acd47023f58a67f83e7a.webp?v=1781689830","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6504613588a590ccf37b8ce746dc7f0303af8e1d.webp?v=1781689831","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78dbfc26866b55b77796b7e0e60d43ce3a6a3c9a.webp?v=1781689832"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60364945c931be25779cc7a50eea715f1860e692.webp?v=1781689829","options":["color"],"media":[{"alt":null,"id":27531070111843,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60364945c931be25779cc7a50eea715f1860e692.webp?v=1781689829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60364945c931be25779cc7a50eea715f1860e692.webp?v=1781689829","width":2000},{"alt":null,"id":27531070636131,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01142d669d5d83c54947643c37b2003a8c54190.webp?v=1781689829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01142d669d5d83c54947643c37b2003a8c54190.webp?v=1781689829","width":2000},{"alt":null,"id":27531071094883,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/642804e3144502ec41b2bc869a517bf8e3e722dc.webp?v=1781689830"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/642804e3144502ec41b2bc869a517bf8e3e722dc.webp?v=1781689830","width":2000},{"alt":null,"id":27531071619171,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92c4a92e1d82fd1ba073acd47023f58a67f83e7a.webp?v=1781689830"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92c4a92e1d82fd1ba073acd47023f58a67f83e7a.webp?v=1781689830","width":2000},{"alt":null,"id":27531071979619,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6504613588a590ccf37b8ce746dc7f0303af8e1d.webp?v=1781689831"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6504613588a590ccf37b8ce746dc7f0303af8e1d.webp?v=1781689831","width":2000},{"alt":null,"id":27531072307299,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78dbfc26866b55b77796b7e0e60d43ce3a6a3c9a.webp?v=1781689832"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78dbfc26866b55b77796b7e0e60d43ce3a6a3c9a.webp?v=1781689832","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":44265350758499,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012610C-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012268060771,"product_id":8035831808099,"position":6,"created_at":"2026-06-17T17:50:30+08:00","updated_at":"2026-06-17T17:50:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78dbfc26866b55b77796b7e0e60d43ce3a6a3c9a.webp?v=1781689832","variant_ids":[44265350758499]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶 - Classic Blue","public_title":"Classic Blue","options":["Classic Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012610C-RX06","featured_media":{"alt":null,"id":27531072307299,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78dbfc26866b55b77796b7e0e60d43ce3a6a3c9a.webp?v=1781689832"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44265356951651,"title":"Neon Orange","option1":"Neon Orange","option2":null,"option3":null,"sku":"MST012610F-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012267733091,"product_id":8035831808099,"position":5,"created_at":"2026-06-17T17:50:29+08:00","updated_at":"2026-06-17T17:50:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6504613588a590ccf37b8ce746dc7f0303af8e1d.webp?v=1781689831","variant_ids":[44265356951651]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶 - Neon Orange","public_title":"Neon Orange","options":["Neon Orange"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012610F-RX06","featured_media":{"alt":null,"id":27531071979619,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6504613588a590ccf37b8ce746dc7f0303af8e1d.webp?v=1781689831"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44265357312099,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST012610D-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012266815587,"product_id":8035831808099,"position":3,"created_at":"2026-06-17T17:50:28+08:00","updated_at":"2026-06-17T17:50:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/642804e3144502ec41b2bc869a517bf8e3e722dc.webp?v=1781689830","variant_ids":[44265357312099]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶 - 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":"MST012610D-RX06","featured_media":{"alt":null,"id":27531071094883,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/642804e3144502ec41b2bc869a517bf8e3e722dc.webp?v=1781689830"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44265357705315,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"MST01261O9-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012267307107,"product_id":8035831808099,"position":4,"created_at":"2026-06-17T17:50:28+08:00","updated_at":"2026-06-17T17:50:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92c4a92e1d82fd1ba073acd47023f58a67f83e7a.webp?v=1781689830","variant_ids":[44265357705315]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST01261O9-RX06","featured_media":{"alt":null,"id":27531071619171,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/92c4a92e1d82fd1ba073acd47023f58a67f83e7a.webp?v=1781689830"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44265357967459,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"MST0126157-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012266389603,"product_id":8035831808099,"position":2,"created_at":"2026-06-17T17:50:27+08:00","updated_at":"2026-06-17T17:50:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01142d669d5d83c54947643c37b2003a8c54190.webp?v=1781689829","variant_ids":[44265357967459]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶 - Blush Pink","public_title":"Blush Pink","options":["Blush Pink"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST0126157-RX06","featured_media":{"alt":null,"id":27531070636131,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d01142d669d5d83c54947643c37b2003a8c54190.webp?v=1781689829"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44265358327907,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0126152-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012265865315,"product_id":8035831808099,"position":1,"created_at":"2026-06-17T17:50:27+08:00","updated_at":"2026-06-17T17:50:29+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60364945c931be25779cc7a50eea715f1860e692.webp?v=1781689829","variant_ids":[44265358327907]},"available":true,"name":"iPhone 14 Plus 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":"MST0126152-RX06","featured_media":{"alt":null,"id":27531070111843,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/60364945c931be25779cc7a50eea715f1860e692.webp?v=1781689829"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":44265350758499,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012610C-RX06","requires_shipping":true,"taxable":true,"featured_image":{"id":36012268060771,"product_id":8035831808099,"position":6,"created_at":"2026-06-17T17:50:30+08:00","updated_at":"2026-06-17T17:50:32+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78dbfc26866b55b77796b7e0e60d43ce3a6a3c9a.webp?v=1781689832","variant_ids":[44265350758499]},"available":true,"name":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 蜜糖邦尼 咖啡廳下午茶 - Classic Blue","public_title":"Classic Blue","options":["Classic Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MST012610C-RX06","featured_media":{"alt":null,"id":27531072307299,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78dbfc26866b55b77796b7e0e60d43ce3a6a3c9a.webp?v=1781689832"}},"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: "停產"
}