Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
144
rated 0 times [  147] [ 3]  / answers: 1 / hits: 6404  / 10 Years ago, tue, april 8, 2014, 12:00:00

I am attempting to add a javascript file to a BigCommerce template that will enable a function needed. I am not familiar with BigCommerce but was contracted to add this functionality.



How do I add a javascript file to a BigCommerce template?



I tried create a custom folder like so:



/template/_custom/my-javascript-file.js


but when I insert that file path into the template it throws a 404 error IE:



<script type=text/javascript src=/template/_custom/my-javascript-file.js></script>


How do I add an external javascript file to a BigCommerce Template?


More From » bigcommerce

 Answers
17

First you need to upload your JavaScript file via WebDav. I would add it to /templates/js. If this folder doesn't exist, create it.



The file path would be:



<script type=text/javascript src=/templates/__custom/is/my-javascript-file.is></script>



Note that __custom does not actually exist in the folder structure.


[#46216] Monday, April 7, 2014, 10 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
judydestiniem

Total Points: 215
Total Questions: 109
Total Answers: 86

Location: Indonesia
Member since Wed, Jul 7, 2021
3 Years ago
;