Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

I'm setting up my first site using STS and have been able to configure the header and boxes, but can't seem to find out where I configure the elements for the $content tag.

I want to remove the "Welcome Guest...." text and change the look of the main content of the front page.

Can anyone point me in the right direction?

 

Thanks for the pointers, I found that modifying catalog/index.php did the trick, I just removed the bits I don't need.

 

STS is sooo cool!

B)

Link to comment
Share on other sites

I created a template file and saved it as sts_template.html. I then changed the name of the included template to sts_template_bak.htm and uploaded my new file. The layout was fine but the stylesheet settings would not apply. What have I missed?

 

Make sure the stylesheet is linked to the template. Usually you'll do it as shown below, placed inside the <head> tags of the template page:

 

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

 

I think that should do it. If not try removing the forward slash or something.

Link to comment
Share on other sites

Still no luck with putting the $content variable into a <iframe>.

 

I still get the following error inside the frame.

 

Forbidden

You don't have permission to access /catalog/<table border= on this server.

 

Can anyone tell me if this is at all possible??

Link to comment
Share on other sites

Hello all,

First off, thank you for this template contri it works so well! My question is in regards to getting the template to work with the affiliate script. I would like to show the affilate script on my template but have yet to figure out how to make that happened. I've done numerous searches on this forum since I know this had to of come up but have come up short. Could someone explain to me what I need to modify to make this happen?

 

Thanks!

Link to comment
Share on other sites

Hello,

 

