Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Box position in column


rikpotts

Recommended Posts

Posted

I created a file named 123reg.php and saved it in catalog/includes/boxes

It just contained a small bit of html from an affiliate aggrement. Basically its an image.

 

Then I added require(DIR_WS_BOXES . '123reg.php'); to the very bottom of catalog/includes/column_right.php

 

The image appears as it should except that it appears at the top of the column.

 

Could someone help me get it to the bottom?

Here is my column_right.php

 

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

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

if ($request_type == 'SSL') {
include (DIR_WS_BOXES . 'ssl.php');
}
// BOF: WebMakers Added: Login Box My Account
   require(DIR_WS_BOXES . 'loginbox.php');
// EOF: WebMakers Added: Login Box My Account
//require(DIR_WS_BOXES . 'search.php');


if ($cart->count_contents() > 0) include(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');
   include(DIR_WS_BOXES . 'best_sellers_scroll.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');
   require(DIR_WS_BOXES . '123reg.php');

 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
   //include(DIR_WS_BOXES . 'languages.php');
   //include(DIR_WS_BOXES . 'currencies.php');
 }

?>

 

Many Thanks

Posted

I created a file named 123reg.php and saved it in catalog/includes/boxes

It just contained a small bit of html from an affiliate aggrement. Basically its an image.

 

Then I added require(DIR_WS_BOXES . '123reg.php'); to the very bottom of catalog/includes/column_right.php

 

The image appears as it should except that it appears at the top of the column.

 

Could someone help me get it to the bottom?

Here is my column_right.php

 

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

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

if ($request_type == 'SSL') {
include (DIR_WS_BOXES . 'ssl.php');
}
// BOF: WebMakers Added: Login Box My Account
   require(DIR_WS_BOXES . 'loginbox.php');
// EOF: WebMakers Added: Login Box My Account
//require(DIR_WS_BOXES . 'search.php');


if ($cart->count_contents() > 0) include(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');
   include(DIR_WS_BOXES . 'best_sellers_scroll.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');
   require(DIR_WS_BOXES . '123reg.php');

 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {
   //include(DIR_WS_BOXES . 'languages.php');
   //include(DIR_WS_BOXES . 'currencies.php');
 }

?>

 

Many Thanks

 

Is it showing above your login box? judging by the code it should be 2nd UNLESS the customer has a product in their cart(shopping_cart.php will be shown), is logged in(order_history.php will be shown), or is looking at a product(best_sellers_scroll.php will be shown).

 

Hope this helps,

Frank

Posted

I have moved the code all over the file and its always at the top. A lot of the time it also resizes my 125px boxes to the 100px that the advert image is.

 

Ill play around and probably just get rid! It was a 2 minute idea at 4am!

 

Thanks for your help!

Posted

Your html code having something thats moving it to the top.

place some simple html in reg file You created and chek first.

Satish

Ask/Skype for Free osCommerce value addon/SEO suggestion tips for your site.

 

Check My About US For who am I and what My company does.

Posted

My html code is....

 

<div align="center">
<a href="http://www.123-reg.co.uk/affiliate2.cgi?id=AF264340"><img src="http://www.123-reg.co.uk/images/banners/affiliates/SSL120_240.gif" border="0"></a></div>

 

Its just an image with a link, afaik.

Archived

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

×
×
  • Create New...