Home
›
iPhone 15 Plus SolidX (MagSafe 兼容) 小高潮色計事務所 小高潮共和國
$product = {"id":7824523231331,"title":"iPhone 15 Plus SolidX (MagSafe 兼容) 小高潮色計事務所 小高潮共和國","handle":"iphone-15-plus-solidx-magsafe-iku02","description":null,"published_at":"2025-07-01T17:37:40+08:00","created_at":"2025-06-20T18:12:22+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-ikuiku-studio","device-iPhone 15 Plus","merge","reseller-ikuiku-studio"],"price":145000,"price_min":145000,"price_max":145000,"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":43480027201635,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MNS0129652-IKU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34515365494883,"product_id":7824523231331,"position":12,"created_at":"2025-09-22T16:31:45+08:00","updated_at":"2025-09-22T16:31:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d25ea49e34db808afe05dae4980727bdbe7e22.webp?v=1758529908","variant_ids":[43480027201635]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 小高潮色計事務所 小高潮共和國 - Black","public_title":"Black","options":["Black"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS0129652-IKU02","featured_media":{"alt":null,"id":26085804736611,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d25ea49e34db808afe05dae4980727bdbe7e22.webp?v=1758529908"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43480028479587,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"MNS01296O8-IKU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34515363594339,"product_id":7824523231331,"position":4,"created_at":"2025-09-22T16:31:41+08:00","updated_at":"2025-09-22T16:31:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/649856e3e59151c2fe1a8a135440159b421babf1.webp?v=1758529903","variant_ids":[43480028479587]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 小高潮色計事務所 小高潮共和國 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS01296O8-IKU02","featured_media":{"alt":null,"id":26085802836067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/649856e3e59151c2fe1a8a135440159b421babf1.webp?v=1758529903"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43480028610659,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"MNS012960A-IKU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34515365003363,"product_id":7824523231331,"position":10,"created_at":"2025-09-22T16:31:44+08:00","updated_at":"2025-09-22T16:31:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e10b3de38158b700157ecc863fb2259b7e6cb29a.webp?v=1758529906","variant_ids":[43480028610659]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 小高潮色計事務所 小高潮共和國 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS012960A-IKU02","featured_media":{"alt":null,"id":26085804245091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e10b3de38158b700157ecc863fb2259b7e6cb29a.webp?v=1758529906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43480028643427,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"MNS01296Z7-IKU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34515364773987,"product_id":7824523231331,"position":9,"created_at":"2025-09-22T16:31:43+08:00","updated_at":"2025-09-22T16:31:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fbf81cc38d0a2a1b5cc7edd3db7c88c3460c8a3.webp?v=1758529906","variant_ids":[43480028643427]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 小高潮色計事務所 小高潮共和國 - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS01296Z7-IKU02","featured_media":{"alt":null,"id":26085804015715,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fbf81cc38d0a2a1b5cc7edd3db7c88c3460c8a3.webp?v=1758529906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-296-IKU02_5a3dbbaa-eb48-4515-85fb-02d7031ee05f.png?v=1750414345","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-296-IKU02_f64ffd3f-0ecf-45ed-ae49-df0039806c0a.png?v=1750642741","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-295-IKU02_40c6338d-6e4c-48a5-bc3c-9a2e95348092.png?v=1750819841","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/649856e3e59151c2fe1a8a135440159b421babf1.webp?v=1758529903","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da5e0f981e32a2049fcdc30344be4b74db5ea433.webp?v=1758529904","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5f2d4529596fdd7852541bd8c7ddf6dc8899fd1.webp?v=1758529904","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df90f54a52767d72085dae13caf9b894a8a1a558.webp?v=1758529904","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d08b9d99cf86ec9972806e2d164e5a2231c1410.webp?v=1758529905","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fbf81cc38d0a2a1b5cc7edd3db7c88c3460c8a3.webp?v=1758529906","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e10b3de38158b700157ecc863fb2259b7e6cb29a.webp?v=1758529906","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f0d26640b4b8e8d049e2569bba5da4db49f9eab.webp?v=1758529907","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d25ea49e34db808afe05dae4980727bdbe7e22.webp?v=1758529908","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d35e760a1b58d0e8a19e4830b4c274c87b6d93eb.webp?v=1758529908"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-296-IKU02_5a3dbbaa-eb48-4515-85fb-02d7031ee05f.png?v=1750414345","options":["color"],"media":[{"alt":null,"id":25722201669731,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-296-IKU02_5a3dbbaa-eb48-4515-85fb-02d7031ee05f.png?v=1750414345"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-296-IKU02_5a3dbbaa-eb48-4515-85fb-02d7031ee05f.png?v=1750414345","width":2000},{"alt":null,"id":25727999737955,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-296-IKU02_f64ffd3f-0ecf-45ed-ae49-df0039806c0a.png?v=1750642741"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-296-IKU02_f64ffd3f-0ecf-45ed-ae49-df0039806c0a.png?v=1750642741","width":2000},{"alt":null,"id":25735009992803,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-295-IKU02_40c6338d-6e4c-48a5-bc3c-9a2e95348092.png?v=1750819841"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/SolidX-52-295-IKU02_40c6338d-6e4c-48a5-bc3c-9a2e95348092.png?v=1750819841","width":2000},{"alt":null,"id":26085802836067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/649856e3e59151c2fe1a8a135440159b421babf1.webp?v=1758529903"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/649856e3e59151c2fe1a8a135440159b421babf1.webp?v=1758529903","width":2000},{"alt":null,"id":26085803098211,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da5e0f981e32a2049fcdc30344be4b74db5ea433.webp?v=1758529904"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/da5e0f981e32a2049fcdc30344be4b74db5ea433.webp?v=1758529904","width":2000},{"alt":null,"id":26085803327587,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5f2d4529596fdd7852541bd8c7ddf6dc8899fd1.webp?v=1758529904"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e5f2d4529596fdd7852541bd8c7ddf6dc8899fd1.webp?v=1758529904","width":2000},{"alt":null,"id":26085803491427,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df90f54a52767d72085dae13caf9b894a8a1a558.webp?v=1758529904"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/df90f54a52767d72085dae13caf9b894a8a1a558.webp?v=1758529904","width":2000},{"alt":null,"id":26085803753571,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d08b9d99cf86ec9972806e2d164e5a2231c1410.webp?v=1758529905"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/0d08b9d99cf86ec9972806e2d164e5a2231c1410.webp?v=1758529905","width":2000},{"alt":null,"id":26085804015715,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fbf81cc38d0a2a1b5cc7edd3db7c88c3460c8a3.webp?v=1758529906"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fbf81cc38d0a2a1b5cc7edd3db7c88c3460c8a3.webp?v=1758529906","width":2000},{"alt":null,"id":26085804245091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e10b3de38158b700157ecc863fb2259b7e6cb29a.webp?v=1758529906"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e10b3de38158b700157ecc863fb2259b7e6cb29a.webp?v=1758529906","width":2000},{"alt":null,"id":26085804572771,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f0d26640b4b8e8d049e2569bba5da4db49f9eab.webp?v=1758529907"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3f0d26640b4b8e8d049e2569bba5da4db49f9eab.webp?v=1758529907","width":2000},{"alt":null,"id":26085804736611,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d25ea49e34db808afe05dae4980727bdbe7e22.webp?v=1758529908"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d25ea49e34db808afe05dae4980727bdbe7e22.webp?v=1758529908","width":2000},{"alt":null,"id":26085804867683,"position":13,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d35e760a1b58d0e8a19e4830b4c274c87b6d93eb.webp?v=1758529908"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d35e760a1b58d0e8a19e4830b4c274c87b6d93eb.webp?v=1758529908","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43480027201635,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MNS0129652-IKU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34515365494883,"product_id":7824523231331,"position":12,"created_at":"2025-09-22T16:31:45+08:00","updated_at":"2025-09-22T16:31:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d25ea49e34db808afe05dae4980727bdbe7e22.webp?v=1758529908","variant_ids":[43480027201635]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 小高潮色計事務所 小高潮共和國 - Black","public_title":"Black","options":["Black"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS0129652-IKU02","featured_media":{"alt":null,"id":26085804736611,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d25ea49e34db808afe05dae4980727bdbe7e22.webp?v=1758529908"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43480028479587,"title":"Ash Grey","option1":"Ash Grey","option2":null,"option3":null,"sku":"MNS01296O8-IKU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34515363594339,"product_id":7824523231331,"position":4,"created_at":"2025-09-22T16:31:41+08:00","updated_at":"2025-09-22T16:31:43+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/649856e3e59151c2fe1a8a135440159b421babf1.webp?v=1758529903","variant_ids":[43480028479587]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 小高潮色計事務所 小高潮共和國 - Ash Grey","public_title":"Ash Grey","options":["Ash Grey"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS01296O8-IKU02","featured_media":{"alt":null,"id":26085802836067,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/649856e3e59151c2fe1a8a135440159b421babf1.webp?v=1758529903"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43480028610659,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"MNS012960A-IKU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34515365003363,"product_id":7824523231331,"position":10,"created_at":"2025-09-22T16:31:44+08:00","updated_at":"2025-09-22T16:31:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e10b3de38158b700157ecc863fb2259b7e6cb29a.webp?v=1758529906","variant_ids":[43480028610659]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 小高潮色計事務所 小高潮共和國 - Ocean Blue","public_title":"Ocean Blue","options":["Ocean Blue"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS012960A-IKU02","featured_media":{"alt":null,"id":26085804245091,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/e10b3de38158b700157ecc863fb2259b7e6cb29a.webp?v=1758529906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43480028643427,"title":"Glacier Blue","option1":"Glacier Blue","option2":null,"option3":null,"sku":"MNS01296Z7-IKU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34515364773987,"product_id":7824523231331,"position":9,"created_at":"2025-09-22T16:31:43+08:00","updated_at":"2025-09-22T16:31:46+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fbf81cc38d0a2a1b5cc7edd3db7c88c3460c8a3.webp?v=1758529906","variant_ids":[43480028643427]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 小高潮色計事務所 小高潮共和國 - Glacier Blue","public_title":"Glacier Blue","options":["Glacier Blue"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS01296Z7-IKU02","featured_media":{"alt":null,"id":26085804015715,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8fbf81cc38d0a2a1b5cc7edd3db7c88c3460c8a3.webp?v=1758529906"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43480027201635,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"MNS0129652-IKU02","requires_shipping":true,"taxable":true,"featured_image":{"id":34515365494883,"product_id":7824523231331,"position":12,"created_at":"2025-09-22T16:31:45+08:00","updated_at":"2025-09-22T16:31:48+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d25ea49e34db808afe05dae4980727bdbe7e22.webp?v=1758529908","variant_ids":[43480027201635]},"available":true,"name":"iPhone 15 Plus SolidX (MagSafe 兼容) 小高潮色計事務所 小高潮共和國 - Black","public_title":"Black","options":["Black"],"price":145000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"MNS0129652-IKU02","featured_media":{"alt":null,"id":26085804736611,"position":12,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/65d25ea49e34db808afe05dae4980727bdbe7e22.webp?v=1758529908"}},"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: "停產"
}