Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Store Mode (Open | Closed | Maintenance)


olsonsp4c

Recommended Posts

  • 2 weeks later...

Hi Guys,

 

Really want to get this installed, and would like a pointer on where to install it in my catalogue/index.php file as mine is slightly different from the text file:

 

**********

* STEP 1 *

**********

 

in catalog/index.php

 

Find this:

 

      <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
           <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_default.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>

 

I can't find this in mine - here is my index.php file:

 

<?php
/*
 $Id: index.php 1739 2007-12-20 00:52:16Z hpdl $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

// the following cPath references come from application_top.php
 $category_depth = 'top';
 if (isset($cPath) && tep_not_null($cPath)) {
   $categories_products_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_TO_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
   $cateqories_products = tep_db_fetch_array($categories_products_query);
   if ($cateqories_products['total'] > 0) {
     $category_depth = 'products'; // display products
   } else {
     $category_parent_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " where parent_id = '" . (int)$current_category_id . "'");
     $category_parent = tep_db_fetch_array($category_parent_query);
     if ($category_parent['total'] > 0) {
       $category_depth = 'nested'; // navigate through the categories
     } else {
       $category_depth = 'products'; // category has no products, but display the 'no products' message
     }
   }
 }

 require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_DEFAULT);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="shortcut icon" href="favicon.ico" >
<link rel="icon" href="animated_favicon1.gif" type="image/gif" >

<script type="text/javascript" src="iepngfix_tilebg.js"></script>
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<style type="text/css">
.ie6_png 			{behavior: url("iepngfix.htc") }
.ie6_png img		{behavior: url("iepngfix.htc") }
.ie6_png input		{behavior: url("iepngfix.htc") }
</style>
<!--[if IE]>
  <script type="text/javascript" src="ie_png.js"></script>
  <script type="text/javascript">
      ie_png.fix('.png');
  </script>
<![endif]-->
</head>
<body>
<!-- header //-->
<?php $tab_sel = 2; ?>
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" class="<?php echo MAIN_TABLE; ?>" cellspacing="0" cellpadding="0">
<tr>
   <td class="<?php echo BOX_WIDTH_TD_LEFT; ?>"><table border="0" class="<?php echo BOX_WIDTH_LEFT; ?>" cellspacing="0" cellpadding="0">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
<?php
 if ($category_depth == 'nested') {
   $category_query = tep_db_query("select cd.categories_name, c.categories_image from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.categories_id = '" . (int)$current_category_id . "' and cd.categories_id = '" . (int)$current_category_id . "' and cd.language_id = '" . (int)$languages_id . "'");
   $category = tep_db_fetch_array($category_query);
?>
   <td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php echo panel_top(); ?>

<?php echo tep_draw_top();?>

			<?php new contentBoxHeading_ProdNew($info_box_contents);?>

<?php echo tep_draw3_top();?>


	<table border="0" width="100%" cellspacing="0" cellpadding="0" class="main">
             <tr>
<?php
   if (isset($cPath) && strpos('_', $cPath)) {
// check to see if there are deeper categories within the current category
     $category_links = array_reverse($cPath_array);
     for($i=0, $n=sizeof($category_links); $i<$n; $i++) {
       $categories_query = tep_db_query("select count(*) as total from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "'");
       $categories = tep_db_fetch_array($categories_query);
       if ($categories['total'] < 1) {
         // do nothing, go through the loop
       } else {
         $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$category_links[$i] . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
         break; // we've found the deepest category the customer is in
       }
     }
   } else {
     $categories_query = tep_db_query("select c.categories_id, cd.categories_name, c.categories_image, c.parent_id from " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where c.parent_id = '" . (int)$current_category_id . "' and c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' order by sort_order, cd.categories_name");
   }

   $number_of_categories = tep_db_num_rows($categories_query);

   $rows = 0;
   while ($categories = tep_db_fetch_array($categories_query)) {
     $rows++;
     $cPath_new = tep_get_path($categories['categories_id']);

$p_pic_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . tep_image(DIR_WS_IMAGES . $categories['categories_image'], $categories['categories_name'], SUBCATEGORY_IMAGE_WIDTH, SUBCATEGORY_IMAGE_HEIGHT) . '</a>';

$p_name_sub = '<a href="' . tep_href_link(FILENAME_DEFAULT, $cPath_new) . '">' . $categories['categories_name'] . '</a>';

  $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
  echo '<td align="center" width="' . $width . '">'.tep_draw_prod2_top().'
			<table cellpadding="0" cellspacing="0" border="0">
				<tr><td class="name name4_padd">'.$p_name_sub.'</td></tr>
				<tr><td class="pic4_padd">'.tep_draw_prod_pic_top().''.$p_pic_sub.''.tep_draw_prod_pic_bottom().'</td></tr>
			</table>'.tep_draw_prod2_bottom().'
		</td>'."\n";

	  if ($col!=(MAX_DISPLAY_CATEGORIES_PER_ROW-1)){
	  echo '
			<td class="prod_line_y padd_vv">'.tep_draw_separator('spacer.gif', '1', '1').'</td>					
			';
	  }else{	

	  if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
		echo '              
	</tr><tr><td class="prod_line_x" colspan="'.(MAX_DISPLAY_CATEGORIES_PER_ROW + MAX_DISPLAY_CATEGORIES_PER_ROW -1).'">'.tep_draw_separator('spacer.gif', '1', '15').'</td></tr>' . "\n";
		echo '<tr>' . "\n";
  }
}
if ($col==MAX_DISPLAY_CATEGORIES_PER_ROW-1){
$col=0;
}else{
$col++;
}
}	

// needed for the new products module shown below
   $new_products_category_id = $current_category_id;
?>
             </tr>
           </table>



<?php echo tep_draw3_bottom();?>

<?php /*  echo tep_draw_bottom();  */?>

