Can you add code that will affect your product?

Hey, I have a product that I want to sell but I’m using an external API to add another “property” to the item that is being bought which will affect the way it looks (in design as well);

The usage of this external API is used by the customer.

Is there a way to do this with shopify?

1 Like

Hi @noamski ,

Are you talking about a customizer? If the external API provide you a customization and will render the customization in your page, you can create a template to do so and pass the properties on the cart so you know what product the customer has bought

1 Like

Yes! For example i would like to add an input for users to search something, and based on the result returned it will add it as a customization option to my item

Is the right way to handle my use case is with a customizer?

Hi @noamski ,

I was under the impression that you are using an external API as a customizer. If so, you should be able to use that for any input you need

1 Like

I’m fairly new at shopify so I’ll try to clarify my specific usecase.

My usecase is:

a customer types in an input → this calls an external API → api brings back results that are shown to the merchant → the customer selects an option that will update the product property based on that.

You should be able to add a javascript function that listens and will be able to return the result. You will need to have a developer do this for you

1 Like

I’m a developer myself, however I’m just inexperienced with how to add that to a Shopify store, would i have to create a custom app for that?

Oh. I misunderstood. Depending on what your external API does. You might not need a custom app for that. You can also integrate the function in the theme js file.

Not sure why you need an external API unless you are using an external library but if it just all functions and functions does not need to be private, I would recommend just add this in the theme.