I recently worked on a store where a requirement is generated to create a new products from front of the website based on user choices and options.
I was planning to hit Jquery.post on button click to create a product in backend. Is any help or example of something similar ? looking forward for a decent help.
thanks a lot in advance.
Don't use jQuery on the frontend, as this will require exposing your API key and secret on the frontend as well.
I recommend using an app proxy, which allows you to send requests from the frontend of a Shopify store to a remote server. It includes a verification mechanism as well, so you can be sure the request originated from the store. With an app proxy you can create an app that receives requests from the storefront app proxy. Your app can then use the data from that request to make an API call to Shopify. Making the call from your app server instead of jQuery ensures your API credentials remain secured.