<?php /*  echo tep_draw_top();  */?>

			<?php new contentBoxHeading_WHATS_NEW($info_box_contents, true, false);?>

<?php echo tep_draw3_top();?>

			<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?>

<?php echo tep_draw3_bottom();?>

<?php echo tep_draw_bottom();?>	

</td>
<?php
 } elseif ($category_depth == 'products' || isset($HTTP_GET_VARS['manufacturers_id'])) {
// create column list
   $define_list = array('PRODUCT_LIST_MODEL' => PRODUCT_LIST_MODEL,
                        'PRODUCT_LIST_NAME' => PRODUCT_LIST_NAME,
                        'PRODUCT_LIST_MANUFACTURER' => PRODUCT_LIST_MANUFACTURER,
                        'PRODUCT_LIST_PRICE' => PRODUCT_LIST_PRICE,
                        'PRODUCT_LIST_QUANTITY' => PRODUCT_LIST_QUANTITY,
                        'PRODUCT_LIST_WEIGHT' => PRODUCT_LIST_WEIGHT,
                        'PRODUCT_LIST_IMAGE' => PRODUCT_LIST_IMAGE,
                        'PRODUCT_LIST_BUY_NOW' => PRODUCT_LIST_BUY_NOW);

   asort($define_list);

   $column_list = array();
   reset($define_list);
   while (list($key, $value) = each($define_list)) {
     if ($value > 0) $column_list[] = $key;
   }

   $select_column_list = '';

   for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
     switch ($column_list[$i]) {
       case 'PRODUCT_LIST_MODEL':
         $select_column_list .= 'p.products_model, ';
         break;
       case 'PRODUCT_LIST_NAME':
         $select_column_list .= 'pd.products_name, ';
         break;
       case 'PRODUCT_LIST_MANUFACTURER':
         $select_column_list .= 'm.manufacturers_name, ';
         break;
       case 'PRODUCT_LIST_QUANTITY':
         $select_column_list .= 'p.products_quantity, ';
         break;
       case 'PRODUCT_LIST_IMAGE':
         $select_column_list .= 'p.products_image, ';
         break;
       case 'PRODUCT_LIST_WEIGHT':
         $select_column_list .= 'p.products_weight, ';
         break;
     }
   }

