$product = {"id":7408553164899,"title":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - 黑武士-溜溜球炫技-幽默系列","handle":"iphone-12-mini-mod-nx-printable-pc11","description":null,"published_at":"2024-06-11T16:40:31+08:00","created_at":"2024-05-03T15:49:21+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 12 mini","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":41886795169891,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472571908195,"product_id":7408553164899,"position":1,"created_at":"2024-05-03T15:49:23+08:00","updated_at":"2024-05-03T15:49:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/388059e51ed9b234e6e6c3faf742743381e32d40_5c80e276-b68e-499b-a47a-e2e61d506860.webp?v=1714722563","variant_ids":[41886795169891]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PC11","featured_media":{"alt":null,"id":23877489262691,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/388059e51ed9b234e6e6c3faf742743381e32d40_5c80e276-b68e-499b-a47a-e2e61d506860.webp?v=1714722563"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/388059e51ed9b234e6e6c3faf742743381e32d40_5c80e276-b68e-499b-a47a-e2e61d506860.webp?v=1714722563","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fe757801195bb54a6ae304dd3c1629023c843b4_ad041c71-47cb-4dc3-a5bb-0fbdbb0847cd.webp?v=1714722566","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd16c316e0a941f90d9fe0fdec5298f45371c6dd_930f500d-605a-40f8-8578-6b0b0bae352f.webp?v=1714722568","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f8456107ef5e5e67d0299cea6bf8930d199ddf1_b75f56f0-301f-4c79-b9db-f91927c2cd95.webp?v=1714722570","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8f646a878f22853be294158fd7aa7b990da7c5e_2a4b0e7f-2faf-4b2d-a3bb-6853cb7f0464.webp?v=1714722572","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5809cd3afc288f3e999fe71fb260530a3ad96fb9_15b11689-bb23-422b-93b5-95b962eb9cc0.webp?v=1714722575","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/548ea16111b82b104e864f61cd1935bc95e5ff8f_275f248c-0492-4947-8ebc-6d69f574e78d.webp?v=1714722577","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5635142a547300ad7fc5c7b1898e5254e773a6e_72545c7a-3d32-4a44-85e5-56b9b63286d8.webp?v=1714722579","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6702b73b175b576a22052ba6c740229397f4ba15_25657cdc-729f-4668-893a-857019bd8bf4.webp?v=1714722581","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc63fa3ac55e75abcfc79bfd3e7e39a58854005_c300b9f0-52dd-43b6-899b-02fe02e459c5.webp?v=1714722583","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/911f0124a6f25ca76269b6d47d02083056ba215e_70936940-e107-419a-8389-f3f1e9ef6606.webp?v=1714722586"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/388059e51ed9b234e6e6c3faf742743381e32d40_5c80e276-b68e-499b-a47a-e2e61d506860.webp?v=1714722563","options":["color"],"media":[{"alt":null,"id":23877489262691,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/388059e51ed9b234e6e6c3faf742743381e32d40_5c80e276-b68e-499b-a47a-e2e61d506860.webp?v=1714722563"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/388059e51ed9b234e6e6c3faf742743381e32d40_5c80e276-b68e-499b-a47a-e2e61d506860.webp?v=1714722563","width":2000},{"alt":null,"id":23877489819747,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fe757801195bb54a6ae304dd3c1629023c843b4_ad041c71-47cb-4dc3-a5bb-0fbdbb0847cd.webp?v=1714722566"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4fe757801195bb54a6ae304dd3c1629023c843b4_ad041c71-47cb-4dc3-a5bb-0fbdbb0847cd.webp?v=1714722566","width":2000},{"alt":null,"id":23877490245731,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd16c316e0a941f90d9fe0fdec5298f45371c6dd_930f500d-605a-40f8-8578-6b0b0bae352f.webp?v=1714722568"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/dd16c316e0a941f90d9fe0fdec5298f45371c6dd_930f500d-605a-40f8-8578-6b0b0bae352f.webp?v=1714722568","width":2000},{"alt":null,"id":23877490901091,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f8456107ef5e5e67d0299cea6bf8930d199ddf1_b75f56f0-301f-4c79-b9db-f91927c2cd95.webp?v=1714722570"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/4f8456107ef5e5e67d0299cea6bf8930d199ddf1_b75f56f0-301f-4c79-b9db-f91927c2cd95.webp?v=1714722570","width":2000},{"alt":null,"id":23877491359843,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8f646a878f22853be294158fd7aa7b990da7c5e_2a4b0e7f-2faf-4b2d-a3bb-6853cb7f0464.webp?v=1714722572"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f8f646a878f22853be294158fd7aa7b990da7c5e_2a4b0e7f-2faf-4b2d-a3bb-6853cb7f0464.webp?v=1714722572","width":2000},{"alt":null,"id":23877491884131,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5809cd3afc288f3e999fe71fb260530a3ad96fb9_15b11689-bb23-422b-93b5-95b962eb9cc0.webp?v=1714722575"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/5809cd3afc288f3e999fe71fb260530a3ad96fb9_15b11689-bb23-422b-93b5-95b962eb9cc0.webp?v=1714722575","width":2000},{"alt":null,"id":23877492375651,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/548ea16111b82b104e864f61cd1935bc95e5ff8f_275f248c-0492-4947-8ebc-6d69f574e78d.webp?v=1714722577"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/548ea16111b82b104e864f61cd1935bc95e5ff8f_275f248c-0492-4947-8ebc-6d69f574e78d.webp?v=1714722577","width":2000},{"alt":null,"id":23877492736099,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5635142a547300ad7fc5c7b1898e5254e773a6e_72545c7a-3d32-4a44-85e5-56b9b63286d8.webp?v=1714722579"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/d5635142a547300ad7fc5c7b1898e5254e773a6e_72545c7a-3d32-4a44-85e5-56b9b63286d8.webp?v=1714722579","width":2000},{"alt":null,"id":23877493260387,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6702b73b175b576a22052ba6c740229397f4ba15_25657cdc-729f-4668-893a-857019bd8bf4.webp?v=1714722581"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/6702b73b175b576a22052ba6c740229397f4ba15_25657cdc-729f-4668-893a-857019bd8bf4.webp?v=1714722581","width":2000},{"alt":null,"id":23877493686371,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc63fa3ac55e75abcfc79bfd3e7e39a58854005_c300b9f0-52dd-43b6-899b-02fe02e459c5.webp?v=1714722583"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7bc63fa3ac55e75abcfc79bfd3e7e39a58854005_c300b9f0-52dd-43b6-899b-02fe02e459c5.webp?v=1714722583","width":2000},{"alt":null,"id":23877494145123,"position":11,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/911f0124a6f25ca76269b6d47d02083056ba215e_70936940-e107-419a-8389-f3f1e9ef6606.webp?v=1714722586"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/911f0124a6f25ca76269b6d47d02083056ba215e_70936940-e107-419a-8389-f3f1e9ef6606.webp?v=1714722586","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41886795169891,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472571908195,"product_id":7408553164899,"position":1,"created_at":"2024-05-03T15:49:23+08:00","updated_at":"2024-05-03T15:49:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/388059e51ed9b234e6e6c3faf742743381e32d40_5c80e276-b68e-499b-a47a-e2e61d506860.webp?v=1714722563","variant_ids":[41886795169891]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PC11","featured_media":{"alt":null,"id":23877489262691,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/388059e51ed9b234e6e6c3faf742743381e32d40_5c80e276-b68e-499b-a47a-e2e61d506860.webp?v=1714722563"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41886795169891,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0118424-PC11","requires_shipping":true,"taxable":true,"featured_image":{"id":31472571908195,"product_id":7408553164899,"position":1,"created_at":"2024-05-03T15:49:23+08:00","updated_at":"2024-05-03T15:49:23+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/388059e51ed9b234e6e6c3faf742743381e32d40_5c80e276-b68e-499b-a47a-e2e61d506860.webp?v=1714722563","variant_ids":[41886795169891]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 12 mini - 【聯名設計款】 - 迪士尼-星際大戰 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":"NPB0118424-PC11","featured_media":{"alt":null,"id":23877489262691,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/388059e51ed9b234e6e6c3faf742743381e32d40_5c80e276-b68e-499b-a47a-e2e61d506860.webp?v=1714722563"}},"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: "停產" }