PhoebeT42 Posted October 25, 2021 Posted October 25, 2021 Hi, how do I add an image to a specific custom product form? Thanks!
creedon Posted October 25, 2021 Posted October 25, 2021 When you say custom product form, is this a form that is added to a product through the product editor interface? Please post the URL for a page on your site where we can see your issue. If your site is not public please set up a site-wide password, if you've not already done so. Post the password here. Adding a site-wide password is not a security breach. Please read the documentation at the link provided to understand how it works. Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. We can then take a look at your issue. PhoebeT42 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
PhoebeT42 Posted October 25, 2021 Author Posted October 25, 2021 Thanks for your reply. Here's the link: https://www.typesetfortwo.com/christmas-collection/p/christmasyall When you click "add to cart" a form pops up. I'd like to add an image on that form, it's a form on a product page. Is this possible?
creedon Posted October 25, 2021 Posted October 25, 2021 It is possible. Are you thinking something like the following? PhoebeT42 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
PhoebeT42 Posted October 26, 2021 Author Posted October 26, 2021 Yes! It would an image of the back of the card (so the customer can choose a design) but yes, that's exactly what I need. Thank you!
Solution creedon Posted October 26, 2021 Solution Posted October 26, 2021 (edited) Add the following to Store Settings > Advanced > Page Header Code Injection for the store page. <style> /* begin product form image add Version : 0.1d0 SS Version : 7.1 By : Thomas Creedon < http://www.tomsWeb.consulting/ > */ [data-form-id="5f8f0e40d03aaf4e9a88476d"]::before { background-image : url( https://images.squarespace-cdn.com/content/v1/5e27638ae410453315a6e06d/1603938096141-627PII0Z3UEWX8XOFPDO/TypesetForTwo-ChristmasYall+back1.jpg ); background-position : center; background-repeat : no-repeat; background-size: contain; content : ''; display : block; height : 300px; margin-bottom : 24px; } /* end product form image add */ </style> This code is specific to the poster's need. You'll want to replace the example background image url with your image url. Also you may want to change the height value. Let us know how it goes. Edited October 26, 2021 by creedon PhoebeT42 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
PhoebeT42 Posted October 27, 2021 Author Posted October 27, 2021 This worked perfectly! Thank you so much! One other question. Is it possible to have different images on different forms. For example, I added an image to the form for my vertical cards but I need a different image for my horizontal cards on that respective form. Is that possible? Even if I create its own form how do I point the image each to the specific form?
creedon Posted October 27, 2021 Posted October 27, 2021 It may be possible. If you altered the code by duplicating the code and changing the data-form-id value to the appropriate value for the new form then you could associate a new image with that form. Basically the current code associates one image with one form. Without a specific example of a product with this alternate form it is hard to be more specific. It would also help to know the URL of the image you want at the the top of the form. PhoebeT42 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
PhoebeT42 Posted October 27, 2021 Author Posted October 27, 2021 (edited) Thanks again for your response, I really appreciate your time. Here's the URL for to the page with the new form: https://www.typesetfortwo.com/christmas-collection/p/blessings Here's the URL for the image for the new form: https:// images.squarespace-cdn.com/content/v1/5e27638ae410453315a6e06d/a9fbbff1-52fe-48ff-9dfe-2e9af78799f3/Christmas2021-BACK-Layout-HORI.jpg Edited October 27, 2021 by PhoebeT42
creedon Posted October 27, 2021 Posted October 27, 2021 If you duplicate the code above and replace 5f8f0e40d03aaf4e9a88476d with the following 6178d859046d482a1c34bce8. Then the form for this product can have a different image than the other product pop-up form. Let us know how it goes. PhoebeT42 1 Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
PhoebeT42 Posted October 28, 2021 Author Posted October 28, 2021 Woo hoo! It works perfectly. Thanks again! creedon 1
manufacture_wagram Posted March 27, 2022 Posted March 27, 2022 Hi, I wanted to do the same thing on my website, so I tryed coping your code where indicated and changing the img url. It didn't work... Should I change the data-form id aswell ? if yes, where do I find my id ? Thanks in advance :)
creedon Posted March 27, 2022 Posted March 27, 2022 15 minutes ago, manufacture_wagram said: Should I change the data-form id aswell ? if yes, where do I find my id ? Yes. Finding the id involves using the browser developer tools which can't be explained in a few sentences. Please post the URL for a page on your site where we can see your issue. If your site is not public please set up a site-wide password, if you've not already done so. Post the password here. Adding a site-wide password does not allow anyone to alter your site. It only allows those with the password to see your site. Please read the documentation at the link provided to understand how it works. Please read the documentation at the link provided on how to share a link to your site to understand how it works. A link to the backend of the your site won’t work for us, i.e. a url that contains /config/. We can then take a look at your issue. Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.
manufacture_wagram Posted March 28, 2022 Posted March 28, 2022 Hey thanks for getting back to me 🙂 I managed to find the ID in the developper tool and it works perfectly ! Thanks a lot ! 💯 creedon 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment