Home
›
iPhone 14 Plus SolidSuit (MagSafe 兼容) 常態系列 你好牙 我吃一點
$product = {"id":8012528844899,"title":"iPhone 14 Plus SolidSuit (MagSafe 兼容) 常態系列 你好牙 我吃一點","handle":"iphone-14-plus-solidsuit-classic-magsafe-fug20","description":null,"published_at":"2026-05-14T16:29:43+08:00","created_at":"2026-05-14T15:26:57+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-fuggler","device-iPhone 14 Plus","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":44180227620963,"title":"Neon Orange","option1":"Neon Orange","option2":null,"option3":null,"sku":"MST012610F-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814679380067,"product_id":8012528844899,"position":6,"created_at":"2026-05-14T15:27:32+08:00","updated_at":"2026-05-14T15:27:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb589276a750dde6d11dc791a93cf359f68d94f.webp?v=1778743654","variant_ids":[44180227620963]},"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-FUG20","featured_media":{"alt":null,"id":27339642142819,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb589276a750dde6d11dc791a93cf359f68d94f.webp?v=1778743654"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44180236435555,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST012610D-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814678986851,"product_id":8012528844899,"position":5,"created_at":"2026-05-14T15:27:31+08:00","updated_at":"2026-05-14T15:27:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a659257cbf608725f4b26c907a693cb2d252bf77.webp?v=1778743653","variant_ids":[44180236435555]},"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-FUG20","featured_media":{"alt":null,"id":27339641749603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a659257cbf608725f4b26c907a693cb2d252bf77.webp?v=1778743653"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44180236927075,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012610C-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814677839971,"product_id":8012528844899,"position":3,"created_at":"2026-05-14T15:27:27+08:00","updated_at":"2026-05-14T15:27:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/897dfc4bf9cb490a22b281eec07626bb71c95862.webp?v=1778743650","variant_ids":[44180236927075]},"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-FUG20","featured_media":{"alt":null,"id":27339640602723,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/897dfc4bf9cb490a22b281eec07626bb71c95862.webp?v=1778743650"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44180237418595,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"MST01261O9-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814677217379,"product_id":8012528844899,"position":2,"created_at":"2026-05-14T15:27:26+08:00","updated_at":"2026-05-14T15:27:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7fe8fe5139b0a6afc38dc47f734abe2c74b3970.webp?v=1778743648","variant_ids":[44180237418595]},"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-FUG20","featured_media":{"alt":null,"id":27339639980131,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7fe8fe5139b0a6afc38dc47f734abe2c74b3970.webp?v=1778743648"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44180238368867,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"MST0126157-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814676725859,"product_id":8012528844899,"position":1,"created_at":"2026-05-14T15:27:24+08:00","updated_at":"2026-05-14T15:27:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa2ce872460225ecc39f36989e56cabc72248da7.webp?v=1778743646","variant_ids":[44180238368867]},"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-FUG20","featured_media":{"alt":null,"id":27339639488611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa2ce872460225ecc39f36989e56cabc72248da7.webp?v=1778743646"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44180238860387,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0126152-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814678429795,"product_id":8012528844899,"position":4,"created_at":"2026-05-14T15:27:29+08:00","updated_at":"2026-05-14T15:27:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e44a0bad9ff24065d3f5f9d2fb861c5088b60d.webp?v=1778743651","variant_ids":[44180238860387]},"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-FUG20","featured_media":{"alt":null,"id":27339641159779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e44a0bad9ff24065d3f5f9d2fb861c5088b60d.webp?v=1778743651"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa2ce872460225ecc39f36989e56cabc72248da7.webp?v=1778743646","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7fe8fe5139b0a6afc38dc47f734abe2c74b3970.webp?v=1778743648","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/897dfc4bf9cb490a22b281eec07626bb71c95862.webp?v=1778743650","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e44a0bad9ff24065d3f5f9d2fb861c5088b60d.webp?v=1778743651","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a659257cbf608725f4b26c907a693cb2d252bf77.webp?v=1778743653","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb589276a750dde6d11dc791a93cf359f68d94f.webp?v=1778743654"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa2ce872460225ecc39f36989e56cabc72248da7.webp?v=1778743646","options":["color"],"media":[{"alt":null,"id":27339639488611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa2ce872460225ecc39f36989e56cabc72248da7.webp?v=1778743646"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa2ce872460225ecc39f36989e56cabc72248da7.webp?v=1778743646","width":2000},{"alt":null,"id":27339639980131,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7fe8fe5139b0a6afc38dc47f734abe2c74b3970.webp?v=1778743648"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7fe8fe5139b0a6afc38dc47f734abe2c74b3970.webp?v=1778743648","width":2000},{"alt":null,"id":27339640602723,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/897dfc4bf9cb490a22b281eec07626bb71c95862.webp?v=1778743650"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/897dfc4bf9cb490a22b281eec07626bb71c95862.webp?v=1778743650","width":2000},{"alt":null,"id":27339641159779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e44a0bad9ff24065d3f5f9d2fb861c5088b60d.webp?v=1778743651"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e44a0bad9ff24065d3f5f9d2fb861c5088b60d.webp?v=1778743651","width":2000},{"alt":null,"id":27339641749603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a659257cbf608725f4b26c907a693cb2d252bf77.webp?v=1778743653"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a659257cbf608725f4b26c907a693cb2d252bf77.webp?v=1778743653","width":2000},{"alt":null,"id":27339642142819,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb589276a750dde6d11dc791a93cf359f68d94f.webp?v=1778743654"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb589276a750dde6d11dc791a93cf359f68d94f.webp?v=1778743654","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$bumper = null;
$variants = [{"id":44180227620963,"title":"Neon Orange","option1":"Neon Orange","option2":null,"option3":null,"sku":"MST012610F-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814679380067,"product_id":8012528844899,"position":6,"created_at":"2026-05-14T15:27:32+08:00","updated_at":"2026-05-14T15:27:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb589276a750dde6d11dc791a93cf359f68d94f.webp?v=1778743654","variant_ids":[44180227620963]},"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-FUG20","featured_media":{"alt":null,"id":27339642142819,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb589276a750dde6d11dc791a93cf359f68d94f.webp?v=1778743654"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44180236435555,"title":"Bordeaux Red","option1":"Bordeaux Red","option2":null,"option3":null,"sku":"MST012610D-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814678986851,"product_id":8012528844899,"position":5,"created_at":"2026-05-14T15:27:31+08:00","updated_at":"2026-05-14T15:27:33+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a659257cbf608725f4b26c907a693cb2d252bf77.webp?v=1778743653","variant_ids":[44180236435555]},"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-FUG20","featured_media":{"alt":null,"id":27339641749603,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a659257cbf608725f4b26c907a693cb2d252bf77.webp?v=1778743653"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44180236927075,"title":"Classic Blue","option1":"Classic Blue","option2":null,"option3":null,"sku":"MST012610C-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814677839971,"product_id":8012528844899,"position":3,"created_at":"2026-05-14T15:27:27+08:00","updated_at":"2026-05-14T15:27:30+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/897dfc4bf9cb490a22b281eec07626bb71c95862.webp?v=1778743650","variant_ids":[44180236927075]},"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-FUG20","featured_media":{"alt":null,"id":27339640602723,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/897dfc4bf9cb490a22b281eec07626bb71c95862.webp?v=1778743650"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44180237418595,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"MST01261O9-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814677217379,"product_id":8012528844899,"position":2,"created_at":"2026-05-14T15:27:26+08:00","updated_at":"2026-05-14T15:27:28+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7fe8fe5139b0a6afc38dc47f734abe2c74b3970.webp?v=1778743648","variant_ids":[44180237418595]},"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-FUG20","featured_media":{"alt":null,"id":27339639980131,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e7fe8fe5139b0a6afc38dc47f734abe2c74b3970.webp?v=1778743648"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44180238368867,"title":"Blush Pink","option1":"Blush Pink","option2":null,"option3":null,"sku":"MST0126157-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814676725859,"product_id":8012528844899,"position":1,"created_at":"2026-05-14T15:27:24+08:00","updated_at":"2026-05-14T15:27:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa2ce872460225ecc39f36989e56cabc72248da7.webp?v=1778743646","variant_ids":[44180238368867]},"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-FUG20","featured_media":{"alt":null,"id":27339639488611,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/aa2ce872460225ecc39f36989e56cabc72248da7.webp?v=1778743646"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":44180238860387,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MST0126152-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814678429795,"product_id":8012528844899,"position":4,"created_at":"2026-05-14T15:27:29+08:00","updated_at":"2026-05-14T15:27:31+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e44a0bad9ff24065d3f5f9d2fb861c5088b60d.webp?v=1778743651","variant_ids":[44180238860387]},"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-FUG20","featured_media":{"alt":null,"id":27339641159779,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e44a0bad9ff24065d3f5f9d2fb861c5088b60d.webp?v=1778743651"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":44180227620963,"title":"Neon Orange","option1":"Neon Orange","option2":null,"option3":null,"sku":"MST012610F-FUG20","requires_shipping":true,"taxable":true,"featured_image":{"id":35814679380067,"product_id":8012528844899,"position":6,"created_at":"2026-05-14T15:27:32+08:00","updated_at":"2026-05-14T15:27:34+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb589276a750dde6d11dc791a93cf359f68d94f.webp?v=1778743654","variant_ids":[44180227620963]},"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-FUG20","featured_media":{"alt":null,"id":27339642142819,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8eb589276a750dde6d11dc791a93cf359f68d94f.webp?v=1778743654"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}};
$device_handle = null
var sellingStatus
if ($bumper) {
$(document).ready(function() {
var productImg = $product.images[0]
var bumperVariants = $bumper.variants;
var bumperColors = new Object();
var currentVariant = '';
var productType = '';
bumperVariants.forEach(variant => {
bumperColors[`${variant.title.split(' (')[0].toLowerCase()}`] = variant.featured_image.src;
});
if (productType === 'mod-nx-backplate' || productType === 'mod-backplate') {
mergeImages(
[productImg, bumperColors[currentVariant]],
{ crossOrigin: 'anonymous' }
).then(mergedImg => {
$('.merged-img').attr('src', mergedImg);
});
} else {
mergeImages(
[bumperColors[currentVariant], productImg],
{ crossOrigin: 'anonymous' }
).then(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: "停產"
}