I am having a problem using this contribution and Ultra Pics (http://www.oscommerce.com/community/contributions,1642) and now I get an error when I try to enlarge the pictures on my products pages. Ultra Pics and Sts_Template do not use the same files, so I don't know why I can't enlarge images. Has anyone else had this problem or anyone have any ideas about this? Thanks

Link to comment
Share on other sites

Ok, my third posting on this, but I have noticed one thing. My image pop ups use javascript, and a couple other things that use javascript were not working with sts, so what would I have to do to fix this?

Link to comment
Share on other sites

Ok, my third posting on this, but I have noticed one thing.? My image pop ups use javascript, and a couple other things that use javascript were not working with sts, so what would I have to do to fix this?

In the <head section of sts_template.html, you should have an entry similar to the following:

<script language="javascript"><!--
function popupWindow(url) {
window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,
resizable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=15
0,left=150')
}
//--></script>

 

If you don't, the popup won't do anything.

Edited by bashibosh
Link to comment
Share on other sites

How can I use multiple images with STS. All of my pages are customized, so I haven't been able to use contributes like MoPics. For my first image I put $imagelarge where I wanted my image. Is there a way I could put something like $imagelarge2 or something?

Link to comment
Share on other sites

Thanks for the the help. I was reading the sts readme file and found out I needed to put $headercontent in the template. So, I got the code working now. I am now working to get dhtml menu working but was wondering if someone could help me. I found out that when I created a new info box, it loads it correctly, except it leaves out the bottom 3 lines of the file that it is reading. These lines are critical because one of them loads another file to make the menu work. So, I was wondering if anyone could take a look at this with me and help figure this out. If anyone would be interested, post a reply here and we can talk. Thanks

Link to comment
Share on other sites

I'm just about to start my third client site with STS but I have come across a problem I hope theres a solution to.

 

Is there anyway to place the $content variable inside a iframe??

 

My client would like the content panel (product listing etc) to be the only part of the page that moves. The header and left/right colums need to be static.

 

Has anyone achieved this?

I'm trying to use I-frame to, did you get it working ? Or do anyone else know if ot's possible?

 

I want to have the menus $categorybox, $bestsellersbox and $specialfriendbox in the same I-frame so when someone comes to the webshop the $categorybox is open in the I-frame and then they can click on a link or a button so some of the other menus opens in the same I-frame.

 

Is this possible to do ?

Link to comment
Share on other sites

Hi all,

 

I use STS and "Browse by Categories" contribution. "Browse by Categories" need to add modification to index.php but i need to use this separately and create a custom "box" to use with STS. I'm not a coder and i don't know how to make this file stand alone. I'm not sure to be easy to understand because I'm not fluent in english :P

 

This is the code of the the index.php of "Browse by Categories" contribution with change mark by <!-- DWD Contribution -> :

<?php
/*
 $Id: index.php,v 1.1 2003/06/11 17:37:59 hpdl Exp $

 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="stylesheet" type="text/css" href="stylesheet.css">
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- 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 width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <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 . $category['categories_image'], $category['categories_name'], HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
         <!-- DWD Contribution -> Remove: Browse by Categories v2.2. //-->
         <!--
         <tr>
           <td><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr>
         //-->
         <!-- DWD Contribution End. //-->
<?php
   // DWD Contribution -> Remove: Browse by Categories v2.2.
//     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']);
//       $width = (int)(100 / MAX_DISPLAY_CATEGORIES_PER_ROW) . '%';
//       echo '                <td align="center" class="smallText" width="' . $width . '" valign="top"><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) . '<br>' . $categories['categories_name'] . '</a></td>' . "\n";
//       if ((($rows / MAX_DISPLAY_CATEGORIES_PER_ROW) == floor($rows / MAX_DISPLAY_CATEGORIES_PER_ROW)) && ($rows != $number_of_categories)) {
//         echo '              </tr>' . "\n";
//         echo '              <tr>' . "\n";
//       }
//     }
   // DWD Contribution End.

// needed for the new products module shown below
   $new_products_category_id = $current_category_id;
?>
         <!-- DWD Contribution -> Remove: Browse by Categories v2.2. !-->
         <!--
             </tr>
           </table></td>
         </tr>
         //-->
         <!-- DWD Contribution End. //-->

         <!-- DWD Contribution -> Add: Browse by Categories v2.0. !-->
         <tr>
           <td><?php $browse_category_id = $current_category_id; include(DIR_WS_MODULES . FILENAME_BROWSE_CATEGORIES); ?></td>
         </tr>
         <!-- DWD Contribution End. !-->

         <tr>
           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
         </tr>
         <tr>
           <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
         </tr>
       </table></td>
     </tr>
   </table></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, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id 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, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id 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, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_MANUFACTURERS . " m, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id 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, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id 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);
     $listing_sql .= ' order by ';
     switch ($column_list[$sort_col-1]) {
       case 'PRODUCT_LIST_MODEL':
         $listing_sql .= "p.products_model " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_NAME':
         $listing_sql .= "pd.products_name " . ($sort_order == 'd' ? 'desc' : '');
         break;
       case 'PRODUCT_LIST_MANUFACTURER':
         $listing_sql .= "m.manufacturers_name " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_QUANTITY':
         $listing_sql .= "p.products_quantity " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_IMAGE':
         $listing_sql .= "pd.products_name";
         break;
       case 'PRODUCT_LIST_WEIGHT':
         $listing_sql .= "p.products_weight " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
       case 'PRODUCT_LIST_PRICE':
         $listing_sql .= "final_price " . ($sort_order == 'd' ? 'desc' : '') . ", pd.products_name";
         break;
     }
   }
?>
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td class="pageHeading"><?php echo HEADING_TITLE; ?></td>
<?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 '            <td align="center" class="main">' . tep_draw_form('filter', FILENAME_DEFAULT, 'get') . TEXT_SHOW . ' ';
       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 '</form></td>' . "\n";
     }
   }

// 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'];
   }
?>
           <td align="right"><?php echo tep_image(DIR_WS_IMAGES . $image, HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?></td>
     </tr>
   </table></td>
<?php
 } else { // default page
?>
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">
     <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>
     <tr>
       <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
       <td><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>
         <tr>
           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
         </tr>

         <!-- DWD Contribution -> Add: Browse by Categories v2.0. !-->
         <tr>
           <td><br><?php include(DIR_WS_MODULES . FILENAME_BROWSE_CATEGORIES); ?></td>
         </tr>
         <tr>
           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
         </tr>
         <!-- DWD Contribution End. !-->

         <tr>
           <td><?php include(DIR_WS_MODULES . FILENAME_NEW_PRODUCTS); ?></td>
         </tr>
<?php
   include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
?>
       </table></td>
     </tr>
   </table></td>
<?php
 }
?>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- 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 //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

I you want to help me, and you want more details, contact me.

 

Best regards

 

Fab

Link to comment
Share on other sites

I'm just about to start my third client site with STS but I have come across a problem I hope theres a solution to.

 

Is there anyway to place the $content variable inside a iframe??

 

My client would like the content panel (product listing etc) to be the only part of the page that moves. The header and left/right colums need to be static.

 

Has anyone achieved this?

I'm trying to use I-frame to, did you get it working ? Or do anyone else know if ot's possible?

 

I want to have the menus $categorybox, $bestsellersbox and $specialfriendbox in the same I-frame so when someone comes to the webshop the $categorybox is open in the I-frame and then they can click on a link or a button so some of the other menus opens in the same I-frame.

 

Is this possible to do ?

I still need help with this ?

Link to comment
Share on other sites

Well, I managed to post this in the wrong place initially, which shows what a newbie I am. I'll re-post it here in hopes there's an answer.

 

I'm having a temporary cranial disconnect about CSS and a couple of other little picky details.

I understand that with the STS template I'm working with an HTML document I can design myself. Presumably that means I can link it to a stylesheet I design myself.

How does my template/CSS setup interact with the "regular" OSC "stylesheet.css"? Does it replace that for all aspects of the site? Do I need to declare in my sheet all the styles that are in that one? Do they cascade? Exist independently? I'm thinking specifically of the box styles, including their fonts, sizes, and colors. This would doubtless also encompass breadcrumb styles and a lot of other details I'm forgetting.

I'm also wondering about a specific contribution: Big Images. This has worked to perfection for me on "out of the box" OSC installations.

Finally, is it possible to add "back/next" links on product info pages?

Thanks in advance,

Anne

Link to comment
Share on other sites

one question:

 

does sts interfere with google and other serach engines. my pages are not being scanned at all despite that googlebot and yahoo's and overture search engine comes to the site, scan main page, then any page thats simple html (like popup windows txt etc...), i mean non sts pages and thats it. 6 months no luck on that. wondering if sts might be problem as all pages have same title, same links just middle pagelet is different.

 

thanks,

Link to comment
Share on other sites

:( I posted this message already three times in the wrong place! I'm such a newbie!!!

 

I installed all the files as the readme explained and when I try to load my catalog I get this...

Any idea why?

I desperately need some help...

 

 

Warning: main(includes/sts_display_output.php): failed to open stream: No such file or directory in /home/univers/public_html/catalog/includes/application_bottom.php on line 18

 

Fatal error: main(): Failed opening required 'includes/sts_display_output.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/univers/public_html/catalog/includes/application_bottom.php on line 18

Link to comment
Share on other sites

Flip,

 

installed all the files as the readme explained and when I try to load my catalog I get this...

Any idea why?

I desperately need some help...

 

 

Warning: main(includes/sts_display_output.php): failed to open stream: No such file or directory in /home/univers/public_html/catalog/includes/application_bottom.php on line 18

 

Fatal error: main(): Failed opening required 'includes/sts_display_output.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/univers/public_html/catalog/includes/application_bottom.php on line 18

 

I don't think you followed the readme file completely, also check the faq's on Brians site.

 

You probably didn't modify your configure.php file therefore OSC doesn't know about the file. Don't copy over your configure file. Download it from your server and modify it accordingly then re-upload and you should be all set!

 

hth

Greg

I only do what my Rice Krispies tell me to do!

Link to comment
Share on other sites

Dan,

 

does sts interfere with google and other serach engines. my pages are not being scanned at all despite that googlebot and yahoo's and overture search engine comes to the site, scan main page, then any page thats simple html (like popup windows txt etc...), i mean non sts pages and thats it. 6 months no luck on that. wondering if sts might be problem as all pages have same title, same links just middle pagelet is different.

 

STS shouldn't interfere w/ googlebots, however because all the page titles are the same, google most likely isn't indexing those pages because they are considered duplicates. I suggest adding Linda's header tag controller contribution. This way you can change all the page titles, descriptions, and meta tags then google and others should be able to index your pages correctly and you should also get better search engine placement

 

Greg

I only do what my Rice Krispies tell me to do!

Link to comment
Share on other sites

Anne,

 

I understand that with the STS template I'm working with an HTML document I can design myself. Presumably that means I can link it to a stylesheet I design myself.

How does my template/CSS setup interact with the "regular" OSC "stylesheet.css"? Does it replace that for all aspects of the site? Do I need to declare in my sheet all the styles that are in that one? Do they cascade? Exist independently? I'm thinking specifically of the box styles, including their fonts, sizes, and colors. This would doubtless also encompass breadcrumb styles and a lot of other details I'm forgetting.

 

As with any HTML document and stylesheets, your template will use whichever stylesheet you link it to. I would suggest adding any new styles you define into the standard OSC stylesheet. This would probably make your life a little simpler.

 

I'm also wondering about a specific contribution: Big Images. This has worked to perfection for me on "out of the box" OSC installations.

Finally, is it possible to add "back/next" links on product info pages?

 

This should all be possible. You will probably have to create/define the tags in the sts_user_code.php file then add them to your product info pages. Not 100% positive on this one though.

 

Greg

I only do what my Rice Krispies tell me to do!

Link to comment
Share on other sites

I'm just about to start my third client site with STS but I have come across a problem I hope theres a solution to.

 

Is there anyway to place the $content variable inside a iframe??

 

My client would like the content panel (product listing etc) to be the only part of the page that moves. The header and left/right colums need to be static.

 

Has anyone achieved this?

I'm trying to use I-frame to, did you get it working ? Or do anyone else know if ot's possible?

 

I want to have the menus $categorybox, $bestsellersbox and $specialfriendbox in the same I-frame so when someone comes to the webshop the $categorybox is open in the I-frame and then they can click on a link or a button so some of the other menus opens in the same I-frame.

 

Is this possible to do ?

I still need help with this ?

I've still not been able to get it working. I'm starting to think it isn't possible without heavy modification to oscommerce.

Link to comment
Share on other sites

HOW TO CREATE PRODUCT-SPECIFIC TEMPLATES IN STS:

 

 

STS is awesome, but currently you can only create one generic template for all the products.  The code below will allow you to create templates for every single product in your store.  This will allow you to put extra pics on a particular product page, put additional info about a product, and even do cross-selling and upselling.  The possibilities are endless!

 

This code was contributed by Chris Langtiw (screen name: Jaxx), and I take no credit.

 

If you are using STS 2.01, look in sts_display_output.php around line 116 for this code:

 

// Look for category-specific template file like "index.php_1_17.html"
?$sts_check_file = STS_TEMPLATE_DIR . "index.php_$sts_cpath.html";

?if (file_exists($sts_check_file)) {
? ?// Use it
? ?$sts_template_file = $sts_check_file;
?} 

}

 

 

Right below this code (stated above), put this code:

 

///////Product-specific templates (contributed by Chris L.)
// Are we in the product_info.php script?
if ($scriptbasename == "product_info.php") {
// Look to see whether the product id was sent, otherwise don't bother
if (isset($HTTP_GET_VARS['products_id'])) {
? $sts_productid = $HTTP_GET_VARS['products_id'];

? // Look for product-specific template file like "product_info.php_17.html"
? $sts_check_file = STS_TEMPLATE_DIR . "product_info.php_$sts_productid.html";

? if (file_exists($sts_check_file)) {
? ? // Use it
? ? $sts_template_file = $sts_check_file;
? } 
}
}
///////

 

 

So for example, a template for product with ID=17 would look like: "product_info.php_17.html".

 

*IDEA: Also if you have lots of products, and you want 1 template for say all your computer-related products which have ID's 1-20, you could change the code above a little and add an IF statement to check a range of ID's and then call a specific template for all those products.  I haven't done this myself and so I can't help you out on it, but it seems like it would be easy to do.

 

Anyway, this code works for me.  Hopefully it will work for you guys too!

 

-Philip

how to do that to only display the related subcatagories in "MULTIPLE CATEGORY TEMPLATES". for example, I choose the "DVD movie" option , the catalogries infobox have only display "action,cartoon........." only related subcatagories.( pls see the attachment)

 

my english is not good, I hope you will understand my meaning .

 

sts.gif

Link to comment
Share on other sites

Hi all

 

Installed this excellent contribution some time ago and its both powerfull and easy to use, wanted to say thanks to the contributor.

 

While im here though, anyone know why it leaves a gap when a particular infobox is not bieng displayed by oscommerce, Like so:

 

Image1.jpg

 

When all the Infoboxes are visable there is only the standard gap, have played around with the sts template endlessly and cannot get rid of it.

 

Any ideas???

 

Thanks in advance

 

Ian

Hi Ian,

 

I want to make a template similar to your template, would you tell me how to do that ???? I'm a newbie in OSC & STS & don't know any php script.

 

I hope you will give me some tips.

 

Thank you very much!!!!!!!

 

Martin

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