$product = {"id":7416378392675,"title":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X戰機-線條白","handle":"iphone-8-mod-nx-printable-pb16","description":null,"published_at":"2024-06-11T16:57:26+08:00","created_at":"2024-05-06T14:45:24+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":41919089475683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31491984064611,"product_id":7416378392675,"position":10,"created_at":"2024-05-06T14:45:49+08:00","updated_at":"2024-05-06T14:45:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc5367ee8ed7b1b91d920e9d16f3292f4845642f_505adff3-446a-4c88-88e9-4595cb87acd3.webp?v=1714977949","variant_ids":[41919089475683]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X戰機-線條白 - 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-PB16","featured_media":{"alt":null,"id":23897397526627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc5367ee8ed7b1b91d920e9d16f3292f4845642f_505adff3-446a-4c88-88e9-4595cb87acd3.webp?v=1714977949"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}],"images":["\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/331f0f6a1a59a552fcf9925df05145de739327bd_d1fcac58-b31b-4825-a712-deb7de3048a0.webp?v=1714977927","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a19b31d1152d105c6e4a1ac12daa88da32b9158_a99600c1-cf0d-45b5-9aa9-aa1eb0344750.webp?v=1714977929","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/976845b9f4ee917f86068c1372e2c5b7a0334308_d51268c9-d8c6-4037-bb20-e1cdb26423d4.webp?v=1714977932","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4094dad82a9f485b24e12c23e0ca086ea6fd24c_1f0b3ad5-37e2-4b69-be4d-9bcb49904b3c.webp?v=1714977934","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b92f8a31bd3c159ce3ade9951ce97a738ef1a833_045234d7-e6da-419a-9604-16effac23bb9.webp?v=1714977936","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/347ccdca1f2dfb2f1968030fe624354b1a7b6b87_b0bc2bc9-1b66-4163-9375-cb2937e72699.webp?v=1714977939","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84c87a054556695a8906a8853f8e2c93b3092877_375937db-ac6d-4885-9538-094f820f2f65.webp?v=1714977941","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02ab82510912d8b0517cb7c2e90ad8e4bde5bedc_ef0bec82-605b-4287-aa2e-56602dd2c84a.webp?v=1714977943","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82ab1ed2e272466598228e26fc6c1b1877bc58e6_60310221-e306-48de-9263-8e4bbe139718.webp?v=1714977946","\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc5367ee8ed7b1b91d920e9d16f3292f4845642f_505adff3-446a-4c88-88e9-4595cb87acd3.webp?v=1714977949"],"featured_image":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/331f0f6a1a59a552fcf9925df05145de739327bd_d1fcac58-b31b-4825-a712-deb7de3048a0.webp?v=1714977927","options":["color"],"media":[{"alt":null,"id":23897392611427,"position":1,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/331f0f6a1a59a552fcf9925df05145de739327bd_d1fcac58-b31b-4825-a712-deb7de3048a0.webp?v=1714977927"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/331f0f6a1a59a552fcf9925df05145de739327bd_d1fcac58-b31b-4825-a712-deb7de3048a0.webp?v=1714977927","width":2000},{"alt":null,"id":23897393070179,"position":2,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a19b31d1152d105c6e4a1ac12daa88da32b9158_a99600c1-cf0d-45b5-9aa9-aa1eb0344750.webp?v=1714977929"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/7a19b31d1152d105c6e4a1ac12daa88da32b9158_a99600c1-cf0d-45b5-9aa9-aa1eb0344750.webp?v=1714977929","width":2000},{"alt":null,"id":23897393889379,"position":3,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/976845b9f4ee917f86068c1372e2c5b7a0334308_d51268c9-d8c6-4037-bb20-e1cdb26423d4.webp?v=1714977932"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/976845b9f4ee917f86068c1372e2c5b7a0334308_d51268c9-d8c6-4037-bb20-e1cdb26423d4.webp?v=1714977932","width":2000},{"alt":null,"id":23897394380899,"position":4,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4094dad82a9f485b24e12c23e0ca086ea6fd24c_1f0b3ad5-37e2-4b69-be4d-9bcb49904b3c.webp?v=1714977934"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/f4094dad82a9f485b24e12c23e0ca086ea6fd24c_1f0b3ad5-37e2-4b69-be4d-9bcb49904b3c.webp?v=1714977934","width":2000},{"alt":null,"id":23897394839651,"position":5,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b92f8a31bd3c159ce3ade9951ce97a738ef1a833_045234d7-e6da-419a-9604-16effac23bb9.webp?v=1714977936"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/b92f8a31bd3c159ce3ade9951ce97a738ef1a833_045234d7-e6da-419a-9604-16effac23bb9.webp?v=1714977936","width":2000},{"alt":null,"id":23897395265635,"position":6,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/347ccdca1f2dfb2f1968030fe624354b1a7b6b87_b0bc2bc9-1b66-4163-9375-cb2937e72699.webp?v=1714977939"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/347ccdca1f2dfb2f1968030fe624354b1a7b6b87_b0bc2bc9-1b66-4163-9375-cb2937e72699.webp?v=1714977939","width":2000},{"alt":null,"id":23897395953763,"position":7,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84c87a054556695a8906a8853f8e2c93b3092877_375937db-ac6d-4885-9538-094f820f2f65.webp?v=1714977941"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/84c87a054556695a8906a8853f8e2c93b3092877_375937db-ac6d-4885-9538-094f820f2f65.webp?v=1714977941","width":2000},{"alt":null,"id":23897396445283,"position":8,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02ab82510912d8b0517cb7c2e90ad8e4bde5bedc_ef0bec82-605b-4287-aa2e-56602dd2c84a.webp?v=1714977943"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/02ab82510912d8b0517cb7c2e90ad8e4bde5bedc_ef0bec82-605b-4287-aa2e-56602dd2c84a.webp?v=1714977943","width":2000},{"alt":null,"id":23897396936803,"position":9,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82ab1ed2e272466598228e26fc6c1b1877bc58e6_60310221-e306-48de-9263-8e4bbe139718.webp?v=1714977946"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/82ab1ed2e272466598228e26fc6c1b1877bc58e6_60310221-e306-48de-9263-8e4bbe139718.webp?v=1714977946","width":2000},{"alt":null,"id":23897397526627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc5367ee8ed7b1b91d920e9d16f3292f4845642f_505adff3-446a-4c88-88e9-4595cb87acd3.webp?v=1714977949"},"aspect_ratio":1.0,"height":2000,"media_type":"image","src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc5367ee8ed7b1b91d920e9d16f3292f4845642f_505adff3-446a-4c88-88e9-4595cb87acd3.webp?v=1714977949","width":2000}],"requires_selling_plan":false,"selling_plan_groups":[],"content":null}; $isMerge = null; $variants = [{"id":41919089475683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31491984064611,"product_id":7416378392675,"position":10,"created_at":"2024-05-06T14:45:49+08:00","updated_at":"2024-05-06T14:45:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc5367ee8ed7b1b91d920e9d16f3292f4845642f_505adff3-446a-4c88-88e9-4595cb87acd3.webp?v=1714977949","variant_ids":[41919089475683]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X戰機-線條白 - 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-PB16","featured_media":{"alt":null,"id":23897397526627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc5367ee8ed7b1b91d920e9d16f3292f4845642f_505adff3-446a-4c88-88e9-4595cb87acd3.webp?v=1714977949"}},"requires_selling_plan":false,"selling_plan_allocations":[],"quantity_rule":{"min":1,"max":null,"increment":1}}]; $defaultVariant = {"id":41919089475683,"title":"Mod NX-黑色邊框","option1":"Mod NX-黑色邊框","option2":null,"option3":null,"sku":"NPB0105424-PB16","requires_shipping":true,"taxable":true,"featured_image":{"id":31491984064611,"product_id":7416378392675,"position":10,"created_at":"2024-05-06T14:45:49+08:00","updated_at":"2024-05-06T14:45:49+08:00","alt":null,"width":2000,"height":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc5367ee8ed7b1b91d920e9d16f3292f4845642f_505adff3-446a-4c88-88e9-4595cb87acd3.webp?v=1714977949","variant_ids":[41919089475683]},"available":true,"name":"犀牛盾Mod NX手機殼 - iPhone 7\/8\/SE2\/SE3 - 【聯名設計款】 - 迪士尼-星際大戰 Star Wars - X戰機-線條白 - 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-PB16","featured_media":{"alt":null,"id":23897397526627,"position":10,"preview_image":{"aspect_ratio":1.0,"height":2000,"width":2000,"src":"\/\/b2b.rhinoshield.tw\/cdn\/shop\/files\/cc5367ee8ed7b1b91d920e9d16f3292f4845642f_505adff3-446a-4c88-88e9-4595cb87acd3.webp?v=1714977949"}},"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: "停產" }