Home
›
iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物
$product = {"id":7949632569443,"title":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物","handle":"iphone-15-pro-solidx-za15","description":null,"published_at":"2026-01-12T09:11:58+08:00","created_at":"2026-01-07T09:46:10+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"","tags":["10%","20%","30%","40%","50%","brand-Apple","designer","designer-disney-wdas","device-iPhone 15 Pro","merge","reseller-disney-wdas"],"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":43938865184867,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012970B-ZA15","requires_shipping":true,"taxable":true,"featured_image":{"id":35074028077155,"product_id":7949632569443,"position":1,"created_at":"2026-01-07T09:46:48+08:00","updated_at":"2026-01-07T09:46:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac4a113f4215f5bf91e9112676caf8857e6ce6.webp?v=1767750410","variant_ids":[43938865184867]},"available":true,"name":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物 - 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-ZA15","featured_media":{"alt":null,"id":26631438991459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac4a113f4215f5bf91e9112676caf8857e6ce6.webp?v=1767750410"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43938865741923,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"NST012970A-ZA15","requires_shipping":true,"taxable":true,"featured_image":{"id":35074029682787,"product_id":7949632569443,"position":6,"created_at":"2026-01-07T09:46:50+08:00","updated_at":"2026-01-07T09:46:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc1c1273a301a64183ca27896128d03d280c8c2.webp?v=1767750412","variant_ids":[43938865741923]},"available":true,"name":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物 - 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-ZA15","featured_media":{"alt":null,"id":26631440629859,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc1c1273a301a64183ca27896128d03d280c8c2.webp?v=1767750412"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43938866823267,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"NST01297Z8-ZA15","requires_shipping":true,"taxable":true,"featured_image":{"id":35074031059043,"product_id":7949632569443,"position":9,"created_at":"2026-01-07T09:46:52+08:00","updated_at":"2026-01-07T09:46:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b0b9f3d962f4bb74095acc480025a803652696.webp?v=1767750414","variant_ids":[43938866823267]},"available":true,"name":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物 - 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-ZA15","featured_media":{"alt":null,"id":26631442006115,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b0b9f3d962f4bb74095acc480025a803652696.webp?v=1767750414"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43938868330595,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129752-ZA15","requires_shipping":true,"taxable":true,"featured_image":{"id":35074031550563,"product_id":7949632569443,"position":10,"created_at":"2026-01-07T09:46:53+08:00","updated_at":"2026-01-07T09:46:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd3edbb94265aaf45cc6185ba9225afdcb9326d.webp?v=1767750415","variant_ids":[43938868330595]},"available":true,"name":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物 - 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-ZA15","featured_media":{"alt":null,"id":26631442727011,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd3edbb94265aaf45cc6185ba9225afdcb9326d.webp?v=1767750415"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43938869280867,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129753-ZA15","requires_shipping":true,"taxable":true,"featured_image":{"id":35074028765283,"product_id":7949632569443,"position":3,"created_at":"2026-01-07T09:46:49+08:00","updated_at":"2026-01-07T09:46:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebb85e9c88a4c25369e07d4038b3583281a4655c.webp?v=1767750411","variant_ids":[43938869280867]},"available":true,"name":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物 - 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-ZA15","featured_media":{"alt":null,"id":26631439646819,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebb85e9c88a4c25369e07d4038b3583281a4655c.webp?v=1767750411"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac4a113f4215f5bf91e9112676caf8857e6ce6.webp?v=1767750410","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8342aa3d29db7b0cdd2cafead1b570a05d72a0e2.webp?v=1767750410","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebb85e9c88a4c25369e07d4038b3583281a4655c.webp?v=1767750411","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5768f485b7e933e7c675548543c83e64b671f84e.webp?v=1767750412","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ced1450aa4c887608e4d33245149b09ae101c78b.webp?v=1767750412","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc1c1273a301a64183ca27896128d03d280c8c2.webp?v=1767750412","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e3b6e1fef03c4240f1aa797be06aeb2d75f51f0.webp?v=1767750413","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61a1200192d3a822d182a4e1e11e024ce5c1cc55.webp?v=1767750413","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b0b9f3d962f4bb74095acc480025a803652696.webp?v=1767750414","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd3edbb94265aaf45cc6185ba9225afdcb9326d.webp?v=1767750415"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac4a113f4215f5bf91e9112676caf8857e6ce6.webp?v=1767750410","options":["color"],"media":[{"alt":null,"id":26631438991459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac4a113f4215f5bf91e9112676caf8857e6ce6.webp?v=1767750410"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac4a113f4215f5bf91e9112676caf8857e6ce6.webp?v=1767750410","width":2000},{"alt":null,"id":26631439286371,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8342aa3d29db7b0cdd2cafead1b570a05d72a0e2.webp?v=1767750410"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8342aa3d29db7b0cdd2cafead1b570a05d72a0e2.webp?v=1767750410","width":2000},{"alt":null,"id":26631439646819,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebb85e9c88a4c25369e07d4038b3583281a4655c.webp?v=1767750411"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebb85e9c88a4c25369e07d4038b3583281a4655c.webp?v=1767750411","width":2000},{"alt":null,"id":26631440040035,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5768f485b7e933e7c675548543c83e64b671f84e.webp?v=1767750412"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5768f485b7e933e7c675548543c83e64b671f84e.webp?v=1767750412","width":2000},{"alt":null,"id":26631440334947,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ced1450aa4c887608e4d33245149b09ae101c78b.webp?v=1767750412"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ced1450aa4c887608e4d33245149b09ae101c78b.webp?v=1767750412","width":2000},{"alt":null,"id":26631440629859,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc1c1273a301a64183ca27896128d03d280c8c2.webp?v=1767750412"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc1c1273a301a64183ca27896128d03d280c8c2.webp?v=1767750412","width":2000},{"alt":null,"id":26631440924771,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e3b6e1fef03c4240f1aa797be06aeb2d75f51f0.webp?v=1767750413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3e3b6e1fef03c4240f1aa797be06aeb2d75f51f0.webp?v=1767750413","width":2000},{"alt":null,"id":26631441416291,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61a1200192d3a822d182a4e1e11e024ce5c1cc55.webp?v=1767750413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/61a1200192d3a822d182a4e1e11e024ce5c1cc55.webp?v=1767750413","width":2000},{"alt":null,"id":26631442006115,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b0b9f3d962f4bb74095acc480025a803652696.webp?v=1767750414"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b0b9f3d962f4bb74095acc480025a803652696.webp?v=1767750414","width":2000},{"alt":null,"id":26631442727011,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd3edbb94265aaf45cc6185ba9225afdcb9326d.webp?v=1767750415"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd3edbb94265aaf45cc6185ba9225afdcb9326d.webp?v=1767750415","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null};
$isMerge = null;
$variants = [{"id":43938865184867,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012970B-ZA15","requires_shipping":true,"taxable":true,"featured_image":{"id":35074028077155,"product_id":7949632569443,"position":1,"created_at":"2026-01-07T09:46:48+08:00","updated_at":"2026-01-07T09:46:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac4a113f4215f5bf91e9112676caf8857e6ce6.webp?v=1767750410","variant_ids":[43938865184867]},"available":true,"name":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物 - 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-ZA15","featured_media":{"alt":null,"id":26631438991459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac4a113f4215f5bf91e9112676caf8857e6ce6.webp?v=1767750410"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43938865741923,"title":"Ocean Blue","option1":"Ocean Blue","option2":null,"option3":null,"sku":"NST012970A-ZA15","requires_shipping":true,"taxable":true,"featured_image":{"id":35074029682787,"product_id":7949632569443,"position":6,"created_at":"2026-01-07T09:46:50+08:00","updated_at":"2026-01-07T09:46:52+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc1c1273a301a64183ca27896128d03d280c8c2.webp?v=1767750412","variant_ids":[43938865741923]},"available":true,"name":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物 - 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-ZA15","featured_media":{"alt":null,"id":26631440629859,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc1c1273a301a64183ca27896128d03d280c8c2.webp?v=1767750412"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43938866823267,"title":"Seaweed Green","option1":"Seaweed Green","option2":null,"option3":null,"sku":"NST01297Z8-ZA15","requires_shipping":true,"taxable":true,"featured_image":{"id":35074031059043,"product_id":7949632569443,"position":9,"created_at":"2026-01-07T09:46:52+08:00","updated_at":"2026-01-07T09:46:54+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b0b9f3d962f4bb74095acc480025a803652696.webp?v=1767750414","variant_ids":[43938866823267]},"available":true,"name":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物 - 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-ZA15","featured_media":{"alt":null,"id":26631442006115,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/88b0b9f3d962f4bb74095acc480025a803652696.webp?v=1767750414"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43938868330595,"title":"Black","option1":"Black","option2":null,"option3":null,"sku":"NST0129752-ZA15","requires_shipping":true,"taxable":true,"featured_image":{"id":35074031550563,"product_id":7949632569443,"position":10,"created_at":"2026-01-07T09:46:53+08:00","updated_at":"2026-01-07T09:46:55+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd3edbb94265aaf45cc6185ba9225afdcb9326d.webp?v=1767750415","variant_ids":[43938868330595]},"available":true,"name":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物 - 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-ZA15","featured_media":{"alt":null,"id":26631442727011,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6bd3edbb94265aaf45cc6185ba9225afdcb9326d.webp?v=1767750415"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}},{"id":43938869280867,"title":"White","option1":"White","option2":null,"option3":null,"sku":"NST0129753-ZA15","requires_shipping":true,"taxable":true,"featured_image":{"id":35074028765283,"product_id":7949632569443,"position":3,"created_at":"2026-01-07T09:46:49+08:00","updated_at":"2026-01-07T09:46:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebb85e9c88a4c25369e07d4038b3583281a4655c.webp?v=1767750411","variant_ids":[43938869280867]},"available":true,"name":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物 - 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-ZA15","featured_media":{"alt":null,"id":26631439646819,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ebb85e9c88a4c25369e07d4038b3583281a4655c.webp?v=1767750411"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}];
$defaultVariant = {"id":43938865184867,"title":"Shell Beige","option1":"Shell Beige","option2":null,"option3":null,"sku":"NST012970B-ZA15","requires_shipping":true,"taxable":true,"featured_image":{"id":35074028077155,"product_id":7949632569443,"position":1,"created_at":"2026-01-07T09:46:48+08:00","updated_at":"2026-01-07T09:46:50+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac4a113f4215f5bf91e9112676caf8857e6ce6.webp?v=1767750410","variant_ids":[43938865184867]},"available":true,"name":"iPhone 15 Pro SolidX 動物方城市 | 大英雄天團 | 魔法滿屋 動物方城市 - 城市動物 - 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-ZA15","featured_media":{"alt":null,"id":26631438991459,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5eac4a113f4215f5bf91e9112676caf8857e6ce6.webp?v=1767750410"}},"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: "停產"
}