Developers of Shopify, help a junior programmer please. Collect additional information from client?

Highlighted
New Member
5 0 0

Hi all, I hope you all are doing great.

I have developer experince, mostly on Java. On the other hand, I did not do any shopify or web development in the past. I am trying to help my dad improve the store for his business.

For some products he is selling, he wants to collect additional information when the customer clicks to add to cart. The flow is following.

1- The client clicks to add items to the cart.

2- If the product is "special" then an additional pop-up form shows up and asks for additional information.

3- Then the information from the previous form needs to be saved permanently and stored on the server and never asked again.

How would you approach this problem? Would you save the information form client on shopify servers (user metadata)? Would you write a custom app with its own database and server?

How would you approach to this problem?

Thanks.

 

0 Likes
Highlighted
Shopify Partner
21 1 2

1- The client clicks to add items to the cart.

Check.

 

2- If the product is "special" then an additional pop-up form shows up and asks for additional information.

Easiest approach is customize theme code. You might be able to use this library: https://cartjs.org/

But you would need javascript that listens for some HTML property that gets triggered onClick/onAddToCart. Then it's standard HTML/CSS/JS to configure a modal that has additional form items. Orders can have metafields, so you can find a way to connect the modal to updating an order's metafields.

 

3- Then the information from the previous form needs to be saved permanently and stored on the server and never asked again.

This one is up to you how you handle it. If you want it to never show up again, probably order metafields aren't the way to go -- a new order will trigger it again. You might want your own server that keeps track of this specifically.

 

Hope that helps you a bit.

0 Likes
Shopify Partner
145 2 34

Hi @relativelynew,

This is not what you asked for in your requirements but I just wanted to propose an alternative and probably easier solution that might address points 1 and 2.

On the product page you can have different templates. You can create an alternative product page template for your "special" products.

On this product page template, you could have the additional fields directly on the product page without the need for a popup when the add to cart button is pressed. Additional form fields are passed along in the order data.

The only problem is that this data wouldn't be saved for the next time the customer purchases so you would need to create a custom app for that.

If you could save the data with an app as metadata, I'm sure you could load the metadata for the customer and pre-populate these form fields using liquid.

Best regards,

Asa @ Appifiny

Try the best recent order app for Shopify free for 7 days: https://apps.shopify.com/recently
0 Likes
Highlighted
Tourist
24 0 1

If you're in a rush and want minimal obstacles:

I would recommend finding an email marketing or CRM (Customer Relations Management) service that allows you to create forms with custom fields. Mailchimp is one, but I'm there are many others. That service would store your customer data on their server and you wouldn't need to manage it directly. These services often have very handy tools built in, like the ability to export your data, view it nicely, or back it up incase something gets accidentally deleted.

If you want to trudge through hell and back (a few times):

You could learn how to program an app which sends this data to a managed database (which you would also be responsible for). That said, unless you pay out the nose for someone at Google or Amazon to manage your database for you, you'll have to learn how to manage databases, back them up, send data to them, retrieve data from them, etc.

Additionally, programming and deploying a program to a server are different, yet related skills. Provisioning a server, keeping it somewhat secure, and then encrypting the data which transmits to it is also a necessary chunk of work for this project. There are often multiple teams of people responsible for these various sections of work, and you will be expected to do them alone (or with whatever help you can find). Understand that nothing is as simple as it's made to seem.

The learning curve is steep, in my opinion, but you won't see technology the same if you take this path. It is definitely the educational route.

0 Likes