Re: Need help inserting upload button for certain variant

Need help inserting upload button for certain variant

Log
Tourist
9 0 1

Hi,

I was previously using an app to manually insert that certain products would have a upload button if you choose to click a certain variant of the product so we can paint the product according to the photos that the customer uploaded.

However I quickly realised that it would take so long time to manually insert that using the app so I am in need of help on how to automatize so that every variant X will have an upload button so the customer can attach photos which we can paint according to.

TLDR: Need help inserting upload button so customer can attach photos which we will paint the product after.

Best regards
Log

Replies 10 (10)

LuffyOnePiece
Shopify Partner
642 93 116

Hi @Log ,

 

Add the following code to main-product.liquid  product forms:

<div>
  <input type="file" id="file" name="properties[File]" form="{{ product_form_id }}">
  <label class="field__label" for="file">Custom Image</label>
</div>

 


If you require further help to optimize or customize your store, please don’t hesitate to reach out. If you find this information useful, a Like would be greatly appreciated. And if this solves the problem, please Mark it as Solution!

 

Best Regards,
LuffyOnePiece

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184
Log
Tourist
9 0 1

Hi Luffy. How do I choose which variant it will be applied to?

Best regards
Log

LuffyOnePiece
Shopify Partner
642 93 116

Hi @Log ,

 

Whichever the user selects the variant, the image will be selected for that selected variant.

 

If we need to allow the user to uplaod an image to only specific variant, we need to custom code for that.

 

Thank you

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184
Log
Tourist
9 0 1

Will it apply to all products of said variant when the attached code is inserted into main-product.liquid?

Also, where will the uploaded images be sent? Does the attached code understand it is part of an order?

Best regards
Log

LuffyOnePiece
Shopify Partner
642 93 116

Hi @Log ,

 

It will be applied to all the products when the attached code is inserted into main-product.liquid inside product form.

Also remove the Content-Type as we're no long passing a json as the request's body.

The image will be sent as a line item properties of the product.

 

Thank you

 

 

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184
Log
Tourist
9 0 1

It needs to be custom code because I do not want all my products to have the upload button, only if you click this variant the upload button should show up

Best regards
Log

LuffyOnePiece
Shopify Partner
642 93 116

Hi @Log ,

 

I can help you with the custom code.

Please let me know if you need help with the store customization.

 

Thank you

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184
Log
Tourist
9 0 1

Which price? @LuffyOnePiece 

LuffyOnePiece
Shopify Partner
642 93 116

Hi @Log ,

 

You can contact me by email or WhatsApp for further queries.

 

Thank you

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184

EasifyApps
Shopify Partner
635 19 46

Hi @Log,

You should try out the Easify Product Options app. It allows you to seamlessly integrate a File Upload option for specific product variants in your store. With its Advanced conditional logic, you can easily determine which variants trigger the custom file upload feature. Setting it up takes just a few minutes. Here's a quick example for you 🤗:

  • Storefront:

EasifyApps_1-1713173398904.png

EasifyApps_2-1713173410663.png

 

  • App Settings:

EasifyApps_0-1713173350792.png

 

Hope you can give the app a try!

EASIFY - MAKING SHOPIFY SIMPLE & SWEET!
Easify Product Options: Create custom product options 10X faster & easier!
Easify Product Attachments: Effortlessly add downloadable PDF files (or any other format) to Shopify pages!
Try for Free | 24/7 Live Chat Support