Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Add script to column_left.php


Lilibeth

Recommended Posts

Hi, all!

I need to add this box to column_left.php:

 

<script type="text/javascript"><!--
google_ad_client = "pub-7522837289427164";
/* 125x125, criado em 28/03/08 */
google_ad_slot = "2159656627";
google_ad_width = 125;
google_ad_height = 125;
google_cpa_choice = ""; // on file
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

 

My column_left.php code:

<?php
/*
 $Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 if ((USE_CACHE == 'true') && empty($SID)) {
   echo tep_cache_categories_box();
 } else {
   include(DIR_WS_BOXES . 'categories.php');
 }

 if ((USE_CACHE == 'true') && empty($SID)) {
   echo tep_cache_manufacturers_box();
 } else {
   include(DIR_WS_BOXES . 'manufacturers.php');
 }

 require(DIR_WS_BOXES . 'whats_new.php');
 require(DIR_WS_BOXES . 'search.php');
 require(DIR_WS_BOXES . 'information.php');
?><tr><td>
<img src="https://pagseguro.uol.com.br/Security/Imagens/125x125_10X_pagseguro.gif" border="0" alt="banner-pagseguro" title="Este site oferece PagSeguro!">
</td></tr>

What do I have to do, please?

Thanks a lot!

Link to comment
Share on other sites

At the end, change the code to:

 

<tr><td>
<img src="https://pagseguro.uol.com.br/Security/Imagens/125x125_10X_pagseguro.gif" border="0" alt="banner-pagseguro" title="Este site oferece PagSeguro!">
</td></tr>
<tr><td>

***** DELETE THIS LINE AND PUT YOUR SCRIPT HERE *****

</td></tr>

Did the file I sent you not work?

:unsure:

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

It's already in column_left:

 

<!-- information_eof //-->
<tr><td>
<img src="https://pagseguro.uol.com.br/Security/Imagens/125x125_10X_pagseguro.gif" border="0" alt="banner-pagseguro" title="Este site oferece PagSeguro!">
</td></tr>

<tr><td>
<script type="text/javascript"><!--
google_ad_client = "pub-7522837289427164";
/* 125x125, criado em 28/03/08 */
google_ad_slot = "2159656627";
google_ad_width = 125;
google_ad_height = 125;
google_cpa_choice = ""; // on file
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td></tr><!-- left_navigation_eof //-->
</table></td>

Source code from your site.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

I add Live Chat to column_left.php but I cant add the google script.

Now I need to add this script to column_right.php... same script I told in begining.

 

column_right code:

<?php
/*
 $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require(DIR_WS_BOXES . 'shopping_cart.php');

 if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');

 if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');

 if (isset($HTTP_GET_VARS['products_id'])) {
   if (tep_session_is_registered('customer_id')) {
     $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
     $check = tep_db_fetch_array($check_query);
     if ($check['count'] > 0) {
       include(DIR_WS_BOXES . 'best_sellers.php');
     } else {
       include(DIR_WS_BOXES . 'product_notifications.php');
     }
   } else {
     include(DIR_WS_BOXES . 'product_notifications.php');
   }
 } else {
   include(DIR_WS_BOXES . 'best_sellers.php');
 }

 if (isset($HTTP_GET_VARS['products_id'])) {
   if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
 } else {
   include(DIR_WS_BOXES . 'specials.php');
 }

 require(DIR_WS_BOXES . 'reviews.php');

 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
     }
?>

Thanks!!!

Link to comment
Share on other sites

At the end, change the code to this:

 

  require(DIR_WS_BOXES . 'reviews.php');
 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
  }
?>
<tr><td> <!-- I added this line -->

**** DELETE THIS LINE AND PUT YOUR SCRIPT HERE ****

</td></tr> <!-- I added this line -->

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

At the end, change the code to this:

 

<?php
/*
 $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require(DIR_WS_BOXES . 'shopping_cart.php');

 if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');

 if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');

 if (isset($HTTP_GET_VARS['products_id'])) {
   if (tep_session_is_registered('customer_id')) {
     $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
     $check = tep_db_fetch_array($check_query);
     if ($check['count'] > 0) {
       include(DIR_WS_BOXES . 'best_sellers.php');
     } else {
       include(DIR_WS_BOXES . 'product_notifications.php');
     }
   } else {
     include(DIR_WS_BOXES . 'product_notifications.php');
   }
 } else {
   include(DIR_WS_BOXES . 'best_sellers.php');
 }

 if (isset($HTTP_GET_VARS['products_id'])) {
   if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
 } else {
   include(DIR_WS_BOXES . 'specials.php');
 }

 require(DIR_WS_BOXES . 'reviews.php');
 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
     }
?>
<tr><td> <!-- I added this line -->

<script type="text/javascript"><!--
google_ad_client = "pub-7522837289427164";
/* 125x125, criado em 28/03/08 */
google_ad_slot = "2159656627";
google_ad_width = 125;
google_ad_height = 125;
google_cpa_choice = ""; // on file
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</td></tr> <!-- I added this line -->
?>

What now? heheh

Link to comment
Share on other sites

<tr><td> <!-- I added this line -->

**** DELETE THIS LINE AND PUT YOUR SCRIPT HERE ****

</td></tr> <!-- I added this line -->

?> <--- DELETE THIS LINE

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

<?php
/*
 $Id: column_right.php,v 1.17 2003/06/09 22:06:41 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require(DIR_WS_BOXES . 'shopping_cart.php');

 if (isset($HTTP_GET_VARS['products_id'])) include(DIR_WS_BOXES . 'manufacturer_info.php');

 if (tep_session_is_registered('customer_id')) include(DIR_WS_BOXES . 'order_history.php');

 if (isset($HTTP_GET_VARS['products_id'])) {
   if (tep_session_is_registered('customer_id')) {
     $check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");
     $check = tep_db_fetch_array($check_query);
     if ($check['count'] > 0) {
       include(DIR_WS_BOXES . 'best_sellers.php');
     } else {
       include(DIR_WS_BOXES . 'product_notifications.php');
     }
   } else {
     include(DIR_WS_BOXES . 'product_notifications.php');
   }
 } else {
   include(DIR_WS_BOXES . 'best_sellers.php');
 }

 if (isset($HTTP_GET_VARS['products_id'])) {
   if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');
 } else {
   include(DIR_WS_BOXES . 'specials.php');
 }

 require(DIR_WS_BOXES . 'reviews.php');
 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
     }
?>
<tr><td> <!-- I added this line -->

<script type="text/javascript"><!--
google_ad_client = "pub-7522837289427164";
/* 125x125, criado em 28/03/08 */
google_ad_slot = "2159656627";
google_ad_width = 125;
google_ad_height = 125;
google_cpa_choice = ""; // on file
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

</td></tr> <!-- I added this line -->

Not yet! Wheres my mistake?

Link to comment
Share on other sites

Clear your browse cache.

 

It looks fine to me except that nothing shows up.

 

I'm not responsible for the content of the script, just it's placement.

 

If the script is supposed to actually show something, you'll have to take that up with Google - they wrote it.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Oh! Now I saw that I have to wait till 48h to see the box.

Hehe! I am sorry give you work like that.

Thanks a lot! Now you are my guard angel here! =P :P

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...