Home
›
iPhone 13 mini SolidSuit Nyangsongi 野餐派對
$product = {"id":7942067159139,"title":"iPhone 13 mini SolidSuit Nyangsongi 野餐派對","handle":"iphone-13-mini-solidsuit-classic-nya05","description":null,"published_at":"2025-12-23T10:03:53+08:00","created_at":"2025-12-22T11:46:54+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-nyangsongi","device-iPhone 13 Mini","merge","reseller-nyangsongi"],"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":43903328387171,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0122852-NYA05","requires_shipping":true,"taxable":true,"featured_image":{"id":36271457796195,"product_id":7942067159139,"position":10,"created_at":"2026-07-15T14:27:07+08:00","updated_at":"2026-07-15T14:27:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a_cf398b2a-c0e4-4358-8c3d-5a7ad5284e52.webp?v=1784096829","variant_ids":[43903328387171]},"available":true,"name":"iPhone 13 mini SolidSuit Nyangsongi 野餐派對 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0122852-NYA05","featured_media":{"alt":null,"id":27775513526371,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a_cf398b2a-c0e4-4358-8c3d-5a7ad5284e52.webp?v=1784096829"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903329894499,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"SST01228Z9-NYA05","requires_shipping":true,"taxable":true,"featured_image":{"id":36271458189411,"product_id":7942067159139,"position":11,"created_at":"2026-07-15T14:27:08+08:00","updated_at":"2026-07-15T14:27:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7399969c9d9db05af306df7a1d2bbbdc29e9a09e_a1f92649-fb03-4635-b13a-e7da57f0254f.webp?v=1784096830","variant_ids":[43903329894499]},"available":true,"name":"iPhone 13 mini SolidSuit Nyangsongi 野餐派對 - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228Z9-NYA05","featured_media":{"alt":null,"id":27775513886819,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7399969c9d9db05af306df7a1d2bbbdc29e9a09e_a1f92649-fb03-4635-b13a-e7da57f0254f.webp?v=1784096830"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903330091107,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"SST01228Z8-NYA05","requires_shipping":true,"taxable":true,"featured_image":{"id":36271457337443,"product_id":7942067159139,"position":9,"created_at":"2026-07-15T14:27:06+08:00","updated_at":"2026-07-15T14:27:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68a4d2bedc811eea47eb24fe857d7672b5f520a_93505637-77b8-45ea-91d9-816e41f2f110.webp?v=1784096828","variant_ids":[43903330091107]},"available":true,"name":"iPhone 13 mini SolidSuit Nyangsongi 野餐派對 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228Z8-NYA05","featured_media":{"alt":null,"id":27775513067619,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68a4d2bedc811eea47eb24fe857d7672b5f520a_93505637-77b8-45ea-91d9-816e41f2f110.webp?v=1784096828"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903330648163,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"SST01228O8-NYA05","requires_shipping":true,"taxable":true,"featured_image":{"id":36271458582627,"product_id":7942067159139,"position":12,"created_at":"2026-07-15T14:27:08+08:00","updated_at":"2026-07-15T14:27:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb0524b8b1361da5261228155cfa68eb2668ca4c_d8970d88-9293-4fdb-9a66-f12c1bde056f.webp?v=1784096831","variant_ids":[43903330648163]},"available":true,"name":"iPhone 13 mini SolidSuit Nyangsongi 野餐派對 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228O8-NYA05","featured_media":{"alt":null,"id":27775514312803,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb0524b8b1361da5261228155cfa68eb2668ca4c_d8970d88-9293-4fdb-9a66-f12c1bde056f.webp?v=1784096831"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7399969c9d9db05af306df7a1d2bbbdc29e9a09e.webp?v=1766375243","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3565c1ab99c6c3ca83b7b99c1da320ab44ce94ff.webp?v=1766375244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3eb4606c3822042655e5f7d46d038d1372eb3b1.webp?v=1766375244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb0524b8b1361da5261228155cfa68eb2668ca4c.webp?v=1766375244","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a.webp?v=1766375245","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68a4d2bedc811eea47eb24fe857d7672b5f520a.webp?v=1766375246","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b805769441888f334ca7ee2665d4a5ef73145d9e.webp?v=1766375247","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/655a593bad2458edecd83aa2fbe12a60bfc3592f.webp?v=1766375247","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68a4d2bedc811eea47eb24fe857d7672b5f520a_93505637-77b8-45ea-91d9-816e41f2f110.webp?v=1784096828","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a_cf398b2a-c0e4-4358-8c3d-5a7ad5284e52.webp?v=1784096829","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7399969c9d9db05af306df7a1d2bbbdc29e9a09e_a1f92649-fb03-4635-b13a-e7da57f0254f.webp?v=1784096830","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb0524b8b1361da5261228155cfa68eb2668ca4c_d8970d88-9293-4fdb-9a66-f12c1bde056f.webp?v=1784096831"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7399969c9d9db05af306df7a1d2bbbdc29e9a09e.webp?v=1766375243","options":["color"],"media":[{"alt":null,"id":26547041960035,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7399969c9d9db05af306df7a1d2bbbdc29e9a09e.webp?v=1766375243"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7399969c9d9db05af306df7a1d2bbbdc29e9a09e.webp?v=1766375243","width":2000},{"alt":null,"id":26547042058339,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3565c1ab99c6c3ca83b7b99c1da320ab44ce94ff.webp?v=1766375244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3565c1ab99c6c3ca83b7b99c1da320ab44ce94ff.webp?v=1766375244","width":2000},{"alt":null,"id":26547042189411,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3eb4606c3822042655e5f7d46d038d1372eb3b1.webp?v=1766375244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f3eb4606c3822042655e5f7d46d038d1372eb3b1.webp?v=1766375244","width":2000},{"alt":null,"id":26547042386019,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb0524b8b1361da5261228155cfa68eb2668ca4c.webp?v=1766375244"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb0524b8b1361da5261228155cfa68eb2668ca4c.webp?v=1766375244","width":2000},{"alt":null,"id":26547042549859,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a.webp?v=1766375245"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a.webp?v=1766375245","width":2000},{"alt":null,"id":26547042812003,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68a4d2bedc811eea47eb24fe857d7672b5f520a.webp?v=1766375246"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68a4d2bedc811eea47eb24fe857d7672b5f520a.webp?v=1766375246","width":2000},{"alt":null,"id":26547042975843,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b805769441888f334ca7ee2665d4a5ef73145d9e.webp?v=1766375247"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b805769441888f334ca7ee2665d4a5ef73145d9e.webp?v=1766375247","width":2000},{"alt":null,"id":26547043139683,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/655a593bad2458edecd83aa2fbe12a60bfc3592f.webp?v=1766375247"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/655a593bad2458edecd83aa2fbe12a60bfc3592f.webp?v=1766375247","width":2000},{"alt":null,"id":27775513067619,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68a4d2bedc811eea47eb24fe857d7672b5f520a_93505637-77b8-45ea-91d9-816e41f2f110.webp?v=1784096828"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68a4d2bedc811eea47eb24fe857d7672b5f520a_93505637-77b8-45ea-91d9-816e41f2f110.webp?v=1784096828","width":2000},{"alt":null,"id":27775513526371,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a_cf398b2a-c0e4-4358-8c3d-5a7ad5284e52.webp?v=1784096829"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a_cf398b2a-c0e4-4358-8c3d-5a7ad5284e52.webp?v=1784096829","width":2000},{"alt":null,"id":27775513886819,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7399969c9d9db05af306df7a1d2bbbdc29e9a09e_a1f92649-fb03-4635-b13a-e7da57f0254f.webp?v=1784096830"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7399969c9d9db05af306df7a1d2bbbdc29e9a09e_a1f92649-fb03-4635-b13a-e7da57f0254f.webp?v=1784096830","width":2000},{"alt":null,"id":27775514312803,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb0524b8b1361da5261228155cfa68eb2668ca4c_d8970d88-9293-4fdb-9a66-f12c1bde056f.webp?v=1784096831"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb0524b8b1361da5261228155cfa68eb2668ca4c_d8970d88-9293-4fdb-9a66-f12c1bde056f.webp?v=1784096831","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43903328387171,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0122852-NYA05","requires_shipping":true,"taxable":true,"featured_image":{"id":36271457796195,"product_id":7942067159139,"position":10,"created_at":"2026-07-15T14:27:07+08:00","updated_at":"2026-07-15T14:27:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a_cf398b2a-c0e4-4358-8c3d-5a7ad5284e52.webp?v=1784096829","variant_ids":[43903328387171]},"available":true,"name":"iPhone 13 mini SolidSuit Nyangsongi 野餐派對 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0122852-NYA05","featured_media":{"alt":null,"id":27775513526371,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a_cf398b2a-c0e4-4358-8c3d-5a7ad5284e52.webp?v=1784096829"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903329894499,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"SST01228Z9-NYA05","requires_shipping":true,"taxable":true,"featured_image":{"id":36271458189411,"product_id":7942067159139,"position":11,"created_at":"2026-07-15T14:27:08+08:00","updated_at":"2026-07-15T14:27:10+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7399969c9d9db05af306df7a1d2bbbdc29e9a09e_a1f92649-fb03-4635-b13a-e7da57f0254f.webp?v=1784096830","variant_ids":[43903329894499]},"available":true,"name":"iPhone 13 mini SolidSuit Nyangsongi 野餐派對 - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228Z9-NYA05","featured_media":{"alt":null,"id":27775513886819,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7399969c9d9db05af306df7a1d2bbbdc29e9a09e_a1f92649-fb03-4635-b13a-e7da57f0254f.webp?v=1784096830"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903330091107,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"SST01228Z8-NYA05","requires_shipping":true,"taxable":true,"featured_image":{"id":36271457337443,"product_id":7942067159139,"position":9,"created_at":"2026-07-15T14:27:06+08:00","updated_at":"2026-07-15T14:27:08+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68a4d2bedc811eea47eb24fe857d7672b5f520a_93505637-77b8-45ea-91d9-816e41f2f110.webp?v=1784096828","variant_ids":[43903330091107]},"available":true,"name":"iPhone 13 mini SolidSuit Nyangsongi 野餐派對 - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228Z8-NYA05","featured_media":{"alt":null,"id":27775513067619,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d68a4d2bedc811eea47eb24fe857d7672b5f520a_93505637-77b8-45ea-91d9-816e41f2f110.webp?v=1784096828"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43903330648163,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"SST01228O8-NYA05","requires_shipping":true,"taxable":true,"featured_image":{"id":36271458582627,"product_id":7942067159139,"position":12,"created_at":"2026-07-15T14:27:08+08:00","updated_at":"2026-07-15T14:27:11+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb0524b8b1361da5261228155cfa68eb2668ca4c_d8970d88-9293-4fdb-9a66-f12c1bde056f.webp?v=1784096831","variant_ids":[43903330648163]},"available":true,"name":"iPhone 13 mini SolidSuit Nyangsongi 野餐派對 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01228O8-NYA05","featured_media":{"alt":null,"id":27775514312803,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/fb0524b8b1361da5261228155cfa68eb2668ca4c_d8970d88-9293-4fdb-9a66-f12c1bde056f.webp?v=1784096831"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43903328387171,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0122852-NYA05","requires_shipping":true,"taxable":true,"featured_image":{"id":36271457796195,"product_id":7942067159139,"position":10,"created_at":"2026-07-15T14:27:07+08:00","updated_at":"2026-07-15T14:27:09+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a_cf398b2a-c0e4-4358-8c3d-5a7ad5284e52.webp?v=1784096829","variant_ids":[43903328387171]},"available":true,"name":"iPhone 13 mini SolidSuit Nyangsongi 野餐派對 - Black","public_title":"Black","options":["Black"],"price":83000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0122852-NYA05","featured_media":{"alt":null,"id":27775513526371,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b967d3f99725d760a3cf34fe95076c295edc650a_cf398b2a-c0e4-4358-8c3d-5a7ad5284e52.webp?v=1784096829"}},"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: "停產"
}