No content to show
User Activity
I think your fetch() URL might be wrong. How about: fetch('/apps/proxytest/proxy')
You mean you are not able to send the response to the Theme App Extension page? But anyway I think you need to do something like this:const response = await admin.graphql( `#graphql query productTitle { products(first: 1) { nodes { title } } }`, );co...
04-29-2024
Yes. I am using node-cron, which doesn’t require a cron installation.It is incredibly easy to install and use. Here is a sample method I built that I call from my action() method: let job = {};function createCron(action, shop, process){ const cron ...
Well, the response gets sent back to the URL, that the request comes from.Or are you saying that you want to return the response to a different URL?
You can’t return data like that. You have to use liquid export const action = async ({request}) => { const {storefront, liquid} = await authenticate.public.appProxy(request); … return liquid(erpData2.url_wchat);}
Maybe you need a liquid response? https://shopify.dev/docs/api/shopify-app-remix/v2/authenticate/public/app-proxy#example-liquid
There is one other angle, you might want to explore.You can access Request Internals, by doing the following. You might find the form data values, in here, as well: export async function action({ request, params }) { const { admin, session } = awa...
No worries. I hope you find a solution soon..
If this doesn’t work, I suggest removing: const formData = new FormData(form); And use something like: const name = document.getElementById('name');const email = document.getElementById('email');…const formData = JSON.stringify({ name: name.value...
Are you using: const formData = await request.json(); ...Inside your Remix App action() method, to parse the data? This is very important.
I think you need to use the name attribute in each form field like: <input type="text" name="name" value="foo" /> If you want to collect form data via:const formData = new FormData(form);
Try this: fetch('/apps/proxytest', { method: 'POST', body: JSON.stringify(Object.fromEntries(formData)), headers: { 'Content-Type': 'application/json }, }) You should NOT set: 'Access-Control-Allow-Origin': '*', It won't...
OK. The first thing to do, is to get your App Proxy setup correctly. I am assuming you have created some kind of form, in your Theme App Extension. You need to make sure that you use something like fetch() or axios() to post your data to your Admin A...
04-05-2024
OK. Here is the solution. 100% guaranteed: Go to: [app] -> configuration -> App proxy Refresh the configuration page. Then, try and make a request to your admin app, using the form in your Theme App Extension or online store app.Of course it will ...
I have a separate branch for my development and production stages.I have a different app for my development and production stages. This allows me to have one theme extension app source code, but I can different settings in the .env file: Development:...