Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Web site counter in footer.php ver 2.3.1


blr044

Recommended Posts

I have a stat counter added to footer.php file. Since I upgraded to 2.3.1 from Rc2a, it stop working. When I view the source code of web site. it isn't located there even though it is located in the footer file. I do not get any errors what-so-ever. Code from footer.php:

<?php
/*
 $Id$

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2010 osCommerce

 Released under the GNU General Public License
*/

 require(DIR_WS_INCLUDES . 'counter.php');
?>

<div class="grid_24 footer">
 <p align="center"><?php echo FOOTER_TEXT_BODY; ?></p>
</div> 

<?php
 if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>

<div class="grid_24" style="text-align: center; padding-bottom: 20px;">
 <?php echo tep_display_banner('static', $banner); ?>
</div>

<?php
 if ( $request_type != 'SSL' ) {
?>

<!-- BEGIN Attracta | Site 481478 | Badge 1 -->
<script type="text/javascript" src="http://cdn.attracta.com/badge/js/481478/core.js"></script><a href="http://cdn.attracta.com/badge/verify/481478.html"><img alt="Increase your website traffic with Attracta.com" style="border:0px" src="http://cdn.attracta.com/badge/img/481478/1.png"></a>
<!-- END Attracta -->');

<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=6113406; 
var sc_invisible=0; 
var sc_security="7718d31c"; 
</script>

<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a title="vBulletin stats" class="statcounter" href="http://statcounter.com/vbulletin/"><img class="statcounter" src="http://c.statcounter.com/6113406/0/7718d31c/0/" alt="vBulletin stats" /></a></div></noscript>
<!-- End of StatCounter Code -->

<?php
 }
?>

<?php
 }
?>

<script type="text/javascript">
$('.productListTable tr:nth-child(even)').addClass('alt');
</script>

I have contacted support help with stats counter, but their reply, if it does not appear in view source code, it's not loaded. so where am I going wrong.

 

Thank you.

 

Bennett

Link to comment
Share on other sites

Bennet, just a thought - have you tried it in a plain html page just to prove that it is working?

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

After reading your post, I did attach this code

 

<?php
 if ( $request_type != 'SSL' ) {
?>

<!-- BEGIN Attracta | Site 481478 | Badge 1 -->
<script type="text/javascript" src="http://cdn.attracta.com/badge/js/481478/core.js"></script><a href="http://cdn.attracta.com/badge/verify/481478.html"><img alt="Increase your website traffic with Attracta.com" style="border:0px" src="http://cdn.attracta.com/badge/img/481478/1.png"></a>
<!-- END Attracta -->');

<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=6113406; 
var sc_invisible=0; 
var sc_security="7718d31c"; 
</script>

<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a title="vBulletin stats" class="statcounter" href="http://statcounter.com/vbulletin/"><img class="statcounter" src="http://c.statcounter.com/6113406/0/7718d31c/0/" alt="vBulletin stats" /></a></div></noscript>
<!-- End of StatCounter Code -->

<?php
 }
?>

<?php
 }
?>

 

to a html page. Counter does appear in the footer and also have tried clicking the image, it does take me to my stats counter web page. So yes, it works on a html page but not with ver 2.3.1.

 

Thanks.

Link to comment
Share on other sites

The next thing I would do is add a word in the vicinity of the script and see if that shows in your store like:

 

<div class="grid_24" style="text-align: center; padding-bottom: 20px;">
 <?php echo tep_display_banner('static', $banner); ?>
</div>

<?php
 if ( $request_type != 'SSL' ) {
?>

<!-- BEGIN Attracta | Site 481478 | Badge 1 -->
<script type="text/javascript" src="http://cdn.attracta.com/badge/js/481478/core.js"></script><a href="http://cdn.attracta.com/badge/verify/481478.html"><img alt="Increase your website traffic with Attracta.com" style="border:0px" src="http://cdn.attracta.com/badge/img/481478/1.png"></a>
<!-- END Attracta -->');
HELLO
<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=6113406; 
var sc_invisible=0; 
var sc_security="7718d31c"; 
</script>

<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a title="vBulletin stats" class="statcounter" href="http://statcounter.com/vbulletin/"><img class="statcounter" src="http://c.statcounter.com/6113406/0/7718d31c/0/" alt="vBulletin stats" /></a></div></noscript>
<!-- End of StatCounter Code -->
BYE
<?php
 }
