Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

STS and advancedcart / javascript


ekoolstra

Recommended Posts

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?

Link to comment
Share on other sites

  • 1 month later...

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?

Link to comment
Share on other sites

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

pixel_blue.gif

 

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">';

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

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

pixel_blue.gif

 

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.

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...