$product = {"id":7416386093155,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術","handle":"iphone-8-mod-nx-printable-pb40","description":null,"published_at":"2024-06-11T16:57:39+08:00","created_at":"2024-05-06T14:46:48+08:00","vendor":"RHINOSHIELD Taiwan B2B","type":"設計師MOD NX專區-迪士尼-星際大戰 Star Wars","tags":["20%","25%","30%","35%","40%","45%","50%","b2b","brand-Apple","designer","designer-starwars","device-iPhone 8","merge","mod-nx-printable","new-modnx-sku","reseller-modnx-star-wars","Top50","type-Mod NX Printable"],"price":90000,"price_min":90000,"price_max":90000,"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":41919173296227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31491998810211,"product_id":7416386093155,"position":1,"created_at":"2024-05-06T14:46:51+08:00","updated_at":"2024-05-06T14:46:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b441a469597d971ad5332de534e066b1e676330_54c54ffd-8e66-4af4-994f-dc48c76772b0.webp?v=1714978011","variant_ids":[41919173296227]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-PB40","featured_media":{"alt":null,"id":23897412567139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b441a469597d971ad5332de534e066b1e676330_54c54ffd-8e66-4af4-994f-dc48c76772b0.webp?v=1714978011"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b441a469597d971ad5332de534e066b1e676330_54c54ffd-8e66-4af4-994f-dc48c76772b0.webp?v=1714978011","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91097b4efbd243a873591ac3e8af7ad492230f06_ac2b4c1d-f5c9-47a0-b75d-248daef03958.webp?v=1714978013","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45f9a44046d858c9a731faddaeb2e4cc0806877_562c6b4f-fa5d-4bcc-b850-6a6eaec4cdcc.webp?v=1714978016","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04b2813926c48b2fa306e18539cec504a78a7177_e5296e56-ffa3-4c79-b0d7-41ff268878da.webp?v=1714978018","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44098b5c88898d290b630d71dbfc911f5b611543_3ea5a7c9-5905-4553-b9b8-7a900801d79e.webp?v=1714978020","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6ac5c953e59992a255487105a6617f90ef242c_89c941b5-922a-4a07-bcbd-d5752a3caa0b.webp?v=1714978022","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35b7b2106a2a65404fb47b9ab447861ab30bac8_d57e3c1b-385e-45dd-b828-48a1e2006891.webp?v=1714978024","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32fa96a37ad23710b7ca1088de11fcbf1a45a259_b218d279-0c24-42e9-8b06-467a182b28fb.webp?v=1714978026","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/171ca6679f7fd21baf925d28bf24d13019b1b797_5a706800-8b81-4463-810c-553774592630.webp?v=1714978031"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b441a469597d971ad5332de534e066b1e676330_54c54ffd-8e66-4af4-994f-dc48c76772b0.webp?v=1714978011","options":["color"],"media":[{"alt":null,"id":23897412567139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b441a469597d971ad5332de534e066b1e676330_54c54ffd-8e66-4af4-994f-dc48c76772b0.webp?v=1714978011"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b441a469597d971ad5332de534e066b1e676330_54c54ffd-8e66-4af4-994f-dc48c76772b0.webp?v=1714978011","width":2000},{"alt":null,"id":23897413156963,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91097b4efbd243a873591ac3e8af7ad492230f06_ac2b4c1d-f5c9-47a0-b75d-248daef03958.webp?v=1714978013"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/91097b4efbd243a873591ac3e8af7ad492230f06_ac2b4c1d-f5c9-47a0-b75d-248daef03958.webp?v=1714978013","width":2000},{"alt":null,"id":23897413681251,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45f9a44046d858c9a731faddaeb2e4cc0806877_562c6b4f-fa5d-4bcc-b850-6a6eaec4cdcc.webp?v=1714978016"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d45f9a44046d858c9a731faddaeb2e4cc0806877_562c6b4f-fa5d-4bcc-b850-6a6eaec4cdcc.webp?v=1714978016","width":2000},{"alt":null,"id":23897414238307,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04b2813926c48b2fa306e18539cec504a78a7177_e5296e56-ffa3-4c79-b0d7-41ff268878da.webp?v=1714978018"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/04b2813926c48b2fa306e18539cec504a78a7177_e5296e56-ffa3-4c79-b0d7-41ff268878da.webp?v=1714978018","width":2000},{"alt":null,"id":23897414697059,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44098b5c88898d290b630d71dbfc911f5b611543_3ea5a7c9-5905-4553-b9b8-7a900801d79e.webp?v=1714978020"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/44098b5c88898d290b630d71dbfc911f5b611543_3ea5a7c9-5905-4553-b9b8-7a900801d79e.webp?v=1714978020","width":2000},{"alt":null,"id":23897415090275,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6ac5c953e59992a255487105a6617f90ef242c_89c941b5-922a-4a07-bcbd-d5752a3caa0b.webp?v=1714978022"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/ae6ac5c953e59992a255487105a6617f90ef242c_89c941b5-922a-4a07-bcbd-d5752a3caa0b.webp?v=1714978022","width":2000},{"alt":null,"id":23897415909475,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35b7b2106a2a65404fb47b9ab447861ab30bac8_d57e3c1b-385e-45dd-b828-48a1e2006891.webp?v=1714978024"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f35b7b2106a2a65404fb47b9ab447861ab30bac8_d57e3c1b-385e-45dd-b828-48a1e2006891.webp?v=1714978024","width":2000},{"alt":null,"id":23897416499299,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32fa96a37ad23710b7ca1088de11fcbf1a45a259_b218d279-0c24-42e9-8b06-467a182b28fb.webp?v=1714978026"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/32fa96a37ad23710b7ca1088de11fcbf1a45a259_b218d279-0c24-42e9-8b06-467a182b28fb.webp?v=1714978026","width":2000},{"alt":null,"id":23897417515107,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/171ca6679f7fd21baf925d28bf24d13019b1b797_5a706800-8b81-4463-810c-553774592630.webp?v=1714978031"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/171ca6679f7fd21baf925d28bf24d13019b1b797_5a706800-8b81-4463-810c-553774592630.webp?v=1714978031","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919173296227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31491998810211,"product_id":7416386093155,"position":1,"created_at":"2024-05-06T14:46:51+08:00","updated_at":"2024-05-06T14:46:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b441a469597d971ad5332de534e066b1e676330_54c54ffd-8e66-4af4-994f-dc48c76772b0.webp?v=1714978011","variant_ids":[41919173296227]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-PB40","featured_media":{"alt":null,"id":23897412567139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b441a469597d971ad5332de534e066b1e676330_54c54ffd-8e66-4af4-994f-dc48c76772b0.webp?v=1714978011"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919173296227,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB40","requires_shipping":true,"taxable":true,"featured_image":{"id":31491998810211,"product_id":7416386093155,"position":1,"created_at":"2024-05-06T14:46:51+08:00","updated_at":"2024-05-06T14:46:51+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b441a469597d971ad5332de534e066b1e676330_54c54ffd-8e66-4af4-994f-dc48c76772b0.webp?v=1714978011","variant_ids":[41919173296227]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 爪哇族2-塗鴉藝術 - Mod NX-黑色邊框","public_title":"Mod NX-黑色邊框","options":["Mod NX-黑色邊框"],"price":90000,"weight":980,"compare_at_price":null,"inventory_quantity":2500,"inventory_management":null,"inventory_policy":"deny","barcode":"NPB0105424-PB40","featured_media":{"alt":null,"id":23897412567139,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/1b441a469597d971ad5332de534e066b1e676330_54c54ffd-8e66-4af4-994f-dc48c76772b0.webp?v=1714978011"}},"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: "停產" }