?>

<?php
 }
?>

<script type="text/javascript">
$('.productListTable tr:nth-child(even)').addClass('alt');
</script>

 

just to check that html is working on the footer.php

 

 

What it could be, of course, is a conflict of js - 2.3.1 being heavily reliant on js

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

The next thing I would do is add a word in the vicinity of the script and see if that shows in your store like:

 

just to check that html is working on the footer.php

 

Nothing, it did not work.

Link to comment
Share on other sites

Try it in a container:

 


<div class="grid_24" style="text-align: center; padding-bottom: 20px;">
<!-- BEGIN Attracta | Site 481478 | Badge 1 -->
<script type="text/javascript" src="http://cdn.attracta.com/badge/js/481478/core.js"></script><a href="http://cdn.attracta.com/badge/verify/481478.html"><img alt="Increase your website traffic with Attracta.com" style="border:0px" src="http://cdn.attracta.com/badge/img/481478/1.png"></a>
<!-- END Attracta -->');

<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=6113406; 
var sc_invisible=0; 
var sc_security="7718d31c"; 
</script>

<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a title="vBulletin stats" class="statcounter" href="http://statcounter.com/vbulletin/"><img class="statcounter" src="http://c.statcounter.com/6113406/0/7718d31c/0/" alt="vBulletin stats" /></a></div></noscript>
<!-- End of StatCounter Code -->
</div>

My store is currently running Phoenix 1.0.3.0

I'm currently working on 1.0.7.2 and hope to get it live before 1.0.8.0 arrives (maybe 🙄 )

I used to have a list of add-ons here but I've found that with the ones that supporters of Phoenix get any other add-ons are not really neccessary

Link to comment
Share on other sites

Thanks Julian,

 

First attempt failed, so tried something a bit different. Instead of the way I had inserted it as post #1, I had to insert it That code worked. There was a slight adjustment I did to display the stats counter. In footer.php, I tried inserting it at the very end of after this piece of code.

 

<script type="text/javascript">
$('.productListTable tr:nth-child(even)').addClass('alt');
</script>

 

So now it looks like this:

 

<div class="grid_24 footer">
 <p align="center"><?php echo FOOTER_TEXT_BODY; ?></p>
</div> 

<?php
 if ($banner = tep_banner_exists('dynamic', '468x50')) {
?>

<div class="grid_24" style="text-align: center; padding-bottom: 20px;">
 <?php echo tep_display_banner('static', $banner); ?>
</div>

<?php
 }
?>

<script type="text/javascript">
$('.productListTable tr:nth-child(even)').addClass('alt');
</script>

<div class="grid_24" style="text-align: center; padding-bottom: 20px;">
<!-- BEGIN Attracta | Site 481478 | Badge 1 -->
<script type="text/javascript" src="http://cdn.attracta.com/badge/js/481478/core.js"></script><a href="http://cdn.attracta.com/badge/verify/481478.html"><img alt="Increase your website traffic with Attracta.com" style="border:0px" src="http://cdn.attracta.com/badge/img/481478/1.png"></a>
<!-- END Attracta -->

<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=6113406; 
var sc_invisible=0; 
var sc_security="7718d31c"; 
</script>

<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a title="vBulletin stats" class="statcounter" href="http://statcounter.com/vbulletin/"><img class="statcounter" src="http://c.statcounter.com/6113406/0/7718d31c/0/" alt="vBulletin stats" /></a></div></noscript>
<!-- End of StatCounter Code -->
</div>

 

So thank you very much for all of your help.

Link to comment
Share on other sites

  • 1 year later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...