// show the products of a specified manufacturer
   if (isset($HTTP_GET_VARS['manufacturers_id'])) {
     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only a specific category
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "'";
     } else {
// We show them all
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'";
     }
   } else {
// show the products in a given categorie
     if (isset($HTTP_GET_VARS['filter_id']) && tep_not_null($HTTP_GET_VARS['filter_id'])) {
// We are asked to show only specific catgeory
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and m.manufacturers_id = '" . (int)$HTTP_GET_VARS['filter_id'] . "' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
     } else {
// We show them all
       $listing_sql = "select " . $select_column_list . " p.products_id, p.manufacturers_id, p.products_price, p.products_tax_class_id, IF(s.status, s.specials_new_products_price, NULL) as specials_new_products_price, IF(s.status, s.specials_new_products_price, p.products_price) as final_price from " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on p.manufacturers_id = m.manufacturers_id left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = p2c.products_id and pd.products_id = p2c.products_id and pd.language_id = '" . (int)$languages_id . "' and p2c.categories_id = '" . (int)$current_category_id . "'";
     }
   }

   if ( (!isset($HTTP_GET_VARS['sort'])) || (!ereg('^[1-8][ad]$', $HTTP_GET_VARS['sort'])) || (substr($HTTP_GET_VARS['sort'], 0, 1) > sizeof($column_list)) ) {
     for ($i=0, $n=sizeof($column_list); $i<$n; $i++) {
       if ($column_list[$i] == 'PRODUCT_LIST_NAME') {
         $HTTP_GET_VARS['sort'] = $i+1 . 'a';
         $listing_sql .= " order by pd.products_name";
         break;
       }
     }
   } else {
     $sort_col = substr($HTTP_GET_VARS['sort'], 0 , 1);
     $sort_order = substr($HTTP_GET_VARS['sort'], 1);

     switch ($column_list[$sort_col-1]) {
       case 'PRODUCT_LIST_MODEL':
         $listing_sql .= " order by p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_NAME':
         $listing_sql .= " order by pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
         break;
       case 'PRODUCT_LIST_MANUFACTURER':
         $listing_sql .= " order by m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_QUANTITY':
         $listing_sql .= " order by p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_IMAGE':
         $listing_sql .= " order by pd.products_name";
         break;
       case 'PRODUCT_LIST_WEIGHT':
         $listing_sql .= " order by p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_PRICE':
         $listing_sql .= " order by final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
     }
   }
?>
   <td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php echo panel_top(); ?>

<?php echo tep_draw_top();?>

<?php
// optional Product List Filter
if (PRODUCT_LIST_FILTER > 0) {
     if (isset($HTTP_GET_VARS['manufacturers_id'])) {
       $filterlist_sql = "select distinct c.categories_id as id, cd.categories_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c, " . TABLE_CATEGORIES_DESCRIPTION . " cd where p.products_status = '1' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and p2c.categories_id = cd.categories_id and cd.language_id = '" . (int)$languages_id . "' and p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "' order by cd.categories_name";
     } else {
       $filterlist_sql= "select distinct m.manufacturers_id as id, m.manufacturers_name as name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_MANUFACTURERS . " m where p.products_status = '1' and p.manufacturers_id = m.manufacturers_id and p.products_id = p2c.products_id and p2c.categories_id = '" . (int)$current_category_id . "' order by m.manufacturers_name";
     }
     $filterlist_query = tep_db_query($filterlist_sql);
     if (tep_db_num_rows($filterlist_query) > 1) {
  	echo tep_draw_side_top();
       echo '
	<table cellpadding="0" cellspacing="0" border="0" class="select2">
		<tr><td align="right" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . '<b>'.TEXT_SHOW . '</b>  ';
       if (isset($HTTP_GET_VARS['manufacturers_id'])) {
         echo tep_draw_hidden_field('manufacturers_id', $HTTP_GET_VARS['manufacturers_id']);
         $options = array(array('id' => '', 'text' => TEXT_ALL_CATEGORIES));
       } else {
         echo tep_draw_hidden_field('cPath', $cPath);
         $options = array(array('id' => '', 'text' => TEXT_ALL_MANUFACTURERS));
       }
       echo tep_draw_hidden_field('sort', $HTTP_GET_VARS['sort']);
       while ($filterlist = tep_db_fetch_array($filterlist_query)) {
         $options[] = array('id' => $filterlist['id'], 'text' => $filterlist['name']);
       }
       echo tep_draw_pull_down_menu('filter_id', $options, (isset($HTTP_GET_VARS['filter_id']) ? $HTTP_GET_VARS['filter_id'] : ''), 'onchange="this.form.submit()"');
       echo tep_hide_session_id() . '</form></td></tr>
	</table>' . "\n";
	echo tep_draw_side_bottom();
     }
   }

