$product = {"id":7856365437027,"title":"iPhone 15 Pro SolidX PSG New Logo","handle":"iphone-15-pro-solidx-bumper-back-crossover-design-oq59","description":null,"published_at":"2025-08-15T15:00:54+08:00","created_at":"2025-08-14T16:39:13+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-psg","device-iPhone 15 Pro","merge","reseller-psg"],"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":43591036600419,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012970B-OQ59","requires_shipping":true,"taxable":true,"featured_image":{"id":34328538349667,"product_id":7856365437027,"position":9,"created_at":"2025-08-14T16:39:22+08:00","updated_at":"2025-08-14T16:39:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc4c7ad0468ccfff0547cd5896800b9ef9294da.webp?v=1755160764","variant_ids":[43591036600419]},"available":true,"name":"iPhone 15 Pro SolidX PSG New Logo - 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":"NST012970B-OQ59","featured_media":{"alt":null,"id":25912787599459,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc4c7ad0468ccfff0547cd5896800b9ef9294da.webp?v=1755160764"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43591041482851,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"NST01297Z8-OQ59","requires_shipping":true,"taxable":true,"featured_image":{"id":34328537268323,"product_id":7856365437027,"position":5,"created_at":"2025-08-14T16:39:19+08:00","updated_at":"2025-08-14T16:39:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09ff6c9cd056b08d38ed9fdc753041351a136bef.webp?v=1755160761","variant_ids":[43591041482851]},"available":true,"name":"iPhone 15 Pro SolidX PSG New Logo - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01297Z8-OQ59","featured_media":{"alt":null,"id":25912786518115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09ff6c9cd056b08d38ed9fdc753041351a136bef.webp?v=1755160761"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43591041515619,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129753-OQ59","requires_shipping":true,"taxable":true,"featured_image":{"id":34328537071715,"product_id":7856365437027,"position":4,"created_at":"2025-08-14T16:39:19+08:00","updated_at":"2025-08-14T16:39:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2d2c770423d7e703f25900ea026458454619920.webp?v=1755160761","variant_ids":[43591041515619]},"available":true,"name":"iPhone 15 Pro SolidX PSG New Logo - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129753-OQ59","featured_media":{"alt":null,"id":25912786321507,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2d2c770423d7e703f25900ea026458454619920.webp?v=1755160761"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43591041613923,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"NST012970A-OQ59","requires_shipping":true,"taxable":true,"featured_image":{"id":34328538251363,"product_id":7856365437027,"position":8,"created_at":"2025-08-14T16:39:21+08:00","updated_at":"2025-08-14T16:39:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ed6b688bf2320d778f59e2d2c49dd145d27fcbc.webp?v=1755160763","variant_ids":[43591041613923]},"available":true,"name":"iPhone 15 Pro SolidX PSG New Logo - 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":"NST012970A-OQ59","featured_media":{"alt":null,"id":25912787501155,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ed6b688bf2320d778f59e2d2c49dd145d27fcbc.webp?v=1755160763"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43591041679459,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129752-OQ59","requires_shipping":true,"taxable":true,"featured_image":{"id":34328537596003,"product_id":7856365437027,"position":6,"created_at":"2025-08-14T16:39:20+08:00","updated_at":"2025-08-14T16:39:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf96468269da85ddcdf081a7a99042d6bdee0aa5.webp?v=1755160762","variant_ids":[43591041679459]},"available":true,"name":"iPhone 15 Pro SolidX PSG New Logo - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129752-OQ59","featured_media":{"alt":null,"id":25912786845795,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf96468269da85ddcdf081a7a99042d6bdee0aa5.webp?v=1755160762"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1383adecbd7c40ab0a9e448a81be7cc8228c191.webp?v=1755160759","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5ca11077be8d6f3c3aa6513999eaeea9336a8a3.webp?v=1755160760","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73e4c8c92775cb7401aae9c1980e8102bda68628.webp?v=1755160760","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2d2c770423d7e703f25900ea026458454619920.webp?v=1755160761","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09ff6c9cd056b08d38ed9fdc753041351a136bef.webp?v=1755160761","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf96468269da85ddcdf081a7a99042d6bdee0aa5.webp?v=1755160762","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8d790dcc5aa090488af3c5c54682a213f8a9b17.webp?v=1755160763","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ed6b688bf2320d778f59e2d2c49dd145d27fcbc.webp?v=1755160763","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc4c7ad0468ccfff0547cd5896800b9ef9294da.webp?v=1755160764","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1e28e90e82672e008302f5ef96b5418671636ec.webp?v=1755160765"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1383adecbd7c40ab0a9e448a81be7cc8228c191.webp?v=1755160759","options":["color"],"media":[{"alt":null,"id":25912785404003,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1383adecbd7c40ab0a9e448a81be7cc8228c191.webp?v=1755160759"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c1383adecbd7c40ab0a9e448a81be7cc8228c191.webp?v=1755160759","width":2000},{"alt":null,"id":25912785666147,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5ca11077be8d6f3c3aa6513999eaeea9336a8a3.webp?v=1755160760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c5ca11077be8d6f3c3aa6513999eaeea9336a8a3.webp?v=1755160760","width":2000},{"alt":null,"id":25912785993827,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73e4c8c92775cb7401aae9c1980e8102bda68628.webp?v=1755160760"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/73e4c8c92775cb7401aae9c1980e8102bda68628.webp?v=1755160760","width":2000},{"alt":null,"id":25912786321507,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2d2c770423d7e703f25900ea026458454619920.webp?v=1755160761"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2d2c770423d7e703f25900ea026458454619920.webp?v=1755160761","width":2000},{"alt":null,"id":25912786518115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09ff6c9cd056b08d38ed9fdc753041351a136bef.webp?v=1755160761"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09ff6c9cd056b08d38ed9fdc753041351a136bef.webp?v=1755160761","width":2000},{"alt":null,"id":25912786845795,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf96468269da85ddcdf081a7a99042d6bdee0aa5.webp?v=1755160762"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf96468269da85ddcdf081a7a99042d6bdee0aa5.webp?v=1755160762","width":2000},{"alt":null,"id":25912787206243,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8d790dcc5aa090488af3c5c54682a213f8a9b17.webp?v=1755160763"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8d790dcc5aa090488af3c5c54682a213f8a9b17.webp?v=1755160763","width":2000},{"alt":null,"id":25912787501155,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ed6b688bf2320d778f59e2d2c49dd145d27fcbc.webp?v=1755160763"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ed6b688bf2320d778f59e2d2c49dd145d27fcbc.webp?v=1755160763","width":2000},{"alt":null,"id":25912787599459,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc4c7ad0468ccfff0547cd5896800b9ef9294da.webp?v=1755160764"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc4c7ad0468ccfff0547cd5896800b9ef9294da.webp?v=1755160764","width":2000},{"alt":null,"id":25912787697763,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1e28e90e82672e008302f5ef96b5418671636ec.webp?v=1755160765"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/a1e28e90e82672e008302f5ef96b5418671636ec.webp?v=1755160765","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":43591036600419,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012970B-OQ59","requires_shipping":true,"taxable":true,"featured_image":{"id":34328538349667,"product_id":7856365437027,"position":9,"created_at":"2025-08-14T16:39:22+08:00","updated_at":"2025-08-14T16:39:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc4c7ad0468ccfff0547cd5896800b9ef9294da.webp?v=1755160764","variant_ids":[43591036600419]},"available":true,"name":"iPhone 15 Pro SolidX PSG New Logo - 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":"NST012970B-OQ59","featured_media":{"alt":null,"id":25912787599459,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc4c7ad0468ccfff0547cd5896800b9ef9294da.webp?v=1755160764"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43591041482851,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"NST01297Z8-OQ59","requires_shipping":true,"taxable":true,"featured_image":{"id":34328537268323,"product_id":7856365437027,"position":5,"created_at":"2025-08-14T16:39:19+08:00","updated_at":"2025-08-14T16:39:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09ff6c9cd056b08d38ed9fdc753041351a136bef.webp?v=1755160761","variant_ids":[43591041482851]},"available":true,"name":"iPhone 15 Pro SolidX PSG New Logo - Seaweed Green","public_title":"Seaweed Green","options":["Seaweed Green"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST01297Z8-OQ59","featured_media":{"alt":null,"id":25912786518115,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/09ff6c9cd056b08d38ed9fdc753041351a136bef.webp?v=1755160761"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43591041515619,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129753-OQ59","requires_shipping":true,"taxable":true,"featured_image":{"id":34328537071715,"product_id":7856365437027,"position":4,"created_at":"2025-08-14T16:39:19+08:00","updated_at":"2025-08-14T16:39:21+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2d2c770423d7e703f25900ea026458454619920.webp?v=1755160761","variant_ids":[43591041515619]},"available":true,"name":"iPhone 15 Pro SolidX PSG New Logo - White","public_title":"White","options":["White"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129753-OQ59","featured_media":{"alt":null,"id":25912786321507,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/c2d2c770423d7e703f25900ea026458454619920.webp?v=1755160761"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43591041613923,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"NST012970A-OQ59","requires_shipping":true,"taxable":true,"featured_image":{"id":34328538251363,"product_id":7856365437027,"position":8,"created_at":"2025-08-14T16:39:21+08:00","updated_at":"2025-08-14T16:39:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ed6b688bf2320d778f59e2d2c49dd145d27fcbc.webp?v=1755160763","variant_ids":[43591041613923]},"available":true,"name":"iPhone 15 Pro SolidX PSG New Logo - 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":"NST012970A-OQ59","featured_media":{"alt":null,"id":25912787501155,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8ed6b688bf2320d778f59e2d2c49dd145d27fcbc.webp?v=1755160763"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43591041679459,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129752-OQ59","requires_shipping":true,"taxable":true,"featured_image":{"id":34328537596003,"product_id":7856365437027,"position":6,"created_at":"2025-08-14T16:39:20+08:00","updated_at":"2025-08-14T16:39:22+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf96468269da85ddcdf081a7a99042d6bdee0aa5.webp?v=1755160762","variant_ids":[43591041679459]},"available":true,"name":"iPhone 15 Pro SolidX PSG New Logo - Black","public_title":"Black","options":["Black"],"price":125000,"weight":0,"compare_at_price":null,"inventory_quantity":0,"inventory_management":null,"inventory_policy":"deny","barcode":"NST0129752-OQ59","featured_media":{"alt":null,"id":25912786845795,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/bf96468269da85ddcdf081a7a99042d6bdee0aa5.webp?v=1755160762"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":43591036600419,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012970B-OQ59","requires_shipping":true,"taxable":true,"featured_image":{"id":34328538349667,"product_id":7856365437027,"position":9,"created_at":"2025-08-14T16:39:22+08:00","updated_at":"2025-08-14T16:39:24+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc4c7ad0468ccfff0547cd5896800b9ef9294da.webp?v=1755160764","variant_ids":[43591036600419]},"available":true,"name":"iPhone 15 Pro SolidX PSG New Logo - 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":"NST012970B-OQ59","featured_media":{"alt":null,"id":25912787599459,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bc4c7ad0468ccfff0547cd5896800b9ef9294da.webp?v=1755160764"}},"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: "停產" }