Jump to content



Latest News: (loading..)

- - - - -

Remove Tell A Friend Box


  • Please log in to reply
2 replies to this topic

#1   bbel121

bbel121
  • Members
  • 18 posts
  • Real Name:bob

Posted 24 June 2012 - 05:40 PM

HI,

Ok, I have disabled tell a friend, but I still want to remove tell a friend completely.  I have tried to follow the directions on the site, with no success. I am not a developer/coder, so I just follow directions to the best of my ability.  I have tried 3 different solutions on the site. I am sure someone will see a basic mistake I am making.

Here is the code in my column_right file.

  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');
  }


If I do this, where i enter to slashes before the include on the second line, I lose all my page formatting.

  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');
  }


If I do this, where I remove the second and third line as one post suggested, again I lose all my page formatting.

  if (isset($HTTP_GET_VARS['products_id'])) {
include(DIR_WS_BOXES . 'specials.php');
  }

If I do this, where I put the slashes before the Tell A Friend line, it seems to do nothing.

  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');
  }


Any very explicit help is much appreciated :)
Bob

Edited by bbel121, 24 June 2012 - 05:42 PM.


#2   FIMBLE

FIMBLE
  • Community Sponsor
  • 6,576 posts
  • Real Name:Nic
  • Gender:Male

Posted 25 June 2012 - 08:32 AM

with this

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');
}

make it this

//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');
//}

or delete the rest to leave you with this

include(DIR_WS_BOXES . 'specials.php');

Nic
Sometimes you're the dog and sometimes the lamp post

My Contributions

#3   bbel121

bbel121
  • Members
  • 18 posts
  • Real Name:bob

Posted 25 June 2012 - 05:21 PM

Nick,

Thanks for the detailed info.  I guess maybe it is being controlled elsewhere as it did not do anything as the file now looks like this...


if ($sts->display_template_output) {
$sts->restart_capture ('content');
} else {
//END STS 4.1

  require(DIR_WS_BOXES . 'shopping_cart.php');

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

// PWA EOF
  if (tep_session_is_registered('customer_id') && (! tep_session_is_registered('customer_is_guest')) ) include(DIR_WS_BOXES . 'order_history.php');
// PWA BOF

  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');
  }

  include(DIR_WS_BOXES . 'customer_testimonials.php');

// START STS 4.1
}
// END STS 4.1