// Get the right image for the top-right
   $image = DIR_WS_IMAGES . 'table_background_list.gif';
   if (isset($HTTP_GET_VARS['manufacturers_id'])) {
     $image = tep_db_query("select manufacturers_image from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturers_id'] . "'");
     $image = tep_db_fetch_array($image);
     $image = $image['manufacturers_image'];
   } elseif ($current_category_id) {
     $image = tep_db_query("select categories_image from " . TABLE_CATEGORIES . " where categories_id = '" . (int)$current_category_id . "'");
     $image = tep_db_fetch_array($image);
     $image = $image['categories_image'];
   }
?>

			<?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?>

<?php echo tep_draw3_bottom();?>

<?php echo tep_draw_bottom();?>		

</td>
<?php
 } else { // default page
?>
   <td class="<?php echo CONTENT_WIDTH_TD; ?>"><?php echo panel_top(); ?><?php include(DIR_WS_BOXES . 'panel_top2.php');?>

<?php echo tep_draw_top();?>

<!-- Welcome_box_start -->
<?php /*  tep_draw_heading_top();  */?>
<?php /*  tep_draw_heading_top_3();  */?>
<?php   /*  echo tep_draw_prod_top();  */  ?>
    <!--   <table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr><td class="main"><?php /*  echo tep_customer_greeting();  */    ?></td></tr>
         <tr><td><?php    /*  echo tep_draw_separator('pixel_trans.gif', '100%', '10');  */   ?></td></tr>
         <tr><td class="main"><?php    /*   echo TEXT_MAIN;  */    ?></td></tr>
       </table>  -->

<?php   /*  echo tep_draw_prod_bottom();  */   ?>
<?php /*  tep_draw_heading_bottom_3();  */?>
<?php  /*   echo tep_draw_separate();    */   ?> 

<!-- Welcome_box_end -->


			<?php new contentBoxHeading_ProdNew($info_box_contents);?>

<?php echo tep_draw3_top();?>

			<?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS);?>

<?php echo tep_draw3_bottom();?>


			<?php include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS); ?>
<?php echo tep_draw_bottom();?>		

</td>
<?php
 }
?>
<!-- body_text_eof //-->
<td class="<?php echo BOX_WIDTH_TD_RIGHT; ?>"><table border="0" class="<?php echo BOX_WIDTH_RIGHT; ?>" cellspacing="0" cellpadding="0">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

Any help - to just make sure I don't screw it up would be very much appreciated!

Link to comment
Share on other sites

Actually, don't worry about it, I followed Scotts advice (or as near to it I could get) from a post by someone else with the same problem on either page 2 or 3 and it works!

 

Woohoo!

 

Thanks for a great mod - just what I was after.

Link to comment
Share on other sites

After playing around with it (it still works fine), but the layout of the site changes whenever you click on a shop category - it pushes all images to the bottom of the page.

 

Is there something related to the layout of the site that would affect this? All top navigation looks normal, it is only when you view a page that calls up the message using the category links.

 

Something related to the out of office message, seems to be making the site layout wider when it is shown.

 

When attempting to add to basket, the site grows slightly wider, but not much, and the when clicking on a category it grows so much that is shifts the pages main images to the bottom of the screen.

 

If you can help, it would be great, as I love this add on, and would like to see it work perfectly!

Link to comment
Share on other sites

  • 3 months later...

Hi Scott or any1 else

 

Your contribution works wonders... However I have a problem when sending emails in maintenance mode. The email does not send but gives this msg

error.gif Error: An enquiry has already been sent. Please try again in 15 minutes.

