Home
›
iPhone 12 mini SolidSuit 右手超人 花園
$product = {"id":7944284930147,"title":"iPhone 12 mini SolidSuit 右手超人 花園","handle":"iphone-12-mini-solidsuit-classic-yoh06","description":null,"published_at":"2025-12-24T10:22:02+08:00","created_at":"2025-12-23T16:48:31+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-yohand","device-iPhone 12 Mini","merge","reseller-yohand"],"price":83000,"price_min":83000,"price_max":83000,"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":43907903225955,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-YOH06","requires_shipping":true,"taxable":true,"featured_image":{"id":36271291334755,"product_id":7944284930147,"position":13,"created_at":"2026-07-15T14:20:23+08:00","updated_at":"2026-07-15T14:20:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744_23f19596-80df-4a7b-ba09-8d700e745988.webp?v=1784096425","variant_ids":[43907903225955]},"available":true,"name":"iPhone 12 mini SolidSuit 右手超人 花園 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-YOH06","featured_media":{"alt":null,"id":27775346901091,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744_23f19596-80df-4a7b-ba09-8d700e745988.webp?v=1784096425"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43907904929891,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-YOH06","requires_shipping":true,"taxable":true,"featured_image":{"id":36271288975459,"product_id":7944284930147,"position":10,"created_at":"2026-07-15T14:20:21+08:00","updated_at":"2026-07-15T14:20:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd11a1638b0131b382eadd08d18349801b67b64_a02e1a1b-14e0-4d2e-a89b-4daa39678518.webp?v=1784096423","variant_ids":[43907904929891]},"available":true,"name":"iPhone 12 mini SolidSuit 右手超人 花園 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-YOH06","featured_media":{"alt":null,"id":27775344738403,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd11a1638b0131b382eadd08d18349801b67b64_a02e1a1b-14e0-4d2e-a89b-4daa39678518.webp?v=1784096423"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43907905552483,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-YOH06","requires_shipping":true,"taxable":true,"featured_image":{"id":36271293202531,"product_id":7944284930147,"position":15,"created_at":"2026-07-15T14:20:24+08:00","updated_at":"2026-07-15T14:20:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6762e8537a4f4546adaf277f79ef73b002628047_1c99cd7f-f4f8-4b30-b558-22dd6228870b.webp?v=1784096426","variant_ids":[43907905552483]},"available":true,"name":"iPhone 12 mini SolidSuit 右手超人 花園 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-YOH06","featured_media":{"alt":null,"id":27775348932707,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6762e8537a4f4546adaf277f79ef73b002628047_1c99cd7f-f4f8-4b30-b558-22dd6228870b.webp?v=1784096426"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1ea7eb896a8470e612a2b622d721822d5c172c.webp?v=1766479741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5468e2ecf7b932761f673173ddcc3db9eb6af10.webp?v=1766479742","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78e5bc920eaf8595a3d863356cd5ed0e2f5220b0.webp?v=1766479743","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6762e8537a4f4546adaf277f79ef73b002628047.webp?v=1766479743","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744.webp?v=1766479744","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/507187499216f546024dfdb18f092b34f80bebfc.webp?v=1766479744","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e0a2cb4087490c1e937ee86e501a447fd4cd6c.webp?v=1766479745","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd11a1638b0131b382eadd08d18349801b67b64.webp?v=1766479746","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b4b72948b8c6d8ca916afb5823063ceffea1086.webp?v=1766479747","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd11a1638b0131b382eadd08d18349801b67b64_a02e1a1b-14e0-4d2e-a89b-4daa39678518.webp?v=1784096423","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e0a2cb4087490c1e937ee86e501a447fd4cd6c_45e09134-68a7-40e0-bf93-2a6b178902a4.webp?v=1784096423","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78e5bc920eaf8595a3d863356cd5ed0e2f5220b0_4e95dc53-405f-45d5-9d14-7d5c7334a4a2.webp?v=1784096424","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744_23f19596-80df-4a7b-ba09-8d700e745988.webp?v=1784096425","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b4b72948b8c6d8ca916afb5823063ceffea1086_335a9e4d-40a9-427f-a43c-01ee634c6f28.webp?v=1784096425","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6762e8537a4f4546adaf277f79ef73b002628047_1c99cd7f-f4f8-4b30-b558-22dd6228870b.webp?v=1784096426"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1ea7eb896a8470e612a2b622d721822d5c172c.webp?v=1766479741","options":["color"],"media":[{"alt":null,"id":26563154182243,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1ea7eb896a8470e612a2b622d721822d5c172c.webp?v=1766479741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b1ea7eb896a8470e612a2b622d721822d5c172c.webp?v=1766479741","width":2000},{"alt":null,"id":26563154608227,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5468e2ecf7b932761f673173ddcc3db9eb6af10.webp?v=1766479742"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5468e2ecf7b932761f673173ddcc3db9eb6af10.webp?v=1766479742","width":2000},{"alt":null,"id":26563155460195,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78e5bc920eaf8595a3d863356cd5ed0e2f5220b0.webp?v=1766479743"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78e5bc920eaf8595a3d863356cd5ed0e2f5220b0.webp?v=1766479743","width":2000},{"alt":null,"id":26563156017251,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6762e8537a4f4546adaf277f79ef73b002628047.webp?v=1766479743"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6762e8537a4f4546adaf277f79ef73b002628047.webp?v=1766479743","width":2000},{"alt":null,"id":26563156705379,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744.webp?v=1766479744"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744.webp?v=1766479744","width":2000},{"alt":null,"id":26563157262435,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/507187499216f546024dfdb18f092b34f80bebfc.webp?v=1766479744"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/507187499216f546024dfdb18f092b34f80bebfc.webp?v=1766479744","width":2000},{"alt":null,"id":26563157950563,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e0a2cb4087490c1e937ee86e501a447fd4cd6c.webp?v=1766479745"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e0a2cb4087490c1e937ee86e501a447fd4cd6c.webp?v=1766479745","width":2000},{"alt":null,"id":26563158507619,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd11a1638b0131b382eadd08d18349801b67b64.webp?v=1766479746"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd11a1638b0131b382eadd08d18349801b67b64.webp?v=1766479746","width":2000},{"alt":null,"id":26563158900835,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b4b72948b8c6d8ca916afb5823063ceffea1086.webp?v=1766479747"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b4b72948b8c6d8ca916afb5823063ceffea1086.webp?v=1766479747","width":2000},{"alt":null,"id":27775344738403,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd11a1638b0131b382eadd08d18349801b67b64_a02e1a1b-14e0-4d2e-a89b-4daa39678518.webp?v=1784096423"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd11a1638b0131b382eadd08d18349801b67b64_a02e1a1b-14e0-4d2e-a89b-4daa39678518.webp?v=1784096423","width":2000},{"alt":null,"id":27775345328227,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e0a2cb4087490c1e937ee86e501a447fd4cd6c_45e09134-68a7-40e0-bf93-2a6b178902a4.webp?v=1784096423"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/22e0a2cb4087490c1e937ee86e501a447fd4cd6c_45e09134-68a7-40e0-bf93-2a6b178902a4.webp?v=1784096423","width":2000},{"alt":null,"id":27775346180195,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78e5bc920eaf8595a3d863356cd5ed0e2f5220b0_4e95dc53-405f-45d5-9d14-7d5c7334a4a2.webp?v=1784096424"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/78e5bc920eaf8595a3d863356cd5ed0e2f5220b0_4e95dc53-405f-45d5-9d14-7d5c7334a4a2.webp?v=1784096424","width":2000},{"alt":null,"id":27775346901091,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744_23f19596-80df-4a7b-ba09-8d700e745988.webp?v=1784096425"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744_23f19596-80df-4a7b-ba09-8d700e745988.webp?v=1784096425","width":2000},{"alt":null,"id":27775347687523,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b4b72948b8c6d8ca916afb5823063ceffea1086_335a9e4d-40a9-427f-a43c-01ee634c6f28.webp?v=1784096425"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3b4b72948b8c6d8ca916afb5823063ceffea1086_335a9e4d-40a9-427f-a43c-01ee634c6f28.webp?v=1784096425","width":2000},{"alt":null,"id":27775348932707,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6762e8537a4f4546adaf277f79ef73b002628047_1c99cd7f-f4f8-4b30-b558-22dd6228870b.webp?v=1784096426"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6762e8537a4f4546adaf277f79ef73b002628047_1c99cd7f-f4f8-4b30-b558-22dd6228870b.webp?v=1784096426","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43907903225955,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-YOH06","requires_shipping":true,"taxable":true,"featured_image":{"id":36271291334755,"product_id":7944284930147,"position":13,"created_at":"2026-07-15T14:20:23+08:00","updated_at":"2026-07-15T14:20:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744_23f19596-80df-4a7b-ba09-8d700e745988.webp?v=1784096425","variant_ids":[43907903225955]},"available":true,"name":"iPhone 12 mini SolidSuit 右手超人 花園 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-YOH06","featured_media":{"alt":null,"id":27775346901091,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744_23f19596-80df-4a7b-ba09-8d700e745988.webp?v=1784096425"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43907904929891,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-YOH06","requires_shipping":true,"taxable":true,"featured_image":{"id":36271288975459,"product_id":7944284930147,"position":10,"created_at":"2026-07-15T14:20:21+08:00","updated_at":"2026-07-15T14:20:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd11a1638b0131b382eadd08d18349801b67b64_a02e1a1b-14e0-4d2e-a89b-4daa39678518.webp?v=1784096423","variant_ids":[43907904929891]},"available":true,"name":"iPhone 12 mini SolidSuit 右手超人 花園 - Cobalt Blue","public_title":"Cobalt Blue","options":["Cobalt Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01184O9-YOH06","featured_media":{"alt":null,"id":27775344738403,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fbd11a1638b0131b382eadd08d18349801b67b64_a02e1a1b-14e0-4d2e-a89b-4daa39678518.webp?v=1784096423"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43907905552483,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-YOH06","requires_shipping":true,"taxable":true,"featured_image":{"id":36271293202531,"product_id":7944284930147,"position":15,"created_at":"2026-07-15T14:20:24+08:00","updated_at":"2026-07-15T14:20:26+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6762e8537a4f4546adaf277f79ef73b002628047_1c99cd7f-f4f8-4b30-b558-22dd6228870b.webp?v=1784096426","variant_ids":[43907905552483]},"available":true,"name":"iPhone 12 mini SolidSuit 右手超人 花園 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0118452-YOH06","featured_media":{"alt":null,"id":27775348932707,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6762e8537a4f4546adaf277f79ef73b002628047_1c99cd7f-f4f8-4b30-b558-22dd6228870b.webp?v=1784096426"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43907903225955,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-YOH06","requires_shipping":true,"taxable":true,"featured_image":{"id":36271291334755,"product_id":7944284930147,"position":13,"created_at":"2026-07-15T14:20:23+08:00","updated_at":"2026-07-15T14:20:25+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744_23f19596-80df-4a7b-ba09-8d700e745988.webp?v=1784096425","variant_ids":[43907903225955]},"available":true,"name":"iPhone 12 mini SolidSuit 右手超人 花園 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST011840B-YOH06","featured_media":{"alt":null,"id":27775346901091,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/06b5c33aa5dfdb60ddde08b3bdd4c370aa348744_23f19596-80df-4a7b-ba09-8d700e745988.webp?v=1784096425"}},"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: "停產"
}