$product = {"id":7416334352483,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-噴漆黑","handle":"iphone-8-mod-nx-printable-pb01","description":null,"published_at":"2024-06-11T16:56:11+08:00","created_at":"2024-05-06T14:36:33+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":41918605787235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491871834211,"product_id":7416334352483,"position":9,"created_at":"2024-05-06T14:36:53+08:00","updated_at":"2024-05-06T14:36:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3961733544f52cb79381f57e7da38fac320c7370_174b82d6-747c-41a1-8b96-688f586d4ba8.webp?v=1714977413","variant_ids":[41918605787235]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-噴漆黑 - 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-PB01","featured_media":{"alt":null,"id":23897284837475,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3961733544f52cb79381f57e7da38fac320c7370_174b82d6-747c-41a1-8b96-688f586d4ba8.webp?v=1714977413"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54895563c47caa74ff14749c508d749b7f9fd2b4_854c8bec-2c0b-45d3-a4ef-a6aeb84aa8bc.webp?v=1714977395","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f90aefcfa7dde72624437edfa67b431a925b85ff_f3ad2cd2-afe9-4b1b-b295-aa5191a4d82c.webp?v=1714977398","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dccd95bb45429d8f790aa5e0d647027b2d6e8bd_68303070-1848-41c8-9ef2-6590b2a527d2.webp?v=1714977400","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b13b366fea522e625f9364b703f41036e11f1c2d_05aac330-826e-4e66-b4c7-b60651e9c03b.webp?v=1714977402","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5b53ab19fb1d810907562c08921080f9d963346_46f34903-7ac5-4bed-952d-febd8fbb6953.webp?v=1714977404","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bcb3bbdf0d35ae1d19531f78c42d1fd66a44821_9ea8f67b-b21a-4155-a628-5addfc7005e9.webp?v=1714977407","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0dd08e6d82c8cd92e36d45e1ae74cc28cd534b_cc1d6889-00de-4bfb-b7b3-672de0617c3a.webp?v=1714977409","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28cf4419ce6dfc023ec743c1db920f7c2af6ac5c_281228a7-499b-4118-b200-151ce9f77aaa.webp?v=1714977411","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3961733544f52cb79381f57e7da38fac320c7370_174b82d6-747c-41a1-8b96-688f586d4ba8.webp?v=1714977413","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8359f25b025370f112edb81873246527ed472c85_93cd7e29-c9f4-48ad-8249-0e18544886ba.webp?v=1714977416"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54895563c47caa74ff14749c508d749b7f9fd2b4_854c8bec-2c0b-45d3-a4ef-a6aeb84aa8bc.webp?v=1714977395","options":["color"],"media":[{"alt":null,"id":23897280675939,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54895563c47caa74ff14749c508d749b7f9fd2b4_854c8bec-2c0b-45d3-a4ef-a6aeb84aa8bc.webp?v=1714977395"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/54895563c47caa74ff14749c508d749b7f9fd2b4_854c8bec-2c0b-45d3-a4ef-a6aeb84aa8bc.webp?v=1714977395","width":2000},{"alt":null,"id":23897281232995,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f90aefcfa7dde72624437edfa67b431a925b85ff_f3ad2cd2-afe9-4b1b-b295-aa5191a4d82c.webp?v=1714977398"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f90aefcfa7dde72624437edfa67b431a925b85ff_f3ad2cd2-afe9-4b1b-b295-aa5191a4d82c.webp?v=1714977398","width":2000},{"alt":null,"id":23897281658979,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dccd95bb45429d8f790aa5e0d647027b2d6e8bd_68303070-1848-41c8-9ef2-6590b2a527d2.webp?v=1714977400"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8dccd95bb45429d8f790aa5e0d647027b2d6e8bd_68303070-1848-41c8-9ef2-6590b2a527d2.webp?v=1714977400","width":2000},{"alt":null,"id":23897282248803,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b13b366fea522e625f9364b703f41036e11f1c2d_05aac330-826e-4e66-b4c7-b60651e9c03b.webp?v=1714977402"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b13b366fea522e625f9364b703f41036e11f1c2d_05aac330-826e-4e66-b4c7-b60651e9c03b.webp?v=1714977402","width":2000},{"alt":null,"id":23897282838627,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5b53ab19fb1d810907562c08921080f9d963346_46f34903-7ac5-4bed-952d-febd8fbb6953.webp?v=1714977404"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f5b53ab19fb1d810907562c08921080f9d963346_46f34903-7ac5-4bed-952d-febd8fbb6953.webp?v=1714977404","width":2000},{"alt":null,"id":23897283330147,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bcb3bbdf0d35ae1d19531f78c42d1fd66a44821_9ea8f67b-b21a-4155-a628-5addfc7005e9.webp?v=1714977407"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2bcb3bbdf0d35ae1d19531f78c42d1fd66a44821_9ea8f67b-b21a-4155-a628-5addfc7005e9.webp?v=1714977407","width":2000},{"alt":null,"id":23897283854435,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0dd08e6d82c8cd92e36d45e1ae74cc28cd534b_cc1d6889-00de-4bfb-b7b3-672de0617c3a.webp?v=1714977409"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/2c0dd08e6d82c8cd92e36d45e1ae74cc28cd534b_cc1d6889-00de-4bfb-b7b3-672de0617c3a.webp?v=1714977409","width":2000},{"alt":null,"id":23897284313187,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28cf4419ce6dfc023ec743c1db920f7c2af6ac5c_281228a7-499b-4118-b200-151ce9f77aaa.webp?v=1714977411"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/28cf4419ce6dfc023ec743c1db920f7c2af6ac5c_281228a7-499b-4118-b200-151ce9f77aaa.webp?v=1714977411","width":2000},{"alt":null,"id":23897284837475,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3961733544f52cb79381f57e7da38fac320c7370_174b82d6-747c-41a1-8b96-688f586d4ba8.webp?v=1714977413"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3961733544f52cb79381f57e7da38fac320c7370_174b82d6-747c-41a1-8b96-688f586d4ba8.webp?v=1714977413","width":2000},{"alt":null,"id":23897285263459,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8359f25b025370f112edb81873246527ed472c85_93cd7e29-c9f4-48ad-8249-0e18544886ba.webp?v=1714977416"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/8359f25b025370f112edb81873246527ed472c85_93cd7e29-c9f4-48ad-8249-0e18544886ba.webp?v=1714977416","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41918605787235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491871834211,"product_id":7416334352483,"position":9,"created_at":"2024-05-06T14:36:53+08:00","updated_at":"2024-05-06T14:36:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3961733544f52cb79381f57e7da38fac320c7370_174b82d6-747c-41a1-8b96-688f586d4ba8.webp?v=1714977413","variant_ids":[41918605787235]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-噴漆黑 - 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-PB01","featured_media":{"alt":null,"id":23897284837475,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3961733544f52cb79381f57e7da38fac320c7370_174b82d6-747c-41a1-8b96-688f586d4ba8.webp?v=1714977413"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41918605787235,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB01","requires_shipping":true,"taxable":true,"featured_image":{"id":31491871834211,"product_id":7416334352483,"position":9,"created_at":"2024-05-06T14:36:53+08:00","updated_at":"2024-05-06T14:36:53+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3961733544f52cb79381f57e7da38fac320c7370_174b82d6-747c-41a1-8b96-688f586d4ba8.webp?v=1714977413","variant_ids":[41918605787235]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 風暴兵-噴漆黑 - 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-PB01","featured_media":{"alt":null,"id":23897284837475,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/3961733544f52cb79381f57e7da38fac320c7370_174b82d6-747c-41a1-8b96-688f586d4ba8.webp?v=1714977413"}},"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: "停產" }