even though I did not send a message prior to this.

 

Any idea what could be causing this??

Edited by colageneral
Link to comment
Share on other sites

  • 1 month later...
  • 1 month later...

I can say that I encountered the same issue as colageneral and found out how to resolve the issue.

In my situation, the problem was that I had forgotten to install the module via the admin tool. (Modules > Action Recorder)

 

What happens is that when the module is not installed and you try to send a message via the form on 'index_maintenance', the function that checks whether the module is installed will return false, leading to a default error message being generated. (in this case, the message 'Error: An enquiry has already been sent. Please try again in 15 minutes.')

 

Version info:

* OsCommerce v2.3.1

* Store Mode v1.3 (30/05/2011)

Edited by x0backslash0x
Link to comment
Share on other sites

  • 7 months later...

After playing around with it (it still works fine), but the layout of the site changes whenever you click on a shop category - it pushes all images to the bottom of the page.

 

Is there something related to the layout of the site that would affect this? All top navigation looks normal, it is only when you view a page that calls up the message using the category links.

 

Something related to the out of office message, seems to be making the site layout wider when it is shown.

 

When attempting to add to basket, the site grows slightly wider, but not much, and the when clicking on a category it grows so much that is shifts the pages main images to the bottom of the screen.

 

If you can help, it would be great, as I love this add on, and would like to see it work perfectly!

 

Hello everyone,

 

i have same issue as Nils.

Wenn i click on my categorie in osc 2.3.1 the layout messed up.

 

i see there is a ?> what there have nothing to do, but i don´t find the right code for to delete.

 

i think, that is comming from index.php with changed code to :

<h1><?php echo HEADING_TITLE; ?></h1>

 

<div class="contentContainer">

<?php

// BOF: Store Mode

if (STORE_MODE == 'Closed') {

?>

<div class="stockWarning">

<?php echo CLOSED_MESSAGE . ONLINE_DATE_TIME; ?>

</div>

<?php

}

// EOF: Store Mode

?>

 

have anyone a solution for, or can past his index.php here?

 

greets

Hobbes

Link to comment
Share on other sites

  • 5 weeks later...
  • 3 months later...
  • 3 weeks later...

I have just installed this great contribution on my server that is running the following

 

Osc 2.3.3

PHP 5.4

 

Everything is working like it is supposed to except when I try to submit an email, I get the following error, can someone offer any advise as why i would get this error. The contact form works when the store is OPEN and I have waited the alloted 15 minutes.

 

here is a screen shot of the error I am getting

 

 

 

Any help would be appreciated !!!

 

Thanks

Sandwick

post-213634-0-08645800-1360702588_thumb.png

Edited by sandwick
Link to comment
Share on other sites

  • 1 month later...

Hi, I am new to OsCommerce and I am trying to install this add-on though the front-end of my store is now unavalaible (I mean even in open store mode),I must have done somthing wrong. thanks

Edited by neige
Link to comment
Share on other sites

got a problem I am hoping you can help me with. I went through the latest install notes but when I get to the step of modifiying the Template_top.php. My template_top files does not contain the line it says to look for <?php require(DIR_WS_INCLUDES . 'header.php'); ?>. if I proceed without that step. The left and right columns vanish regardless of settings so it is obviously critical to the process but I cannot figure out what to modify or change.

 

Any help is greatly appreciated.

 

 

Here is the content of my template_top.php for reference.

 

 

<?php

/*

$Id$

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2010 osCommerce

 

Released under the GNU General Public License

*/

 

$oscTemplate->buildBlocks();

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" <?php echo HTML_PARAMS; ?>>

<head>

<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>" />

<title><?php echo tep_output_string_protected($oscTemplate->getTitle()); ?></title>

<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>" />

<link rel="stylesheet" type="text/css" href="ext/jquery/ui/redmond/jquery-ui-1.8.6.css" />

<script type="text/javascript" src="ext/jquery/jquery-1.4.2.min.js"></script>

<script type="text/javascript" src="ext/jquery/ui/jquery-ui-1.8.6.min.js"></script>

 

<?php

