Home
›
iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界
$product = {"id":7805271048291,"title":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界","handle":"iphone-13-pro-solidsuit-classic-mrt04","description":null,"published_at":"2025-05-27T14:58:23+08:00","created_at":"2025-05-27T10:48:36+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師SolidSuit專區MYMY REVERZ TATTOO","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-mymyreverztattoo","device-iPhone 13 Pro","merge","reseller-mymyreverztattoo"],"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":43403844714595,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0123152-MRT04","requires_shipping":true,"taxable":true,"featured_image":{"id":36330038820963,"product_id":7805271048291,"position":5,"created_at":"2026-07-21T09:30:55+08:00","updated_at":"2026-07-21T09:30:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e6be8a7620a8ce566aa733e1bef233b092a88b.webp?v=1784597457","variant_ids":[43403844714595]},"available":true,"name":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0123152-MRT04","featured_media":{"alt":null,"id":27833933070435,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e6be8a7620a8ce566aa733e1bef233b092a88b.webp?v=1784597457"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43403849695331,"title":"White","option1":"White","option2":null,"option3":null,"sku":"SST0123153-MRT04","requires_shipping":true,"taxable":true,"featured_image":{"id":36330048454755,"product_id":7805271048291,"position":8,"created_at":"2026-07-21T09:31:12+08:00","updated_at":"2026-07-21T09:31:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/488ec3c9bb8a4586dd997225175fc37890723f17.webp?v=1784597474","variant_ids":[43403849695331]},"available":true,"name":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界 - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0123153-MRT04","featured_media":{"alt":null,"id":27833942999139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/488ec3c9bb8a4586dd997225175fc37890723f17.webp?v=1784597474"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43403849728099,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"SST012310A-MRT04","requires_shipping":true,"taxable":true,"featured_image":{"id":33935333752931,"product_id":7805271048291,"position":1,"created_at":"2025-05-27T10:48:40+08:00","updated_at":"2025-05-27T10:48:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64bfe65cd65e6f8e9a09d1f66fe3de39f2ce0a17.webp?v=1748314122","variant_ids":[43403849728099]},"available":true,"name":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST012310A-MRT04","featured_media":{"alt":null,"id":25640517992547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64bfe65cd65e6f8e9a09d1f66fe3de39f2ce0a17.webp?v=1748314122"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43403849924707,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"SST01231Z9-MRT04","requires_shipping":true,"taxable":true,"featured_image":{"id":36330035347555,"product_id":7805271048291,"position":3,"created_at":"2026-07-21T09:30:52+08:00","updated_at":"2026-07-21T09:30:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f311ea60e22340e8ce9e919c79013d63df90d905.webp?v=1784597454","variant_ids":[43403849924707]},"available":true,"name":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界 - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01231Z9-MRT04","featured_media":{"alt":null,"id":27833929859171,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f311ea60e22340e8ce9e919c79013d63df90d905.webp?v=1784597454"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43403849957475,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST012310B-MRT04","requires_shipping":true,"taxable":true,"featured_image":{"id":36330034298979,"product_id":7805271048291,"position":2,"created_at":"2026-07-21T09:30:50+08:00","updated_at":"2026-07-21T09:30:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9379f07d25fcec9056c2ec9b4af4234a183ab8ad.webp?v=1784597452","variant_ids":[43403849957475]},"available":true,"name":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST012310B-MRT04","featured_media":{"alt":null,"id":27833928810595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9379f07d25fcec9056c2ec9b4af4234a183ab8ad.webp?v=1784597452"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64bfe65cd65e6f8e9a09d1f66fe3de39f2ce0a17.webp?v=1748314122","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9379f07d25fcec9056c2ec9b4af4234a183ab8ad.webp?v=1784597452","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f311ea60e22340e8ce9e919c79013d63df90d905.webp?v=1784597454","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/811e29fdf0bfd7ebc20491e2fe5d59128f88b013.webp?v=1784597456","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e6be8a7620a8ce566aa733e1bef233b092a88b.webp?v=1784597457","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edbc449a8745fb8573d7c1f6927bc06b283e2033.webp?v=1784597464","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0ac4920c5ca7942ddd4d1d6145917501f9a19c3.webp?v=1784597471","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/488ec3c9bb8a4586dd997225175fc37890723f17.webp?v=1784597474","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0220956dc56ae63113c25c46087bc96d178be8fa.webp?v=1784597478","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd66d0f42b8aae508ea2184ce68e788b05bac369.webp?v=1784597480"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64bfe65cd65e6f8e9a09d1f66fe3de39f2ce0a17.webp?v=1748314122","options":["color"],"media":[{"alt":null,"id":25640517992547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64bfe65cd65e6f8e9a09d1f66fe3de39f2ce0a17.webp?v=1748314122"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64bfe65cd65e6f8e9a09d1f66fe3de39f2ce0a17.webp?v=1748314122","width":2000},{"alt":null,"id":27833928810595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9379f07d25fcec9056c2ec9b4af4234a183ab8ad.webp?v=1784597452"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9379f07d25fcec9056c2ec9b4af4234a183ab8ad.webp?v=1784597452","width":2000},{"alt":null,"id":27833929859171,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f311ea60e22340e8ce9e919c79013d63df90d905.webp?v=1784597454"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f311ea60e22340e8ce9e919c79013d63df90d905.webp?v=1784597454","width":2000},{"alt":null,"id":27833931858019,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/811e29fdf0bfd7ebc20491e2fe5d59128f88b013.webp?v=1784597456"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/811e29fdf0bfd7ebc20491e2fe5d59128f88b013.webp?v=1784597456","width":2000},{"alt":null,"id":27833933070435,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e6be8a7620a8ce566aa733e1bef233b092a88b.webp?v=1784597457"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e6be8a7620a8ce566aa733e1bef233b092a88b.webp?v=1784597457","width":2000},{"alt":null,"id":27833937526883,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edbc449a8745fb8573d7c1f6927bc06b283e2033.webp?v=1784597464"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/edbc449a8745fb8573d7c1f6927bc06b283e2033.webp?v=1784597464","width":2000},{"alt":null,"id":27833940541539,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0ac4920c5ca7942ddd4d1d6145917501f9a19c3.webp?v=1784597471"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c0ac4920c5ca7942ddd4d1d6145917501f9a19c3.webp?v=1784597471","width":2000},{"alt":null,"id":27833942999139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/488ec3c9bb8a4586dd997225175fc37890723f17.webp?v=1784597474"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/488ec3c9bb8a4586dd997225175fc37890723f17.webp?v=1784597474","width":2000},{"alt":null,"id":27833945522275,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0220956dc56ae63113c25c46087bc96d178be8fa.webp?v=1784597478"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0220956dc56ae63113c25c46087bc96d178be8fa.webp?v=1784597478","width":2000},{"alt":null,"id":27833946865763,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd66d0f42b8aae508ea2184ce68e788b05bac369.webp?v=1784597480"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bd66d0f42b8aae508ea2184ce68e788b05bac369.webp?v=1784597480","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43403844714595,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0123152-MRT04","requires_shipping":true,"taxable":true,"featured_image":{"id":36330038820963,"product_id":7805271048291,"position":5,"created_at":"2026-07-21T09:30:55+08:00","updated_at":"2026-07-21T09:30:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e6be8a7620a8ce566aa733e1bef233b092a88b.webp?v=1784597457","variant_ids":[43403844714595]},"available":true,"name":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0123152-MRT04","featured_media":{"alt":null,"id":27833933070435,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e6be8a7620a8ce566aa733e1bef233b092a88b.webp?v=1784597457"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43403849695331,"title":"White","option1":"White","option2":null,"option3":null,"sku":"SST0123153-MRT04","requires_shipping":true,"taxable":true,"featured_image":{"id":36330048454755,"product_id":7805271048291,"position":8,"created_at":"2026-07-21T09:31:12+08:00","updated_at":"2026-07-21T09:31:14+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/488ec3c9bb8a4586dd997225175fc37890723f17.webp?v=1784597474","variant_ids":[43403849695331]},"available":true,"name":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界 - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0123153-MRT04","featured_media":{"alt":null,"id":27833942999139,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/488ec3c9bb8a4586dd997225175fc37890723f17.webp?v=1784597474"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43403849728099,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"SST012310A-MRT04","requires_shipping":true,"taxable":true,"featured_image":{"id":33935333752931,"product_id":7805271048291,"position":1,"created_at":"2025-05-27T10:48:40+08:00","updated_at":"2025-05-27T10:48:42+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64bfe65cd65e6f8e9a09d1f66fe3de39f2ce0a17.webp?v=1748314122","variant_ids":[43403849728099]},"available":true,"name":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST012310A-MRT04","featured_media":{"alt":null,"id":25640517992547,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/64bfe65cd65e6f8e9a09d1f66fe3de39f2ce0a17.webp?v=1748314122"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43403849924707,"title":"Tide Blue","option1":"Tide Blue","option2":null,"option3":null,"sku":"SST01231Z9-MRT04","requires_shipping":true,"taxable":true,"featured_image":{"id":36330035347555,"product_id":7805271048291,"position":3,"created_at":"2026-07-21T09:30:52+08:00","updated_at":"2026-07-21T09:30:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f311ea60e22340e8ce9e919c79013d63df90d905.webp?v=1784597454","variant_ids":[43403849924707]},"available":true,"name":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界 - Tide Blue","public_title":"Tide Blue","options":["Tide Blue"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST01231Z9-MRT04","featured_media":{"alt":null,"id":27833929859171,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f311ea60e22340e8ce9e919c79013d63df90d905.webp?v=1784597454"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43403849957475,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"SST012310B-MRT04","requires_shipping":true,"taxable":true,"featured_image":{"id":36330034298979,"product_id":7805271048291,"position":2,"created_at":"2026-07-21T09:30:50+08:00","updated_at":"2026-07-21T09:30:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9379f07d25fcec9056c2ec9b4af4234a183ab8ad.webp?v=1784597452","variant_ids":[43403849957475]},"available":true,"name":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界 - Shell Beige","public_title":"Shell Beige","options":["Shell Beige"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST012310B-MRT04","featured_media":{"alt":null,"id":27833928810595,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/9379f07d25fcec9056c2ec9b4af4234a183ab8ad.webp?v=1784597452"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43403844714595,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"SST0123152-MRT04","requires_shipping":true,"taxable":true,"featured_image":{"id":36330038820963,"product_id":7805271048291,"position":5,"created_at":"2026-07-21T09:30:55+08:00","updated_at":"2026-07-21T09:30:57+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e6be8a7620a8ce566aa733e1bef233b092a88b.webp?v=1784597457","variant_ids":[43403844714595]},"available":true,"name":"iPhone 13 Pro SolidSuit MYMY REVERZ TATTOO 海底世界 - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"SST0123152-MRT04","featured_media":{"alt":null,"id":27833933070435,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/76e6be8a7620a8ce566aa733e1bef233b092a88b.webp?v=1784597457"}},"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: "停產"
}