All things Shopify and commerce
I'm trying to add this code to my shopify product page :
<div class="product-form__item product-form__item--logo">
<label for="custom_photo">Upload image</label>
<input required id="custom_photo" type="file" name="properties[Logo]" class="product-form__input">
</div>
it did work and showing up but the issue is when i click add to cart there is no image id and when the customer checkout i receive no image + customers can add to cart without uploading an image like if it not required like if it doesn't work
please help it's rider theme i'm using (similar to dawn theme )
Hi, @nsr.
Rio here from the Shopify Community team.
Could you let me know more about your workflow? I'm happy to see if there is a free app that does this.
Where did you want the image to be sent once the customer uploads it for the product? If you can share more about the workflow after the customer uploads to the product page, I'm happy to look into this for you.
Rio | Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
i just want it to be with the order .
i used to work with that code in brooklyn theme and everything was fine the costumer upload the image and have it in the cart then when he complete payment i receive it with the order in the order section, but with this new dawn theme things got a little bit confusing !
I think the file image upload input field has to be associated with the form. Try putting this attribute in the input field so that you receive it when adding to cart: form="product-form-{{ section.id }}".
where should i add that attribute with the current code in the product page ??
like this ?
<form id="product-form-{{ section.id }}" >
<div class="product-form__item product-form__item--logo">
<label for="custom_photo">Upload image</label>
<input required id="custom_photo" type="file" name="properties[Logo]" class="product-form__input" form="product-form-{{ section.id }}">
</div>
</form>
Hi, Yes it looks like you have it as a property for the input field so it looks correct to me.
I had the same issue. Thing is, it HAD worked properly in the past, but suddenly stopped. What made it work again was turning mini-cart OFF. (This was with Turbo theme.) Once I switched to any other type of cart, image uploads began working as expected.
how do i turn it off ?
In theme editing, go to theme settings, select Cart, and if your theme gives you choices for type of cart, you will see them there.
sadly my theme don't have it :'(
I've given mine a class="line-item-property__field" - have you tried doing that?
<p class="line-item-property__field">
<label for="image_upload">Attach Image</label>
<input id="image_upload" type="file" name="properties[Image Upload]">
</p>
Check out this video if you are still looking for a solution
Goodafternoon
where can I find the coding (for the reguired photo, so I can copy paste it
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024