£4 OFF
Orders £34.00+
CODE: SHOP4
£6 OFF
Orders £56.00+
CODE:SHOP6
£10 OFF
Orders £72.00+
CODE:SHOP10
Spotify Code Personalized Building Brick Photo Block Frame
Save
Hurry up! Sale Ends in
SHIPPING TO:
\n
","featured_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"featured_media":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},"handle":"spotify-code-personalized-building-brick-photo-block-frame","has_only_default_variant":false,"images":[{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078350","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078351","media_type":"image","position":3,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000}],"media":[{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078350","media_type":"image","position":2,"preview_image":{"alt":"","id":"6717363017560078350","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078351","media_type":"image","position":3,"preview_image":{"alt":"","id":"6717363017560078351","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000}],"options":["Size"],"options_by_name":{"Size":{"name":"Size","selected_value":null,"values":["Small (4.5*2.7inch)","Medium (5.6*3.9inch)","Large (6.9*5inch)"],"position":0,"values_images":[{"value":"Small (4.5*2.7inch)","image":null},{"value":"Medium (5.6*3.9inch)","image":null},{"value":"Large (6.9*5inch)","image":null}],"option_values":[{"id":"16267173630188734439393445","value":"Small (4.5*2.7inch)"},{"id":"16267173630188734439443445","value":"Medium (5.6*3.9inch)"},{"id":"16267173630188734439493445","value":"Large (6.9*5inch)"}]}},"options_with_values":[{"name":"Size","position":0,"selected_value":null,"values":["Small (4.5*2.7inch)","Medium (5.6*3.9inch)","Large (6.9*5inch)"],"values_images":[{"value":"Small (4.5*2.7inch)","image":null},{"value":"Medium (5.6*3.9inch)","image":null},{"value":"Large (6.9*5inch)","image":null}],"option_values":[{"id":"16267173630188734439393445","value":"Small (4.5*2.7inch)"},{"id":"16267173630188734439443445","value":"Medium (5.6*3.9inch)"},{"id":"16267173630188734439493445","value":"Large (6.9*5inch)"}],"specName":"Size"}],"price":1995,"price_max":2595,"price_min":1995,"price_varies":false,"requires_selling_plan":false,"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},"tags":["custom-sunzi-designer-v4","photo-block","pla-google-3","spotify-code"],"variants":[{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":4600,"featured_image":null,"featured_media":null,"id":"18067173630188734439423445","image":null,"option1":"Medium (5.6*3.9inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Medium (5.6*3.9inch)"],"price":2295,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY042C","taxable":false,"title":"Medium (5.6*3.9inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439423445","weight_in_unit":"80","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":5200,"featured_image":null,"featured_media":null,"id":"18067173630188734439473445","image":null,"option1":"Large (6.9*5inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Large (6.9*5inch)"],"price":2595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY043C","taxable":false,"title":"Large (6.9*5inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439473445","weight_in_unit":"120","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}}],"quantity_price_breaks_configured":false};
\nTRANSLATE with
\n
\n \n\n\n\n
\n\nEnable collaborative features and customize widget: Bing Webmaster Portal
\n \n- This item is covered by our 90-DAY RETURN policy.
90 DAYS Return/Exchange Policy
We support a 90-day return policy, if you purchase an warranty, you can extend this period to 180 days
Return & Exchange Service Procedure
- STEP 1 Contact Customer Service and Request Return Detail. Email:service@namenecklace.com.com
- STEP 2 Customer will receive an email notification once your request is approved.
- STEP 3 The customer packs the package and sends it.
- STEP 4 Get Refund or Replacement after we receive the products.
FULL COVERAGE Return/Exchange Policy
- The following reasons are covered by our 90 day FULL COVERAGE Return/Exchange Policy. (We will be responsible for the return postage fees and replacement fees)
- 1. The product customization information does not match or an error in customization.
- 2. We sent the wrong order or item(s), you received any broken items, or the quality of the products you received is poor/defective.
- 3. Unclear pictures rendering or lettering
- 4. Wrong or mismatched size.
NO RETURN & EXCHANGE
- The following reasons are NOT covered by our 60 day return policy. We are not liable for these issues.
- 1. Products that exceed the return processing time limit (60 days after the order is signed).
- 2. The non-quality issue for personalized products.
- 3. Product damaged by misuse, mishandling, or poor maintenance.
- 4. Items that have been washed, worn, or soiled and damaged resulting from customer's handling. For safety and hygiene reasons, personal items such as underwear, swimwear, socks, etc.
- 5. Chose the wrong size for the product.
- 6. Personal Reasons due to personal taste, change of mind etc.
- 7. Partial returns or exchange of products from a set item is not acceptable.
Precautions for return and exchange
- 1. Items that are being returned should be new and unworn. They should be kept in its original condition in which you received them in.
- 2. Coupon codes expires after use and cannot be restored after return.
- 3. For personalized products, if you need to cancel or replace the product or replace the personalized content, you will have to pay 30% of the product price as the customization fee. (Special note: Even if you contact us immediately after placing the order to cancel/modify the order, we will charge the corresponding production fee because the customized product will be produced immediately once the order is placed in order to ensure a timely production and delivery. Thanks for you understanding.)
- 4. We reserve the right to make any changes to this policy at any time. Notification of any changes will be posted on this page. If you have any questions about cancellations or any of our other policies, please contact our customer service.



\n
\n\n\n\n
\nTRANSLATE with
\n
\n \n\n\n\n
\n\n","featured_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"featured_media":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},"handle":"spotify-code-personalized-building-brick-photo-block-frame","has_only_default_variant":false,"images":[{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078350","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078351","media_type":"image","position":3,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000}],"media":[{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6717363017560078350","media_type":"image","position":2,"preview_image":{"alt":"","id":"6717363017560078350","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6717363017560078351","media_type":"image","position":3,"preview_image":{"alt":"","id":"6717363017560078351","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false}],"options":["Size"],"options_by_name":{"Size":{"name":"Size","selected_value":null,"values":["Small (4.5*2.7inch)","Medium (5.6*3.9inch)","Large (6.9*5inch)"],"position":0,"values_images":[{"value":"Small (4.5*2.7inch)","image":null},{"value":"Medium (5.6*3.9inch)","image":null},{"value":"Large (6.9*5inch)","image":null}],"option_values":[{"id":"16267173630188734439393445","value":"Small (4.5*2.7inch)"},{"id":"16267173630188734439443445","value":"Medium (5.6*3.9inch)"},{"id":"16267173630188734439493445","value":"Large (6.9*5inch)"}]}},"options_with_values":[{"name":"Size","position":0,"selected_value":null,"values":["Small (4.5*2.7inch)","Medium (5.6*3.9inch)","Large (6.9*5inch)"],"values_images":[{"value":"Small (4.5*2.7inch)","image":null},{"value":"Medium (5.6*3.9inch)","image":null},{"value":"Large (6.9*5inch)","image":null}],"option_values":[{"id":"16267173630188734439393445","value":"Small (4.5*2.7inch)"},{"id":"16267173630188734439443445","value":"Medium (5.6*3.9inch)"},{"id":"16267173630188734439493445","value":"Large (6.9*5inch)"}],"specName":"Size"}],"price":1995,"price_max":2595,"price_min":1995,"price_varies":false,"requires_selling_plan":false,"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},"tags":["custom-sunzi-designer-v4","photo-block","pla-google-3","spotify-code"],"variants":[{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":4600,"featured_image":null,"featured_media":null,"id":"18067173630188734439423445","image":null,"option1":"Medium (5.6*3.9inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Medium (5.6*3.9inch)"],"price":2295,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY042C","taxable":false,"title":"Medium (5.6*3.9inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439423445","weight_in_unit":"80","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":5200,"featured_image":null,"featured_media":null,"id":"18067173630188734439473445","image":null,"option1":"Large (6.9*5inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Large (6.9*5inch)"],"price":2595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY043C","taxable":false,"title":"Large (6.9*5inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439473445","weight_in_unit":"120","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}}],"quantity_price_breaks_configured":false}
Enable collaborative features and customize widget: Bing Webmaster Portal
\n \n\nTRANSLATE with
\n
\n \n\n\n\n
\n\n","featured_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"featured_media":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},"handle":"spotify-code-personalized-building-brick-photo-block-frame","has_only_default_variant":false,"images":[{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078350","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078351","media_type":"image","position":3,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000}],"media":[{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6717363017560078350","media_type":"image","position":2,"preview_image":{"alt":"","id":"6717363017560078350","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6717363017560078351","media_type":"image","position":3,"preview_image":{"alt":"","id":"6717363017560078351","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false}],"options":["Size"],"options_by_name":{"Size":{"name":"Size","selected_value":null,"values":["Small (4.5*2.7inch)","Medium (5.6*3.9inch)","Large (6.9*5inch)"],"position":0,"values_images":[{"value":"Small (4.5*2.7inch)","image":null},{"value":"Medium (5.6*3.9inch)","image":null},{"value":"Large (6.9*5inch)","image":null}],"option_values":[{"id":"16267173630188734439393445","value":"Small (4.5*2.7inch)"},{"id":"16267173630188734439443445","value":"Medium (5.6*3.9inch)"},{"id":"16267173630188734439493445","value":"Large (6.9*5inch)"}]}},"options_with_values":[{"name":"Size","position":0,"selected_value":null,"values":["Small (4.5*2.7inch)","Medium (5.6*3.9inch)","Large (6.9*5inch)"],"values_images":[{"value":"Small (4.5*2.7inch)","image":null},{"value":"Medium (5.6*3.9inch)","image":null},{"value":"Large (6.9*5inch)","image":null}],"option_values":[{"id":"16267173630188734439393445","value":"Small (4.5*2.7inch)"},{"id":"16267173630188734439443445","value":"Medium (5.6*3.9inch)"},{"id":"16267173630188734439493445","value":"Large (6.9*5inch)"}],"specName":"Size"}],"price":1995,"price_max":2595,"price_min":1995,"price_varies":false,"requires_selling_plan":false,"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},"tags":["custom-sunzi-designer-v4","photo-block","pla-google-3","spotify-code"],"variants":[{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":4600,"featured_image":null,"featured_media":null,"id":"18067173630188734439423445","image":null,"option1":"Medium (5.6*3.9inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Medium (5.6*3.9inch)"],"price":2295,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY042C","taxable":false,"title":"Medium (5.6*3.9inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439423445","weight_in_unit":"80","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":5200,"featured_image":null,"featured_media":null,"id":"18067173630188734439473445","image":null,"option1":"Large (6.9*5inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Large (6.9*5inch)"],"price":2595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY043C","taxable":false,"title":"Large (6.9*5inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439473445","weight_in_unit":"120","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}}],"quantity_price_breaks_configured":false};
var addPrice = 0;
var curProduct = getCurProduct();
var compareProduct = productJSON.variants.find(variant => {
return curProduct.options.every((option, index) => {
if(index == variantIndex) {
return variant.options[index] !== option;
} else {
return variant.options[index] == option;
}
});
});
if(compareProduct) {
price = (curProduct.price - compareProduct.price) / 100;
addPrice = Math.abs(price.toFixed(2));
}
return addPrice;
}
/** sunzi 隐藏变体
* 如果index为undefined 隐藏所有变体
* 个别站点变体dom并非一种,可以在sunzi-config-customize中设置hideDom
**/
function _sunzi_variant_hide(index) {
// 如果没有参数,隐藏所有变体dom
if(index == undefined) {
var hideDomStr = _sunzi_global_data.domLabel.select;
Array.isArray(_sunzi_global_data.hideDom) && _sunzi_global_data.hideDom.forEach(item => hideDomStr += `, ${item}`);
$(hideDomStr).each((index, item) => {
$(item).hide();
$(item).removeClass('show');
});
} else {
var variantDom = _sunzi_find_variant(index);
if(variantDom) {
$(item).hide();
variantDom.removeClass('show');
}
}
}
/* sunzi 通用加车方法 **/
async function _sunzi_add_to_cart(params, quantity, callback) {
var data = params || _form.serialize();
// 修改产品数量
data.quantity = quantity || 1;
addCommonProperties(data);
addVariantFeaturedImage(data);
return new Promise(function(resolve, reject) {
$.ajax({
type: "POST",
url: "/api/carts/ajax-cart/add.js",
data: {
items: data
},
dataType: "json",
success: (item) => {
resolve(item);
},
error: (error) => {
reject(error);
}
})
})
}
// 多产品加车 data是数组
function _sunzi_add_to_cart_multi(data) {
if (data.length === 0) return;
addCommonProdcut(data)
data.forEach((item) => {
addCommonProperties(item);
addVariantFeaturedImage(item)
})
return new Promise((resolve, reject) => {
$.ajax({
type: "POST",
url: "/api/carts/ajax-cart/add.js",
data: JSON.stringify({
items: data
}),
contentType: 'application/json',
dataType: 'json',
context: this,
success: async (response) => {
// refresh cart data
Cart.refresh();
// show success drawer
var quantityHtml=` x
${$("#Quantity-main-product-info").val()}
`;
$(".trade-cart-sku-item-info-title.body2").html($(".title.shopline-element-title").text()+quantityHtml);
$("#cart-select").addClass("top-drawer--open").show();
$('.top-drawer__mask').bind("click",function(e){
if($(e.target).closest("#cart-select").length == 1){
$("#cart-select").removeClass("top-drawer--open").hide();
}
})
$(".trade-cart-banner--close").on("click",function(){
$("#cart-select").removeClass("top-drawer--open").hide();
})
resolve(response);
},
error: (request, status) => {
reject(request, status);
}
})
})
}
// 添加通用Properties
function addCommonProperties(mainProduct) {
const host = window.location.host
// soufeel补充language参数
if (host.includes("r39x33kmubdcsvja9i") || host.includes("soufeel")) {
const language = mainProduct.properties.find(item => item.name === "language")
if (language) return;
mainProduct.properties = [
...mainProduct.properties,
{
type: 'text',
name: 'language',
value: _sunzi_global_data["shop-v1"].language,
}
]
}
}
// 更改加车参数主图字段为变体图
function addVariantFeaturedImage(mainProduct){
mainProduct.properties.forEach((property)=>{
if(property.name == 'featured_image'){
property.value = getCurProduct('featuredImage')
}
})
}
// 寻找主产品
function findMainProduct(data) {
let mainProduct = undefined;
let mainProductId = undefined;
if (data.length === 1) {
mainProduct = data[0];
const bindId = mainProduct.properties.find(item => item.name === "_bind")
if (bindId) mainProductId = bindId.value;
else {
mainProductId = _create_uuid();
mainProduct.properties = [
...mainProduct.properties,
{
type: 'text',
name: '_bind',
value: mainProductId,
}
]
}
} else {
data.some((productItem) => {
const bindId = productItem.properties.find(item => item.name === "_bind")
if (bindId) {
mainProduct = productItem;
mainProductId = bindId.value;
return true;
} else return false;
})
}
return {mainProduct, mainProductId}
}
// 添加通用加购
function addCommonProdcut(data) {
// 新版追销参数
// 数量控制
var chaseBindQuantity = {
"allow": 101,
"not_allow": 102,
"follow": 103
}
// 删除控制
var chaseBindAloneDelete = {
"allow": 201,
"not_allow": 202
}
// 寻找主产品
const { mainProduct, mainProductId } = findMainProduct(data)
if (mainProduct && mainProductId) {
// 判断加购
const isChecked = $('#insuranceBox').prop('checked');
let queue=[]
if (isChecked) {
const value = $('#insuranceBox').val();
// let _sunzi_related_productsItem= data[0].properties.find(item=>{
// return item.name==='_sunzi_related_products'
// })
// if(_sunzi_related_productsItem){
// let _value=JSON.parse(data[0].properties['_sunzi_related_products'].value)
// data[0].properties['_sunzi_related_products']={
// ...data[0].properties['_sunzi_related_products'],
// value:JSON.stringify(_value.push(uuid))
// }
// }
// else{
// data[0].properties.push({
// type: "text",
// name: "_sunzi_related_products",
// value: JSON.stringify([uuid])
// })
// }
queue.unshift({
"id":value,
properties:[{
type: 'text',
name: '_bindTo',
value: mainProductId,
}, {
type: 'text',
name: '_bindQuantity',
value: chaseBindQuantity.not_allow,
}, {
type: 'text',
name: '_bindAloneDelete',
value: chaseBindAloneDelete.allow,
}],
"quantity": 1,
});
}
data.push(...queue)
}
}
/** sunzi 获取当前变体数据 **/
function getCurProduct(type) {
// 产品数据
var product = {"brand":"makephotopuzzle","created_at":"2024-11-04T17:55:45.582+08:00","gift_card":false,"id":"16067173630183701274463445","published_at":"2024-11-04T17:55:45.664+08:00","title":"Spotify Code Personalized Building Brick Photo Block Frame","type":"Puzzles","url":"/products/spotify-code-personalized-building-brick-photo-block-frame","vendor":"makephotopuzzle","available":true,"compare_at_price":4000,"compare_at_price_max":5200,"compare_at_price_min":4000,"compare_at_price_varies":false,"description":"Personalized photo block prints make the perfect gift for a friend, teacher coworker or family member. Whoever they're for these large photo blocks make the perfect gift.Enable collaborative features and customize widget: Bing Webmaster Portal
\n \nPrinted using the very latest UV digital print technology for vibrant long lasting colour, this free-standing or wall mounted display can be dismantled and re-assembled for a fun interaction with the Personalized print.
Building brick photo block Features:
Unique interlocking brick display
Vibrant UV Print
A durable, wipeable finish
\n
\n
","featured_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"featured_media":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},"handle":"spotify-code-personalized-building-brick-photo-block-frame","has_only_default_variant":false,"images":[{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078350","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078351","media_type":"image","position":3,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000}],"media":[{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6717363017560078350","media_type":"image","position":2,"preview_image":{"alt":"","id":"6717363017560078350","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6717363017560078351","media_type":"image","position":3,"preview_image":{"alt":"","id":"6717363017560078351","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false}],"options":["Size"],"options_by_name":{"Size":{"name":"Size","selected_value":null,"values":["Small (4.5*2.7inch)","Medium (5.6*3.9inch)","Large (6.9*5inch)"],"position":0,"values_images":[{"value":"Small (4.5*2.7inch)","image":null},{"value":"Medium (5.6*3.9inch)","image":null},{"value":"Large (6.9*5inch)","image":null}],"option_values":[{"id":"16267173630188734439393445","value":"Small (4.5*2.7inch)"},{"id":"16267173630188734439443445","value":"Medium (5.6*3.9inch)"},{"id":"16267173630188734439493445","value":"Large (6.9*5inch)"}]}},"options_with_values":[{"name":"Size","position":0,"selected_value":null,"values":["Small (4.5*2.7inch)","Medium (5.6*3.9inch)","Large (6.9*5inch)"],"values_images":[{"value":"Small (4.5*2.7inch)","image":null},{"value":"Medium (5.6*3.9inch)","image":null},{"value":"Large (6.9*5inch)","image":null}],"option_values":[{"id":"16267173630188734439393445","value":"Small (4.5*2.7inch)"},{"id":"16267173630188734439443445","value":"Medium (5.6*3.9inch)"},{"id":"16267173630188734439493445","value":"Large (6.9*5inch)"}],"specName":"Size"}],"price":1995,"price_max":2595,"price_min":1995,"price_varies":false,"requires_selling_plan":false,"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},"tags":["custom-sunzi-designer-v4","photo-block","pla-google-3","spotify-code"],"variants":[{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":4600,"featured_image":null,"featured_media":null,"id":"18067173630188734439423445","image":null,"option1":"Medium (5.6*3.9inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Medium (5.6*3.9inch)"],"price":2295,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY042C","taxable":false,"title":"Medium (5.6*3.9inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439423445","weight_in_unit":"80","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":5200,"featured_image":null,"featured_media":null,"id":"18067173630188734439473445","image":null,"option1":"Large (6.9*5inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Large (6.9*5inch)"],"price":2595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY043C","taxable":false,"title":"Large (6.9*5inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439473445","weight_in_unit":"120","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}}],"quantity_price_breaks_configured":false};
// 当前产品id
var queryId = getQueryVariable('sku');
var variantId = $('[name="id"]').val() || queryId || product.variants[0].id;
var curProduct = product.variants.find(item => item.id == variantId);
var result = ''
switch(type) {
case 'featuredImage':
var _image = curProduct.featured_image ? curProduct.featured_image.src : product.featured_image.src;
//result = _image.replace(/\?[a-zA-Z0-9=]+/, '');
result = _image.split('?')[0]
break;
case 'price':
result = Number((curProduct.price / 100).toFixed(2));
break;
case 'originPrice':
var originPrice = curProduct.compare_at_price;
result = originPrice ? Number((originPrice / 100).toFixed(2)) : 100;
break;
case 'sku':
result = curProduct.sku
break;
default:
result = curProduct;
}
console.log("result",result)
return result;
}
/** 创建uuid **/
function _create_uuid() {
var s = [];
var hexDigits = '0123456789abcdef';
for (var i = 0; i < 36; i++)
s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
s[14] = '4';
s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);
s[8] = s[13] = s[18] = s[23] = '-';
return s.join('');
}
// 获取地址栏参数
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split("&");
for (var i=0;i\n
\n\nTRANSLATE with
x\n
\n\n
\n\n\n English\n
\n\n\n
\n\n
\n\n\n\n
\n
\n
\nArabic | \nHebrew | \nPolish | \n
Bulgarian | \nHindi | \nPortuguese | \n
Catalan | \nHmong Daw | \nRomanian | \n
Chinese Simplified | \nHungarian | \nRussian | \n
Chinese Traditional | \nIndonesian | \nSlovak | \n
Czech | \nItalian | \nSlovenian | \n
Danish | \nJapanese | \nSpanish | \n
Dutch | \nKlingon | \nSwedish | \n
English | \nKorean | \nThai | \n
Estonian | \nLatvian | \nTurkish | \n
Finnish | \nLithuanian | \nUkrainian | \n
French | \nMalay | \nUrdu | \n
German | \nMaltese | \nVietnamese | \n
Greek | \nNorwegian | \nWelsh | \n
Haitian Creole | \nPersian | \n\n |
\n
\nTRANSLATE with
\n
\n \n\n\n\n
\n\nEnable collaborative features and customize widget: Bing Webmaster Portal
\n \n\n\n
\nTRANSLATE with
\n
\n \n\n\n\n
\n\n","featured_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"featured_media":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"first_available_variant":{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},"handle":"spotify-code-personalized-building-brick-photo-block-frame","has_only_default_variant":false,"images":[{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078350","media_type":"image","position":2,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000},{"alt":"","id":"6717363017560078351","media_type":"image","position":3,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000}],"media":[{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":{"alt":"","id":"6717363017560078349","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY112-a1d42534-2d80-467d-a8b6-8fd8066a4252.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6717363017560078350","media_type":"image","position":2,"preview_image":{"alt":"","id":"6717363017560078350","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-1-32def59b-0314-48e7-ac42-938a7db9dc71.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false},{"alt":"","id":"6717363017560078351","media_type":"image","position":3,"preview_image":{"alt":"","id":"6717363017560078351","media_type":"image","position":1,"preview_image":null,"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000},"aspect_ratio":"1.0000","attached_to_variant":false,"height":1000,"product_id":"16067173630183701274463445","src":"https://img.myshopline.com/image/store/1730686904760/CTOY039A-2-d9c5dfbb-5b3c-4363-a0b7-cb458d02a255.jpg?w=1000&h=1000","variants":[],"width":1000,"variant_image":false}],"options":["Size"],"options_by_name":{"Size":{"name":"Size","selected_value":null,"values":["Small (4.5*2.7inch)","Medium (5.6*3.9inch)","Large (6.9*5inch)"],"position":0,"values_images":[{"value":"Small (4.5*2.7inch)","image":null},{"value":"Medium (5.6*3.9inch)","image":null},{"value":"Large (6.9*5inch)","image":null}],"option_values":[{"id":"16267173630188734439393445","value":"Small (4.5*2.7inch)"},{"id":"16267173630188734439443445","value":"Medium (5.6*3.9inch)"},{"id":"16267173630188734439493445","value":"Large (6.9*5inch)"}]}},"options_with_values":[{"name":"Size","position":0,"selected_value":null,"values":["Small (4.5*2.7inch)","Medium (5.6*3.9inch)","Large (6.9*5inch)"],"values_images":[{"value":"Small (4.5*2.7inch)","image":null},{"value":"Medium (5.6*3.9inch)","image":null},{"value":"Large (6.9*5inch)","image":null}],"option_values":[{"id":"16267173630188734439393445","value":"Small (4.5*2.7inch)"},{"id":"16267173630188734439443445","value":"Medium (5.6*3.9inch)"},{"id":"16267173630188734439493445","value":"Large (6.9*5inch)"}],"specName":"Size"}],"price":1995,"price_max":2595,"price_min":1995,"price_varies":false,"requires_selling_plan":false,"selected_variant":null,"selected_or_first_available_variant":{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},"tags":["custom-sunzi-designer-v4","photo-block","pla-google-3","spotify-code"],"variants":[{"available":true,"barcode":null,"compare_at_price":4000,"featured_image":null,"featured_media":null,"id":"18067173630188734439363445","image":null,"option1":"Small (4.5*2.7inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Small (4.5*2.7inch)"],"price":1995,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY041C","taxable":false,"title":"Small (4.5*2.7inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439363445","weight_in_unit":"45","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":4600,"featured_image":null,"featured_media":null,"id":"18067173630188734439423445","image":null,"option1":"Medium (5.6*3.9inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Medium (5.6*3.9inch)"],"price":2295,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY042C","taxable":false,"title":"Medium (5.6*3.9inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439423445","weight_in_unit":"80","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}},{"available":true,"barcode":null,"compare_at_price":5200,"featured_image":null,"featured_media":null,"id":"18067173630188734439473445","image":null,"option1":"Large (6.9*5inch)","option2":null,"option3":null,"option4":null,"option5":null,"options":["Large (6.9*5inch)"],"price":2595,"requires_selling_plan":false,"requires_shipping":true,"selected":false,"selling_plan_allocations":[],"sku":"CTOY043C","taxable":false,"title":"Large (6.9*5inch)","url":"/products/spotify-code-personalized-building-brick-photo-block-frame?sku=18067173630188734439473445","weight_in_unit":"120","weight_unit":"g","inventory_management":false,"inventory_policy":"deny","inventory_quantity":0,"quantity_rule":{"increment":1,"min":1,"max":null}}],"quantity_price_breaks_configured":false};
_sunzi_request(`https://sunzi-cool.staticmeow.com/product/customizer/json/shopline-${product.id}.json`, function(data) {
// 当前激活变体信息
var availableVariant = getCurProduct();
// 初始变体信息
var defaultVariantValue = product.options.map((item, index) => [item, availableVariant.options[index]]);
// 商城变体集合 用来给设计器提供价格和sku对照
const shopVariants = product.variants.map((item) => ({
options: item.options && item.options.length ? item.options : 'Default',
price: item.price / (platform == 'shopline' ? 100 : 1),
compareAtPrice: item.compare_at_price / (platform == 'shopline' ? 100 : 1),
featuredImage: getVariantOrProductImage(item, product),
available: item.available,
sku: item.sku
}));
Designer.render(
Designer.default,
{
...data,
title: product.title,
defaultVariantValue,
shopVariants,
productTags: product.tags,
env: 'prod',
productId: product.id,
beforeCustomButtonClick() {
clearReplenishFormInpput();
return true;
},
onVariantChange(data) {
data.forEach(function(item, index) {
if (item){
var _variantValue = item.value;
_variantValue && _sunzi_variant_change_name(item.name, _variantValue.name);
}
});
},
async onConfirm(output, effects, { sku, uniqid, relatedProducts, addedCharges }) {
// 唤醒loading
_sunzi_loading();
// 创建主产品 properties 给主产品增加一个绑定标识
const mainProductProperties = [
{
type: 'text',
name: "customInfo",
value: JSON.stringify(output),
},
{
type: 'text',
name: "_from",
value: "sunzi-designer",
},
{
type: 'text',
name: '_bind',
value: uniqid
},
{
type: 'text',
name: "_sunzi_cart",
value: JSON.stringify({
image: effects
}),
}
];
// 加车队列
const _queue = [];
// 主产品追销绑定
// const productChases = []
// 处理关联产品逻辑
if (relatedProducts.length > 0) {
const _relatedProducts = relatedProducts.forEach(item => {
if (item.type === SUNZI_RelatedProductItemType.product) { // 普通产品
item.products.forEach(product => {
const params = handleRelatedProducts(product, item, uniqid, {
properties: [{
type: 'text',
name: "_sunzi_chase_from",
value: sku,
}]
});
_queue.push(params);
// 如果存在与主产品绑定 TODO 已经弃用 后续删掉
// if (item.bind) productChases.push(product.sku);
// 如果与主产品存在绑定字段
if (item.bindKey){
// 临时解决自动生产图标识问题
if (item.bindKey === 'convert_color_sku') {
delete output._sunzi_auto_compose;
const customInfoData = mainProductProperties.find(item => item.name === "customInfo");
if (customInfoData) customInfoData.value = JSON.stringify(output);
}
mainProductProperties.push({
type: 'text',
name: `${item.bindKey}`,
value: product.sku
});
}
});
} else if (item.type === SUNZI_RelatedProductItemType.virtualProduct) { // 虚拟产品
item.products.forEach(product => {
// 给主产品注入依赖参数
mainProductProperties.push({
type: 'text',
name: `${item.serviceType}`,
value: item.serviceTypeValue
});
const params = handleRelatedProducts(product, item, uniqid, {
properties: [{
type: 'text',
name: "_sunzi_chase_from",
value: sku,
}]
});
_queue.push(params);
});
} else if (item.type === SUNZI_RelatedProductItemType.customProduct) { // 定制产品
item.products.forEach(product => {
const params = handleRelatedProducts(product, item, uniqid, {
properties: [{
type: 'text',
name: "_sunzi_chase_from",
value: sku,
}]
});
_queue.push(params);
});
}
});
}
// 处理加价产品逻辑
if (addedCharges) {
addedCharges.forEach(item => {
const params = handleRelatedProducts(item, {
bind: true,
bindQuantity: 103, // 数量跟随主产品
bindAloneDelete: 202 // 不可以单独删除
}, uniqid, {
quantity: item.quantity,
properties: [{
type: 'text',
name: '_sunzi_chase_from',
value: sku,
}],
});
_queue.push(params);
});
}
// 注册主产品追销字段
// if (productChases.length > 0) replenishFormInput({ name: "properties[_sunzi_bind_chase]", value: JSON.stringify(productChases) });
// 获取定制参数
const currentVariantInfo = getCurProduct();
// 加车主产品
_queue.push({
id: currentVariantInfo.id,
properties: mainProductProperties,
});
$('#sunzi-input').val(JSON.stringify(output));
$('#sunzi-cart').val(JSON.stringify({
image: effects
}));
// 加车事件触发
await _sunzi_add_to_cart_multi(_queue.map(item => Object.assign({ quantity: 1 }, item)));
$('#sunzi-loading').hide();
}
},
document.getElementById("sunzi-node"),
{ enabledSentry: false }
);
});
/** 其他自定义函数 start **/
// 根据不同平台获取变体或者产品图
function getVariantOrProductImage(variant, product) {
return variant.image ? variant.image.src : (product.featured_image ? product.featured_image.src : undefined);
}
// 表单补充input
function replenishFormInput(data) {
const input = document.createElement('input');
Object.keys(data).map(key => {
input[key] = data[key];
});
input.type = 'hidden';
input.id = 'sunzi-replenish';
$('.sunzi-form').append(input);
}
// 清空表单
function clearReplenishFormInpput() {
$('#sunzi-replenish').remove();
}
// 处理关联产品逻辑
function handleRelatedProducts(product, related, uniqid, options = {}) {
const data = Object.assign({
id: product.variantId,
quantity: 1,
}, options);
// 如果产品与主产品进行绑定的话
if (related.bind) {
data.properties.push(
{
type: 'text',
name: '_bindTo',
value: uniqid,
},
{
type: 'text',
name: '_bindQuantity',
value: related.bindQuantity,
},
{
type: 'text',
name: '_bindAloneDelete',
value: related.bindAloneDelete,
}
);
// 与主产品绑定的key, 当该关联产品产品删除时, 要清掉对应主产品的关联参数
if (related.serviceType || related.bindKey) {
data.properties.push({
type: 'text',
name: '_bindKey',
value: related.serviceType || related.bindKey,
})
};
}
// 处理定制追销逻辑
if (related.type === SUNZI_RelatedProductItemType.customProduct) {
data.properties.push(
{
type: 'text',
name: '_from',
value: "sunzi-designer",
},
{
type: 'text',
name: 'customInfo',
value: JSON.stringify(related.customInfo),
},
{
type: 'text',
name: '_sunzi_cart',
value: JSON.stringify({
image: related.effects
}),
}
);
}
// 处理实体加购 定制模块逻辑
if (related.type === SUNZI_RelatedProductItemType.product && related.customInfo) {
data.properties.push(
{
type: 'text',
name: '_from',
value: "sunzi-designer",
},
{
type: 'text',
name: 'customInfo',
value: JSON.stringify(Object.assign({
featured_image: product.featuredImage
}, related.customInfo)),
}
);
}
return data;
}
// 悬浮按钮出现消失逻辑
$( document ).ready(function() {
createObserver();
});
function createObserver() {
let target = document.getElementsByClassName("sunzi-form")[0];
function callback(entries, observer) {
entries.forEach((entry) => {
if(entry.boundingClientRect.top < 0 || entry.intersectionRatio > 0){
// 出现
$(target).addClass("show")
} else {
// 消失
$(target).removeClass("show")
}
});
}
let options = {
root: null,
rootMargin: "0px",
threshold: 0,
};
let observer = new IntersectionObserver(callback, options);
observer.observe(target);
}
/** 其他自定义函数 end **/
Enable collaborative features and customize widget: Bing Webmaster Portal
\n \n