We are having issues connecting a Shopify Theme (inside a Liquid file) to a Shopify App.
In general, our issue is that Liquid does not support receiving additional information from the B2B catalogs. To address this, we would like to write our own endpoint and call it from within Liquid. Upon receiving the data, we want to display it. For this reason, we will create a section inside the Liquid file that will handle this process. Below is how the script section currently looks (the code is wrapped in tags).
const response = fetch("/apps/
And on the remix, we currently added a simple path to test it out
```javascript
import { LoaderFunction } from "@remix-run/node";
// Loader function to handle GET requests
export let loader: LoaderFunction = async () => {
return new Response("pong", {
status: 200,
headers: {
"Content-Type": "text/plain",
},
});
};
Now looking at the app when we run it we can do a successful call to the endpoint, but how to do it in liquid? Is there anything special you have to configure? Is there any documentation detailed with an example of how to connect from liquid to the app?