Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Est Shipping Box in Left Column Trouble


cdickson

Recommended Posts

Howard - great contribution! Thanks!

 

I must have made a small error, though, because I have not been able to get the estimated shipping box into the left column. I have installed the contribution, checked it several times, then reinstalled v1.7 and still have the same problem. My site looks like this:

screencapture.gif

 

My column_left.php code is:

<?php
/*
 $Id: column_left.php,v 1.1 2003/09/08 19:26:22 jhtalk Exp jhtalk $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/
 // STS: ADD
 $sts_block_name = 'header2columnleft';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

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

 // STS: ADD
 $sts_block_name = 'categorybox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

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

 // STS: ADD
 $sts_block_name = 'manufacturerbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 require(DIR_WS_BOXES . 'whats_new.php');

 // STS: ADD
 $sts_block_name = 'whatsnewbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 require(DIR_WS_BOXES . 'search.php');

 // STS: ADD
 $sts_block_name = 'searchbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 require(DIR_WS_BOXES . 'information.php');

 // STS: ADD
 $sts_block_name = 'informationbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 require(DIR_WS_BOXES . 'shopping_cart.php');

 // STS: ADD
 $sts_block_name = 'cartbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

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

 // STS: ADD
 $sts_block_name = 'maninfobox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

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

 // STS: ADD
 $sts_block_name = 'orderhistorybox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

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

 // STS: ADD
 $sts_block_name = 'bestsellersbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

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

 // STS: ADD
 $sts_block_name = 'specialfriendbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

 require(DIR_WS_BOXES . 'reviews.php');

 // STS: ADD
 $sts_block_name = 'reviewsbox';
 require(STS_RESTART_CAPTURE);
 // STS: EOADD

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

// STS: ADD
$sts_block_name = 'languagebox';
require(STS_RESTART_CAPTURE);
// STS: EOADD

include(DIR_WS_BOXES . 'currencies.php');

// STS: ADD
$sts_block_name = 'currenciesbox';
require(STS_RESTART_CAPTURE);
// STS: EOADD
 }

  // BEGIN estimated shipping -->
require(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING);
// END estimated shipping -->
?>

 

Can anyone please help?

Edited by cdickson

cdickson

Link to comment
Share on other sites

  • 1 month later...

you are using STS template

 

files you need to change

(1) column_left.php

(2) sts_display_output.php

(3) sts_template.html

 

in column_left.php

require(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING);

$sts_block_name = estimatebox;

require(STS_RESTART_CAPTURE);

 

in sts_display_output.php at line 225, add in a new line like this:

$template['estimatebox'] = strip_unwanted_tags($sts_block['estimatebox'], 'estimatebox');

 

same file, at line 306 add in a new line like this:

echo $sts_block['estimatebox'];

 

in sts_display.html, this is where you decide your box will display, be PRECISE with the location/sequence.

 

at line 31 put in the HTML smart tag $estimatebox, if you want this box to show up AFTER categories, put it right after $categories etc.

Link to comment
Share on other sites

you are using STS template

 

files you need to change

(1) column_left.php

(2) sts_display_output.php

(3) sts_template.html

 

in column_left.php

require(DIR_WS_MODULES . FILENAME_ESTIMATED_SHIPPING);

$sts_block_name = estimatebox;

require(STS_RESTART_CAPTURE);

 

in sts_display_output.php at line 225, add in a new line like this:

$template['estimatebox'] = strip_unwanted_tags($sts_block['estimatebox'], 'estimatebox');

 

same file, at line 306 add in a new line like this:

echo $sts_block['estimatebox'];

 

in sts_display.html, this is where you decide your box will display, be PRECISE with the location/sequence.

 

at line 31 put in the HTML smart tag $estimatebox, if you want this box to show up AFTER categories, put it right after $categories etc.

 

Jeffrey, thanks very much for this thorough explanation when people use STS :thumbsup:

I don't know/use STS so would have never been able to provide such complete answer.

I'll better add this to the installation documentation if that's okay with you.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...