How can I Display data on an online store from the app server?

mohinpatwary

Mohin patwary

Posted on November 13, 2020

How can I Display data on an online store from the app server?

How can I Display data on an online store from the app server? I got a guideline, app proxy. but I cannot understand that.

I have created an admin Dashboard for the app following your tutorial. I created successfully a snippet file on the current Shopify theme using asset API. I can pass any HTML code as a snippet file value. This means I can pass any HTML or liquid code in the snippet file. That snippet file was created from my app.

I've added some settings fields for my app. And I can save data into my database.https://prnt.sc/vf6fjp

Now I want to create a REST API to show the data for the Shopify client store. I created an API route.https://prnt.sc/vf6cjs
For API I have created a Controller. https://prnt.sc/vf6dlu

On the controller for the API, I need to run a query based on the same customer ID and the same Shopify shop name to get data from my database. In my database, I saved customer id and shop Name, and product id.

Now, How can I get a Shopify shop name and customer ID in the laravel controller?
So, I can run a SQL query using Shopify shop name and customer-id to get data from my database.

I can easily manage JavaScript to get the name of Shopify Shop. Example: Shopify.shop
But how can I customer ID? The customer who logged in and saved the wishlist product.

Also, How can I write javascript in laravel controller or how can I access javascript value in the laravel controller?

I really need this assistance, I am trying to for the last few days. But I cannot find a solution.

Please sir help me

Thank you

💖 💪 🙅 🚩
mohinpatwary
Mohin patwary

Posted on November 13, 2020

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related