Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

left column to right column


tec

Recommended Posts

well hello everyone.

I have managed to strip some parts out of OSC that my client does not need but for the life i cannot move the catagories and information boxes to the right. I have taken everything out of the right column except the cart contents. So now i am stumped..how do i move the two from the left over to the right?

 

here is the coding for my left column

 

<?php

/*

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

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

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 {

}

 

 

 

require(DIR_WS_BOXES . 'information.php');

?>

 

here is the coding for my right column

 

<?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 © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

require(DIR_WS_BOXES . 'shopping_cart.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');

}

}

 

 

 

 

 

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

 

}

?>

Link to comment
Share on other sites

well hello everyone.

I have managed to strip some parts out of OSC that my client does not need but for the life i cannot move the catagories and information boxes to the right. I have taken everything out of the right column except the cart contents. So now i am stumped..how do i move the two from the left over to the right?

 

here is the coding for my left column

 

<?php

/*

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

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  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 {

  }

 

 

 

  require(DIR_WS_BOXES . 'information.php');

?>

 

here is the coding for my right column

 

<?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 ? 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

  require(DIR_WS_BOXES . 'shopping_cart.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');

    }

  }

 

 

 

 

 

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

 

  }

?>

Put This

include(DIR_WS_BOXES . 'categories.php');

 

Right Here

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 . 'categories.php');  [b]<------HERE PUT IT HERE[/b]
include(DIR_WS_BOXES . 'best_sellers.php');
} 
} else {
include(DIR_WS_BOXES . 'product_notifications.php');
}
}

<span style='font-family:Courier'>If you can't fix it Perl it!!!...</span>

******************************

Link to comment
Share on other sites

open column_left.php and copy this and remove it.

 

require(DIR_WS_BOXES . 'information.php');

 

then open column_right.php and paste this

require(DIR_WS_BOXES . 'information.php');

 

you will notice that where you place the call to info box is critical.

 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') {
   include(DIR_WS_BOXES . 'languages.php');
   include(DIR_WS_BOXES . 'currencies.php');
 }
?>

 

Ok, you see where include(DIR_WS_BOXES . 'currencies.php'); is it on the bottom of the page. hence if you place this under let's say shopping_cart.php then the info box will appear under the shopping cart. and so on and so on....

HTH

<span style='font-family:Courier'>If you can't fix it Perl it!!!...</span>

******************************

Link to comment
Share on other sites

HELLO JELLO~What flavour? :D

 

Anyhow, thanks for your help up top about moving the catagories box over to the right, however, i tried but it did not work. I think i may hav edoen something wrong somewhere. I ahve not yet deleted it formt eh left includes file but tried to put it in the right, this is what my code is like for the right include.

 

  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 . 'categories.php'); 
include(DIR_WS_BOXES . 'best_sellers.php');
} 
} else {
include(DIR_WS_BOXES . 'product_notifications.php');
}
} 
 if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {   
 }
?>

Link to comment
Share on other sites

I tried it, and got this error:

Fatal error: Cannot redeclare tep_show_category()...
However, if I then comment out the reference in includes/column_left.php, it works.

 

One could also fix this by changing categories.php so that it only defines tep_show_category if it hasn't been defined previously. Alternately, it could be moved out of categories.php and into one of the functions files.

 

Hth,

Matt

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...