if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {

?>

<script type="text/javascript" src="ext/jquery/ui/i18n/jquery.ui.datepicker-<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>.js"></script>

<script type="text/javascript">

$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);

</script>

<?php

}

?>

 

<script type="text/javascript" src="ext/jquery/bxGallery/jquery.bxGallery.1.1.min.js"></script>

<link rel="stylesheet" type="text/css" href="ext/jquery/fancybox/jquery.fancybox-1.3.4.css" />

<script type="text/javascript" src="ext/jquery/fancybox/jquery.fancybox-1.3.4.pack.js"></script>

<link rel="stylesheet" type="text/css" href="ext/960gs/<?php echo ((stripos(HTML_PARAMS, 'dir="rtl"') !== false) ? 'rtl_' : ''); ?>960_24_col.css" />

<link rel="stylesheet" type="text/css" href="stylesheet_MyStyle.css">

<link rel="stylesheet" type="text/css" href="stylesheet.css" />

<?php echo $oscTemplate->getBlocks('header_tags'); ?>

</head>

<body id="MyStyle">

 

<div id="wrapper1">

<?php

// BOF: from header.php -- error message and info message

if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerError">

<td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>

</tr>

</table>

<?php

}

 

if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {

?>

<table border="0" width="100%" cellspacing="0" cellpadding="2">

<tr class="headerInfo">

<td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>

</tr>

</table>

<?php

}

// EOF: from header.php -- error message and info message

 

// Get cart content count for Shopping Cart menu link

$cart_count = '';

if($cart->count_contents() > 0)

{

$cart_count = ' (' . $cart->count_contents() . ')';

}

 

?>

<div id="wrapper2">

<!-- Header -->

<div id="header_wrapper">

<div id="header">

<div id="top_menu">

<span><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">Home</a>'; ?></span>

<span><?php echo '<a href="' . tep_href_link(FILENAME_SPECIALS) . '">' . MODULE_BOXES_SPECIALS_BOX_TITLE . '</a>'; ?></span>

<span><?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT) . '">' . HEADER_TITLE_MY_ACCOUNT . '</a>'; ?></span>

<span><?php echo '<a href="' . tep_href_link(FILENAME_SHOPPING_CART) . '">' . MODULE_BOXES_SHOPPING_CART_BOX_TITLE . $cart_count . '</a>'; ?></span>

<span><?php echo '<a href="' . tep_href_link(FILENAME_CHECKOUT_SHIPPING) . '">' . HEADER_TITLE_CHECKOUT . '</a>'; ?></span>

<?php if (tep_session_is_registered('customer_id')) { ?>

<span><a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>"><?php echo HEADER_TITLE_LOGOFF; ?></a></span>

<?php } ?>

</div>

</div>

<div id="header_background1"></div>

<div id="header_background2"></div>

</div>

<!-- Content and Sidebars-->

<div id="wrapper3">

<div id="content_wrapper">

<div id="content">

<div id="navigation">

You are here:

<?php

// BOF: from header.php -- breadcrumb

echo '  ' . $breadcrumb->trail(' » ');

// EOF: from header.php -- breadcrumb

?>

<hr class="accessibility">

</div>

<div>

Link to comment
Share on other sites

  • 5 months later...

Hi, I used the previous store mode on my old site without problem. I installed this on the v2.3.3.1 and it doesn't seem to work. Everything looks okay, and all the signs show up, but it still allows check-out. I figured i'd dones something wrong, so just gone through the whole install again, but get an error when I run the SQL, maybe because I have done it before. Can anyone help - I need to be able to shut down at Christmas!!

 

Error

 

SQL query:

# NEW RECORDS FOR: STORE MODE ADDON

# THE CONFIGURATION GROUP SORT ORDER MAY BE CHANGED

INSERT INTO configuration_group( configuration_group_id, configuration_group_title, configuration_group_description, sort_order, visible )

VALUES ( 1501, 'Store Mode', 'Open, Closed, or Maintenance Mode', '30', '1' ) ;

 

 

MySQL said: #1062 - Duplicate entry '1501' for key 'PRIMARY'

Edited by zefeena

Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

Link to comment
Share on other sites

  • 10 months later...

