Path to JavaScripts in Custom Template?!

General ShopSite user discussion

Path to JavaScripts in Custom Template?!

Postby Cayce » Tue Apr 05, 2011 1:24 pm

I've done everything I can think of to get JavaScripts to run in a custom template and can't make it happen. Honestly. This is the most incredibly bizarre environment I've ever (in 18 years) attempted to decipher. So... I give up: what does the path need to be so that external scripts will run in a ShopSite custom template? I've tried absolute & relative paths to no avail. Or does SS simply not run JavaScript? If I extract the code and run it on a browser outside SS, it all works fine... but SS won't have anything to do with it.

Any suggestions would allow me to keep what hair I haven't pulled out yet.

Thanks.

Cayce
Cayce
 
Posts: 14
Joined: Fri Mar 18, 2011 8:41 am

Re: Path to JavaScripts in Custom Template?!

Postby ShopSite Lauren » Tue Apr 05, 2011 1:33 pm

What is the URL to one of your ShopSite pages so I can see what you have so far?

If you are trying to link to an external JS file, you will want to include either the absolute path, or if the JS link is in a page template, and you can include the partial path (such as if your ShopSite store is at yourdomain.com/store, and your JS is in the root, then you would link to ../name.js).

If you have uploaded your JS file into the ShopSite publish directory (Merchandising > Custom Templates > Includes), then you would link to it with a URL similar to one of the following:
publish/name.js
or
[-- OUTPUT_DIRECTORY_URL --]/publish/name.js

ShopSite creates static HTML pages that work the same (display any code you have on them the same) as other non-ShopSite web pages.
- ShopSite Lauren
Contact me for help with any of your
custom ShopSite template questions.
ShopSite Lauren
 
Posts: 889
Joined: Fri Aug 11, 2006 1:35 pm
Location: Orem, UT

Re: Path to JavaScripts in Custom Template?!

Postby mjbrunelle » Wed Apr 06, 2011 6:19 pm

Cayce,

I looked at your previous example page, http://www.digifolders.com/_Alpha_Pop.html. I suggest you review the use of SS templates and the various template Tags. This page has not been "Published" by SS.

You do realize you need to publish in SS, to create the actual store page? Looking at the source, you are directly writing the SS tags in to an HTML page. I you had published these tags would be replaced with the appropriate output.
mjbrunelle
 
Posts: 147
Joined: Sun Jun 21, 2009 5:09 am


Return to User Forum

Who is online

Users browsing this forum: Majestic-12 [Bot] and 121 guests

cron