ekoolstra Posted September 24, 2007 Share Posted September 24, 2007 Hello, I am having problems getting the javascript functions from the advancedcart contrib to work in combination with STS: -Installed advancedcart contrib -non-java functions work fine -works fine if STS Module disabled -returns javascript errors when STS enabled. I have included the 'javascript' call in the STS Templated file. Also tried per earlier suggestion to add -headcontent- tag. No luck Any suggestions? Quote Link to comment Share on other sites More sharing options...
Jari646 Posted November 20, 2007 Share Posted November 20, 2007 Add javascripts to your STS template head. catalog/includes/sts_templates/full/sts_template.html Hello, I am having problems getting the javascript functions from the advancedcart contrib to work in combination with STS: -Installed advancedcart contrib -non-java functions work fine -works fine if STS Module disabled -returns javascript errors when STS enabled. I have included the 'javascript' call in the STS Templated file. Also tried per earlier suggestion to add -headcontent- tag. No luck Any suggestions? Quote Link to comment Share on other sites More sharing options...
bkellum Posted November 20, 2007 Share Posted November 20, 2007 Hello, I am having problems getting the javascript functions from the advancedcart contrib to work in combination with STS: -Installed advancedcart contrib -non-java functions work fine -works fine if STS Module disabled -returns javascript errors when STS enabled. I have included the 'javascript' call in the STS Templated file. Also tried per earlier suggestion to add -headcontent- tag. No luck Any suggestions? $extracss You can use this placeholder if you want to dynamically add something in the html header, like an extra css file to load, depending on the page viewed. Use: place <!--$extracss--> between <head> and </head> of your template. It is important to keep the comment chars before and after $extracss, otherwise it won't work. Code example: simple example to dynamically add a stylesheet to the template. This stylesheet is located in the same folder as the template itself. This code can be placed in includes/modules/sts_inc/sts_user_code.php for example. $sts->template['extracss'].= '<link rel="stylesheet" type="text/css" href="' . STS_TEMPLATE_DIR .'stylesheet2.css">'; Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
bkellum Posted November 20, 2007 Share Posted November 20, 2007 Hello, I am having problems getting the javascript functions from the advancedcart contrib to work in combination with STS: -Installed advancedcart contrib -non-java functions work fine -works fine if STS Module disabled -returns javascript errors when STS enabled. I have included the 'javascript' call in the STS Templated file. Also tried per earlier suggestion to add -headcontent- tag. No luck Any suggestions? Regarding the choice of not using the headcontent tag: $headcontent This placeholder is very important in the template. It takes care of html meta tags and javascript that are to be placed in the html header of the page. It will place on your template: - http-equiv meta tag with charset - title meta tag (from $headertags) - base URL - Javascript found in includes/header.php Use: place <!--$headcontent--> between <head> and </head> of your template. It is important to keep the comment chars before and after $headcontent otherwise it won't work! Example: <head> <!--$headcontent--> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> Result of the example: <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>osC Help - The site that helps you choosing your osCommerce contributions</title> <base href="http://127.0.0.1:71/osc-help/"> <!-- start get_javascript(applicationtop2header) //--> <!-- end get_javascript(applicationtop2header) //--> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> Created in: includes/classes/sts.php It is not a good idea to leave out this very important tag. Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.