I have converted my friends old osCommerce v2.2 RC2a to osCommerce 2.3.3.4

 

We are getting ready to convert the DNS to her new site. We want to test the new site fully before its made available to visitors. The testing will include purchasing a product all the way through paying for it. I have a few questions before I install the add-on:

 

1) I just want to double check that a complete purchase can be made in maintenance mode as long as the Admin IP address accessing the site is correct.

 

2) And I want to see if there's a way to add a second IP address. I was thinking perhaps a change like this (step #8 in the installation text file):

 

if (OFFLINE_IP_ADDRESS != getenv('REMOTE_ADDR') || OFFLINE_IP_ADDRESS != "xxx\.xxx\.xxx\.xxx")    The x's of course representing another IP address. My friend and I want to test the site together. She is in another country so we can't get together in person.

 

 

3) Also, is there a way to include a 503 Service unavailable code so that search engines won't index the maintenance page, but will come back at a later time. Where would I put this?

 

 

 Thanks for any advice you can give!!

 

Brenda

Link to comment
Share on other sites

One more question... if someone has a product page bookmarked, will maintenance mode block them from accessing that page? Or will it at least block them from purchasing if site is in maintenance mode?

Link to comment
Share on other sites

@''B''

 

Rather than going through the trouble of installing an addon to do this, you can use the htaccess file firstly to block all users apart from a known IP address and then to redirect all to a 503 page. There is plenty on the internet about this, but by adding something like

 

Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{REMOTE_ADDR} !^YOUR IP ADDRESS
RewriteCond %{REQUEST_URI} !^http://YOUR WEBSITE.COM/503.php [NC]
RewriteCond %{REQUEST_FILENAME} !.(gif|jpe?g|png)$
RewriteRule .* http://www.YOUR WEBSITE.COM/503.php [R,L]

 

to the top of your htaccess file will do as suggested. Just change YOUR IP ADDRESS to your ip address and change instances of YOUR WEBSITE.COM you your web address.

 

You will also need to create a 503.php file which can contain a message or image telling everyone that your site is undergoing maintenance and will be back soon.  Again I used

<?php
header("HTTP/1.1 503 Service Temporarily Unavailable");
header("Status: 503 Service Temporarily Unavailable");
header("Retry-After: 3600");
?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xml:lang="en" lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Site upgrade in progress</title>
<meta name="robots" content="none" />
</head>
<body>
<h1 align="center">Site upgrade in progress</h1>
<p align="center">This site is being upgraded, and can't currently be accessed.</p>
<p align="center">It should be back up and running very soon. Please check back in a bit!</p>
<p align="center">
<img border="0" src="http://www.YOUR WEBSITE.COM/under-maintenance.png" width="800" height="554"></p>
<p align="center"> </p>

<hr />
</body>
</html>

Hope this helps

REMEMBER BACKUP, BACKUP AND BACKUP

Link to comment
Share on other sites

  • 5 months later...

Hi,

Can anyone help please.  I've just set up a new install and added the store mode (only add on so far).  I have currently set it to 'closed', and if you add the product to cart and choose checkout you go nowhere - all correct. 

 

However, if you press the yellow tab 'paypal express, you can checkout! 

The paypal express has been the bain of my life on my other website, and paypal overides my shipping addresses on that one, so i'm thinking this will do the same.

 

On my old site, my only remedy was to make the express button invisible so no-one pressed it!

 

Because the paypal express module is pre-loaded on the new install I cannot believe that there is not a solution to the problem to prevent people checking out - or is it that the store mode is simply not compatible with paypal express? 

 

I do find closing the checkout when necessary totally essential and really feel this option should be pre-installed anyway - I cannot live without it!!

 

site is www.corsetmaking.co.uk

 

Thank you - and Happy New Year

 

Kellie

Running a botched up version of  osCommerce Online Merchant v2.3.4 bootstrap with the dresscode theme installed, numerous add-ons, terrible coding, terrible website, but will have to make do until I have made up for my losses and can risk shutting down for a couple of weeks while I start all over again. - I did not install my program but am endeavouring to fix it with your help.

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...