Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

Should my newly created Script Tag show up in my theme.liquid or in another file ? by Alain Achkar

$
0
0

Hello,

I'm trying to add a script tag using irb:

Of course, first I authenticate to my private app, then:

st = ShopifyAPI::ScriptTag.new(:src => "http://js-aplenty.com/foo.js", :event => "onload")

st.save

==> true

st.errors.count

==> 0

ShopifyAPI::ScriptTag.count

==> 1

ShopifyAPI::ScriptTag.find(:all)

=> #<ActiveResource::Collection:0x007fe4cdbb1b60 @elements=[#<ShopifyAPI::ScriptTag:0x007fe4cdbb1a20 @attributes={"created_at"=>"2013-07-29T00:35:38-04:00", "event"=>"onload", "id"=>403997, "src"=>"http://js-aplenty.com/foo.js&quot;, "updated_at"=>"2013-07-29T00:35:38-04:00"}, @prefix_options={}, @persisted=true>], @resource_class=ShopifyAPI::ScriptTag, @original_params={}>

 

So, all is well so far.  Now, I go to theme.liquid but I don't see my new script tag.  Is it added in a different file or am I missing something ?

Thx!

Alain.


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>