Home
›
iPhone 12 mini SolidSuit PosterLad 樹林
$product = {"id":7911161528419,"title":"iPhone 12 mini SolidSuit PosterLad 樹林","handle":"iphone-12-mini-solidsuit-classic-pos10","description":null,"published_at":"2025-11-05T10:54:41+08:00","created_at":"2025-11-04T10:24:54+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-posterlad","device-iPhone 12 Mini","merge","reseller-posterlad"],"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":43811816931427,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-POS10","requires_shipping":true,"taxable":true,"featured_image":{"id":36403567722595,"product_id":7911161528419,"position":14,"created_at":"2026-07-27T16:37:12+08:00","updated_at":"2026-07-27T16:37:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7_6771f9ba-19e9-48d2-a3c9-8bc41510e92a.webp?v=1785141435","variant_ids":[43811816931427]},"available":true,"name":"iPhone 12 mini SolidSuit PosterLad 樹林 - 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-POS10","featured_media":{"alt":null,"id":27907175743587,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7_6771f9ba-19e9-48d2-a3c9-8bc41510e92a.webp?v=1785141435"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43811816996963,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-POS10","requires_shipping":true,"taxable":true,"featured_image":{"id":36403565592675,"product_id":7911161528419,"position":11,"created_at":"2026-07-27T16:37:06+08:00","updated_at":"2026-07-27T16:37:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfd7c501eca7adac0b278703b4bf04650af7b1ab_4bcdec77-f520-4f4c-9215-0b2a3c5fdb92.webp?v=1785141427","variant_ids":[43811816996963]},"available":true,"name":"iPhone 12 mini SolidSuit PosterLad 樹林 - 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-POS10","featured_media":{"alt":null,"id":27907173613667,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfd7c501eca7adac0b278703b4bf04650af7b1ab_4bcdec77-f520-4f4c-9215-0b2a3c5fdb92.webp?v=1785141427"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43811817095267,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-POS10","requires_shipping":true,"taxable":true,"featured_image":{"id":36403568017507,"product_id":7911161528419,"position":15,"created_at":"2026-07-27T16:37:15+08:00","updated_at":"2026-07-27T16:37:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dc7415e185a72e15bc048f536c1013f9bfc23d0_e29c1ba3-3ce5-4ae7-ad81-295b210c4a5b.webp?v=1785141437","variant_ids":[43811817095267]},"available":true,"name":"iPhone 12 mini SolidSuit PosterLad 樹林 - 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-POS10","featured_media":{"alt":null,"id":27907176104035,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dc7415e185a72e15bc048f536c1013f9bfc23d0_e29c1ba3-3ce5-4ae7-ad81-295b210c4a5b.webp?v=1785141437"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c725f5be519b44e64f83cd9900e7c79f140b2aae.webp?v=1762223098","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f3b5ba42ca100acd4f0676cc6bdfedaa9bb0051.webp?v=1762223099","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7.webp?v=1762223099","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16b7040c854d48c4a30b430898963fd55f9205a4.webp?v=1762223100","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d715e8484a127d3a18e55baba2a503a7d314ee2.webp?v=1762223101","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96b949251a406ba846094e787eb79d23c6ad71c1.webp?v=1762223105","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb4647785bdb4530e6f44c081cdde78f064ecd82.webp?v=1762223106","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfd7c501eca7adac0b278703b4bf04650af7b1ab.webp?v=1762223106","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dc7415e185a72e15bc048f536c1013f9bfc23d0.webp?v=1762223106","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb4647785bdb4530e6f44c081cdde78f064ecd82_b77ea657-cd9f-404a-9ef7-4d6e43b5a12e.webp?v=1785141425","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfd7c501eca7adac0b278703b4bf04650af7b1ab_4bcdec77-f520-4f4c-9215-0b2a3c5fdb92.webp?v=1785141427","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96b949251a406ba846094e787eb79d23c6ad71c1_6139f852-4269-46a5-9c4b-fdda8d089d97.webp?v=1785141429","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f3b5ba42ca100acd4f0676cc6bdfedaa9bb0051_52b7cc6e-c22a-4026-aacb-27f3bfb6ec36.webp?v=1785141431","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7_6771f9ba-19e9-48d2-a3c9-8bc41510e92a.webp?v=1785141435","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dc7415e185a72e15bc048f536c1013f9bfc23d0_e29c1ba3-3ce5-4ae7-ad81-295b210c4a5b.webp?v=1785141437"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c725f5be519b44e64f83cd9900e7c79f140b2aae.webp?v=1762223098","options":["color"],"media":[{"alt":null,"id":26296806539363,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c725f5be519b44e64f83cd9900e7c79f140b2aae.webp?v=1762223098"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c725f5be519b44e64f83cd9900e7c79f140b2aae.webp?v=1762223098","width":2000},{"alt":null,"id":26296806834275,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f3b5ba42ca100acd4f0676cc6bdfedaa9bb0051.webp?v=1762223099"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f3b5ba42ca100acd4f0676cc6bdfedaa9bb0051.webp?v=1762223099","width":2000},{"alt":null,"id":26296806998115,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7.webp?v=1762223099"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7.webp?v=1762223099","width":2000},{"alt":null,"id":26296807161955,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16b7040c854d48c4a30b430898963fd55f9205a4.webp?v=1762223100"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/16b7040c854d48c4a30b430898963fd55f9205a4.webp?v=1762223100","width":2000},{"alt":null,"id":26296807293027,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d715e8484a127d3a18e55baba2a503a7d314ee2.webp?v=1762223101"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2d715e8484a127d3a18e55baba2a503a7d314ee2.webp?v=1762223101","width":2000},{"alt":null,"id":26296807424099,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96b949251a406ba846094e787eb79d23c6ad71c1.webp?v=1762223105"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96b949251a406ba846094e787eb79d23c6ad71c1.webp?v=1762223105","width":2000},{"alt":null,"id":26296807555171,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb4647785bdb4530e6f44c081cdde78f064ecd82.webp?v=1762223106"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb4647785bdb4530e6f44c081cdde78f064ecd82.webp?v=1762223106","width":2000},{"alt":null,"id":26296807850083,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfd7c501eca7adac0b278703b4bf04650af7b1ab.webp?v=1762223106"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfd7c501eca7adac0b278703b4bf04650af7b1ab.webp?v=1762223106","width":2000},{"alt":null,"id":26296808112227,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dc7415e185a72e15bc048f536c1013f9bfc23d0.webp?v=1762223106"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dc7415e185a72e15bc048f536c1013f9bfc23d0.webp?v=1762223106","width":2000},{"alt":null,"id":27907171778659,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb4647785bdb4530e6f44c081cdde78f064ecd82_b77ea657-cd9f-404a-9ef7-4d6e43b5a12e.webp?v=1785141425"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bb4647785bdb4530e6f44c081cdde78f064ecd82_b77ea657-cd9f-404a-9ef7-4d6e43b5a12e.webp?v=1785141425","width":2000},{"alt":null,"id":27907173613667,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfd7c501eca7adac0b278703b4bf04650af7b1ab_4bcdec77-f520-4f4c-9215-0b2a3c5fdb92.webp?v=1785141427"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfd7c501eca7adac0b278703b4bf04650af7b1ab_4bcdec77-f520-4f4c-9215-0b2a3c5fdb92.webp?v=1785141427","width":2000},{"alt":null,"id":27907174727779,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96b949251a406ba846094e787eb79d23c6ad71c1_6139f852-4269-46a5-9c4b-fdda8d089d97.webp?v=1785141429"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/96b949251a406ba846094e787eb79d23c6ad71c1_6139f852-4269-46a5-9c4b-fdda8d089d97.webp?v=1785141429","width":2000},{"alt":null,"id":27907175383139,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f3b5ba42ca100acd4f0676cc6bdfedaa9bb0051_52b7cc6e-c22a-4026-aacb-27f3bfb6ec36.webp?v=1785141431"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9f3b5ba42ca100acd4f0676cc6bdfedaa9bb0051_52b7cc6e-c22a-4026-aacb-27f3bfb6ec36.webp?v=1785141431","width":2000},{"alt":null,"id":27907175743587,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7_6771f9ba-19e9-48d2-a3c9-8bc41510e92a.webp?v=1785141435"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7_6771f9ba-19e9-48d2-a3c9-8bc41510e92a.webp?v=1785141435","width":2000},{"alt":null,"id":27907176104035,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dc7415e185a72e15bc048f536c1013f9bfc23d0_e29c1ba3-3ce5-4ae7-ad81-295b210c4a5b.webp?v=1785141437"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dc7415e185a72e15bc048f536c1013f9bfc23d0_e29c1ba3-3ce5-4ae7-ad81-295b210c4a5b.webp?v=1785141437","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43811816931427,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-POS10","requires_shipping":true,"taxable":true,"featured_image":{"id":36403567722595,"product_id":7911161528419,"position":14,"created_at":"2026-07-27T16:37:12+08:00","updated_at":"2026-07-27T16:37:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7_6771f9ba-19e9-48d2-a3c9-8bc41510e92a.webp?v=1785141435","variant_ids":[43811816931427]},"available":true,"name":"iPhone 12 mini SolidSuit PosterLad 樹林 - 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-POS10","featured_media":{"alt":null,"id":27907175743587,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7_6771f9ba-19e9-48d2-a3c9-8bc41510e92a.webp?v=1785141435"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43811816996963,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST011840B-POS10","requires_shipping":true,"taxable":true,"featured_image":{"id":36403565592675,"product_id":7911161528419,"position":11,"created_at":"2026-07-27T16:37:06+08:00","updated_at":"2026-07-27T16:37:07+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfd7c501eca7adac0b278703b4bf04650af7b1ab_4bcdec77-f520-4f4c-9215-0b2a3c5fdb92.webp?v=1785141427","variant_ids":[43811816996963]},"available":true,"name":"iPhone 12 mini SolidSuit PosterLad 樹林 - 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-POS10","featured_media":{"alt":null,"id":27907173613667,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cfd7c501eca7adac0b278703b4bf04650af7b1ab_4bcdec77-f520-4f4c-9215-0b2a3c5fdb92.webp?v=1785141427"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43811817095267,"title":"Cobalt Blue","option1":"Cobalt Blue","option2":null,"option3":null,"sku":"SST01184O9-POS10","requires_shipping":true,"taxable":true,"featured_image":{"id":36403568017507,"product_id":7911161528419,"position":15,"created_at":"2026-07-27T16:37:15+08:00","updated_at":"2026-07-27T16:37:17+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dc7415e185a72e15bc048f536c1013f9bfc23d0_e29c1ba3-3ce5-4ae7-ad81-295b210c4a5b.webp?v=1785141437","variant_ids":[43811817095267]},"available":true,"name":"iPhone 12 mini SolidSuit PosterLad 樹林 - 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-POS10","featured_media":{"alt":null,"id":27907176104035,"position":15,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dc7415e185a72e15bc048f536c1013f9bfc23d0_e29c1ba3-3ce5-4ae7-ad81-295b210c4a5b.webp?v=1785141437"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43811816931427,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0118452-POS10","requires_shipping":true,"taxable":true,"featured_image":{"id":36403567722595,"product_id":7911161528419,"position":14,"created_at":"2026-07-27T16:37:12+08:00","updated_at":"2026-07-27T16:37:15+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7_6771f9ba-19e9-48d2-a3c9-8bc41510e92a.webp?v=1785141435","variant_ids":[43811816931427]},"available":true,"name":"iPhone 12 mini SolidSuit PosterLad 樹林 - 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-POS10","featured_media":{"alt":null,"id":27907175743587,"position":14,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7d15e53dcb5e54a276cc1b46bcf42dd553d1bba7_6771f9ba-19e9-48d2-a3c9-8bc41510e92a.webp?v=1785141435"}},"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: "停產"
}