Kyon147 / laravel-shopify

A full-featured Laravel package for aiding in Shopify App development
MIT License
353 stars 102 forks source link

Not seeing `script_tags` on my store front #174

Closed bilogic closed 1 year ago

bilogic commented 1 year ago
  1. My app is accessible on the shopify backend and I'm trying to add a script to the frontend
  2. Followed the wiki to configure the scripttags, also added the write_script_tags to api_scopes
  3. But I still don't get the script added to my frontend
  4. I see ScriptTags Job in the wiki, why is it a job?
  5. My jobs table is empty, when and how does it get inserted into the table? Or is my understanding incorrect?
Kyon147 commented 1 year ago

As of the new Online Store 2.0, you should avoid using script tags anyways. You should be using app blocks or embed blocks instead as they are backwards compatible.

image

  1. The script tag is a job because it is something that can be handled of the main thread. Otherwise the UI might suffer.
  2. Jobs table is usually empty, if the job has completed or you are not using database as your job handler. Out the box, Laravel is set to sync, which runs all jobs right away.
bilogic commented 1 year ago

Yea thanks, I managed to solve it and utlized app embeds.