Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Well I've gone ahead and installed STS 4.6 manually, on a not-too modified RC2a.

 

When I go to Admin > Modules to turn it on, I get this error:

 

Parse error: syntax error, unexpected T_DEFAULT in /home/www/blah/catalog/admin/modules.php on line 256

 

 

Here is my admin/modules.php - the line in question is just after the second STS edit, I've untabbed it to make it stick out a bit. Any help gratefully received.

 

<?php
/*
 $Id: modules.php 1802 2008-01-11 16:59:17Z hpdl $

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

 Copyright (c) 2008 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 $set = (isset($HTTP_GET_VARS['set']) ? $HTTP_GET_VARS['set'] : '');

 if (tep_not_null($set)) {
   switch ($set) {

// START STS 4.1
case 'sts':
$module_type = 'sts';
$module_directory = DIR_FS_CATALOG_MODULES . 'sts/';
$module_key = 'MODULE_STS_INSTALLED';
define('HEADING_TITLE', HEADING_TITLE_MODULES_STS); 
break;
// END STS 4.1

     case 'shipping':
       $module_type = 'shipping';
       $module_directory = DIR_FS_CATALOG_MODULES . 'shipping/';
       $module_key = 'MODULE_SHIPPING_INSTALLED';
       define('HEADING_TITLE', HEADING_TITLE_MODULES_SHIPPING);
       break;
     case 'ordertotal':
       $module_type = 'order_total';
       $module_directory = DIR_FS_CATALOG_MODULES . 'order_total/';
       $module_key = 'MODULE_ORDER_TOTAL_INSTALLED';
       define('HEADING_TITLE', HEADING_TITLE_MODULES_ORDER_TOTAL);
       break;
     case 'payment':
     default:
       $module_type = 'payment';
       $module_directory = DIR_FS_CATALOG_MODULES . 'payment/';
       $module_key = 'MODULE_PAYMENT_INSTALLED';
       define('HEADING_TITLE', HEADING_TITLE_MODULES_PAYMENT);
       break;
   }
 }

 $action = (isset($HTTP_GET_VARS['action']) ? $HTTP_GET_VARS['action'] : '');

 if (tep_not_null($action)) {
   switch ($action) {
     case 'save':
       while (list($key, $value) = each($HTTP_POST_VARS['configuration'])) {
         tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $value . "' where configuration_key = '" . $key . "'");
       }
       tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']));
       break;
     case 'install':
     case 'remove':
       $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
       $class = basename($HTTP_GET_VARS['module']);
       if (file_exists($module_directory . $class . $file_extension)) {
         include($module_directory . $class . $file_extension);
         $module = new $class;
         if ($action == 'install') {
           $module->install();
         } elseif ($action == 'remove') {
           $module->remove();
         }
       }
       tep_redirect(tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class));
       break;
   }
 }
?>
<!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>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script language="javascript" src="includes/general.js"></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="2" cellpadding="2">
 <tr>
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="1" cellpadding="1" class="columnLeft">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </table></td>
<!-- body_text //-->
   <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
     <tr>
       <td width="100%"><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_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>
         </tr>
       </table></td>
     </tr>
     <tr>
       <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
         <tr>
           <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2">
             <tr class="dataTableHeadingRow">
               <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_MODULES; ?></td>
               <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_SORT_ORDER; ?></td>
               <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td>
             </tr>
<?php
 $file_extension = substr($PHP_SELF, strrpos($PHP_SELF, '.'));
 $directory_array = array();
 if ($dir = @dir($module_directory)) {
   while ($file = $dir->read()) {
     if (!is_dir($module_directory . $file)) {
       if (substr($file, strrpos($file, '.')) == $file_extension) {
         $directory_array[] = $file;
       }
     }
   }
   sort($directory_array);
   $dir->close();
 }

 $installed_modules = array();
 for ($i=0, $n=sizeof($directory_array); $i<$n; $i++) {
   $file = $directory_array[$i];

   include(DIR_FS_CATALOG_LANGUAGES . $language . '/modules/' . $module_type . '/' . $file);
   include($module_directory . $file);

   $class = substr($file, 0, strrpos($file, '.'));
   if (tep_class_exists($class)) {
     $module = new $class;
     if ($module->check() > 0) {
       if ($module->sort_order > 0) {
         $installed_modules[$module->sort_order] = $file;
       } else {
         $installed_modules[] = $file;
       }
     }

     if ((!isset($HTTP_GET_VARS['module']) || (isset($HTTP_GET_VARS['module']) && ($HTTP_GET_VARS['module'] == $class))) && !isset($mInfo)) {
       $module_info = array('code' => $module->code,
                            'title' => $module->title,
                            'description' => $module->description,
                            'status' => $module->check(),
                            'signature' => (isset($module->signature) ? $module->signature : null));

       $module_keys = $module->keys();

       $keys_extra = array();
       for ($j=0, $k=sizeof($module_keys); $j<$k; $j++) {
         $key_value_query = tep_db_query("select configuration_title, configuration_value, configuration_description, use_function, set_function from " . TABLE_CONFIGURATION . " where configuration_key = '" . $module_keys[$j] . "'");
         $key_value = tep_db_fetch_array($key_value_query);

         $keys_extra[$module_keys[$j]]['title'] = $key_value['configuration_title'];
         $keys_extra[$module_keys[$j]]['value'] = $key_value['configuration_value'];
         $keys_extra[$module_keys[$j]]['description'] = $key_value['configuration_description'];
         $keys_extra[$module_keys[$j]]['use_function'] = $key_value['use_function'];
         $keys_extra[$module_keys[$j]]['set_function'] = $key_value['set_function'];
       }

       $module_info['keys'] = $keys_extra;

       $mInfo = new objectInfo($module_info);
     }

     if (isset($mInfo) && is_object($mInfo) && ($class == $mInfo->code) ) {
       if ($module->check() > 0) {
         echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class . '&action=edit') . '\'">' . "\n";
       } else {
         echo '              <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)">' . "\n";
       }
     } else {
       echo '              <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class) . '\'">' . "\n";
     }
?>
               <td class="dataTableContent"><?php echo $module->title; ?></td>
               <td class="dataTableContent" align="right"><?php if (is_numeric($module->sort_order)) echo $module->sort_order; ?></td>
               <td class="dataTableContent" align="right"><?php if (isset($mInfo) && is_object($mInfo) && ($class == $mInfo->code) ) { echo tep_image(DIR_WS_IMAGES . 'icon_arrow_right.gif'); } else { echo '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $class) . '">' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
             </tr>
<?php
   }
 }

 ksort($installed_modules);
 $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = '" . $module_key . "'");
 if (tep_db_num_rows($check_query)) {
   $check = tep_db_fetch_array($check_query);
   if ($check['configuration_value'] != implode(';', $installed_modules)) {
     tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . implode(';', $installed_modules) . "', last_modified = now() where configuration_key = '" . $module_key . "'");
   }
 } else {
   tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Installed Modules', '" . $module_key . "', '" . implode(';', $installed_modules) . "', 'This is automatically updated. No need to edit.', '6', '0', now())");
 }
?>
             <tr>
               <td colspan="3" class="smallText"><?php echo TEXT_MODULE_DIRECTORY . ' ' . $module_directory; ?></td>
             </tr>
           </table></td>
<?php
 $heading = array();
 $contents = array();

 switch ($action) {
   case 'edit':
     $keys = '';
     reset($mInfo->keys);
     while (list($key, $value) = each($mInfo->keys)) {
       $keys .= '<b>' . $value['title'] . '</b><br>' . $value['description'] . '<br>';

       if ($value['set_function']) {
         eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
	// STS V4.6 drop start
       } else {
		if($key == 'MODULE_STS_TEMPLATE_FOLDER'){
			$dir_name = array();
			if ($handle = opendir('../'.MODULE_STS_TEMPLATES_FOLDER.'/')) {
			   while (false !== ($file = readdir($handle))) {
					$pos = strpos($file, ".");
					if($pos === false){
						$dir_name[] = array("id" => $file, "text" => $file);
						$i++;
					}
				}
				closedir($handle);
			}
			$keys .= tep_draw_pull_down_menu('configuration[MODULE_STS_TEMPLATE_FOLDER]', $dir_name, $value['value']);
		}else{
			$keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
		}
       }
	// STS V4.6 drop end
         $keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
       }
       $keys .= '<br><br>';
     }
     $keys = substr($keys, 0, strrpos($keys, '<br><br>'));

     $heading[] = array('text' => '<b>' . $mInfo->title . '</b>');

     $contents = array('form' => tep_draw_form('modules', FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module'] . '&action=save'));
     $contents[] = array('text' => $keys);
     $contents[] = array('align' => 'center', 'text' => '<br>' . tep_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $HTTP_GET_VARS['module']) . '">' . tep_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
     break;
default:
     $heading[] = array('text' => '<b>' . $mInfo->title . '</b>');

     if ($mInfo->status == '1') {
       $keys = '';
       reset($mInfo->keys);
       while (list(, $value) = each($mInfo->keys)) {
         $keys .= '<b>' . $value['title'] . '</b><br>';
         if ($value['use_function']) {
           $use_function = $value['use_function'];
           if (ereg('->', $use_function)) {
             $class_method = explode('->', $use_function);
             if (!is_object(${$class_method[0]})) {
               include(DIR_WS_CLASSES . $class_method[0] . '.php');
               ${$class_method[0]} = new $class_method[0]();
             }
             $keys .= tep_call_function($class_method[1], $value['value'], ${$class_method[0]});
           } else {
             $keys .= tep_call_function($use_function, $value['value']);
           }
         } else {
           $keys .= $value['value'];
         }
         $keys .= '<br><br>';
       }
       $keys = substr($keys, 0, strrpos($keys, '<br><br>'));

       $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $mInfo->code . '&action=remove') . '">' . tep_image_button('button_module_remove.gif', IMAGE_MODULE_REMOVE) . '</a> <a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . (isset($HTTP_GET_VARS['module']) ? '&module=' . $HTTP_GET_VARS['module'] : '') . '&action=edit') . '">' . tep_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');

       if (isset($mInfo->signature) && (list($scode, $smodule, $sversion, $soscversion) = explode('|', $mInfo->signature))) {
         $contents[] = array('text' => '<br>' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ' <b>' . TEXT_INFO_VERSION . '</b> ' . $sversion . ' (<a href="http://sig.oscommerce.com/' . $mInfo->signature . '" target="_blank">' . TEXT_INFO_ONLINE_STATUS . '</a>)');
       }

       $contents[] = array('text' => '<br>' . $mInfo->description);
       $contents[] = array('text' => '<br>' . $keys);
     } else {
       $contents[] = array('align' => 'center', 'text' => '<a href="' . tep_href_link(FILENAME_MODULES, 'set=' . $set . '&module=' . $mInfo->code . '&action=install') . '">' . tep_image_button('button_module_install.gif', IMAGE_MODULE_INSTALL) . '</a>');

       if (isset($mInfo->signature) && (list($scode, $smodule, $sversion, $soscversion) = explode('|', $mInfo->signature))) {
         $contents[] = array('text' => '<br>' . tep_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ' <b>' . TEXT_INFO_VERSION . '</b> ' . $sversion . ' (<a href="http://sig.oscommerce.com/' . $mInfo->signature . '" target="_blank">' . TEXT_INFO_ONLINE_STATUS . '</a>)');
       }

       $contents[] = array('text' => '<br>' . $mInfo->description);
     }
     break;
 }

 if ( (tep_not_null($heading)) && (tep_not_null($contents)) ) {
   echo '            <td width="25%" valign="top">' . "\n";

   $box = new box;
   echo $box->infoBox($heading, $contents);

   echo '            </td>' . "\n";
 }
?>
         </tr>
       </table></td>
     </tr>
   </table></td>
<!-- body_text_eof //-->
 </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'); ?>

Edited by MattReid

Share this post


Link to post
Share on other sites

Well I've gone ahead and installed STS 4.6 manually, on a not-too modified RC2a.

 

When I go to Admin > Modules to turn it on, I get this error:

 

Parse error: syntax error, unexpected T_DEFAULT in /home/www/blah/catalog/admin/modules.php on line 256

 

 

 

Matt,

 

thumbsup.gif Anytime you manually install a contribution that also provides the files that need to edited as well, it helps to compare the two to see where things may have gone wrong.

 

blush.gif With that said, the error lies in my instructions. I mistakenly cropped some of the code out in the "cut and paste" when making the manual instructions.

 

Make sure you did not add an extra } at the end of that code segment. It should look like the following:

 

        eval('$keys .= ' . $value['set_function'] . "'" . $value['value'] . "', '" . $key . "');");
 // STS V4.6 drop start
       } else {
  if($key == 'MODULE_STS_TEMPLATE_FOLDER'){
   $dir_name = array();
   if ($handle = opendir('../'.MODULE_STS_TEMPLATES_FOLDER.'/')) {
       while (false !== ($file = readdir($handle))) {
     $pos = strpos($file, ".");
     if($pos === false){
      $dir_name[] = array("id" => $file, "text" => $file);
      $i++;
     }
    }
    closedir($handle);
   }
   $keys .= tep_draw_pull_down_menu('configuration[MODULE_STS_TEMPLATE_FOLDER]', $dir_name, $value['value']);
  }else{
   $keys .= tep_draw_input_field('configuration[' . $key . ']', $value['value']);
  }
       }
 // STS V4.6 drop end
       $keys .= '<br><br>';
       }
       $keys = substr($keys, 0, strrpos($keys, '<br><br>'));


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Thanks very much Bill, that's got it. I am trying to use WinMerge a lot to try to fathom what the heck is going on, but I'm painfully aware that this is only my second shop (first not quite finished) and this is my introduction to php, so I'm taking big bites. Even the forum's pretty daunting at this stage, so thanks for your :thumbsup: :blush: stuff. If I start to get any kind of profit at the end of this learning curve, rest assured it's in my ethics to feel begrudgingly obliged to stump up.

 

 

I might be back with more stupid questions, can you tell? :-" I'm trying hard to hammer stuff out for myself, really I am. Now enough chit chat, I'm off to figure out how to actually use the thing.

.

Edited by MattReid

Share this post


Link to post
Share on other sites

Good morning all. Just installed v4.6 and now I have one heck of an problem. Shipping quotation contrib. is not working. It is still bringing up the pop-up but instead of bringing up the shipping calculator I get a base template with all of the code displayed.

 

Being that I am not all that familiar with php and just learning about the contribs I am kind of at a loss here on where to look let alone what to fix.

 

Any hints or suggestions would be greatly appreciated.

 

btw....RC2a version.


T. Patterson

Share this post


Link to post
Share on other sites

Good morning all. Just installed v4.6 and now I have one heck of an problem. Shipping quotation contrib. is not working. It is still bringing up the pop-up but instead of bringing up the shipping calculator I get a base template with all of the code displayed.

 

Being that I am not all that familiar with php and just learning about the contribs I am kind of at a loss here on where to look let alone what to fix.

 

Any hints or suggestions would be greatly appreciated.

 

btw....RC2a version.

 

 

Not sure which contribution you are referring to as I use a shipping estimator that does not use popups and it works just fine with STS.

 

With that said, STS allows you to "exempt" a script from being templated by STS. See the following post on how to do this:

 

Exclude a page from being used by STS


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

My freshly installed STS 4.6 is displaying half of its own template buttons (eg: cart Update) and half of my old buttons from catalog\includes\languages\english\images\buttons (eg: cart Checkout)

 

 

What is the logic here, please?

 

.

Edited by MattReid

Share this post


Link to post
Share on other sites

My freshly installed STS 4.6 is displaying half of its own template buttons (eg: cart Update) and half of my old buttons from catalog\includes\languages\english\images\buttons (eg: cart Checkout)

What is the logic here, please?

 

Are you sure all buttons are present in the template folder? Did you had previously a stock store installed? Did you clear your computer cache?

Share this post


Link to post
Share on other sites

Not sure which contribution you are referring to as I use a shipping estimator that does not use popups and it works just fine with STS.

 

With that said, STS allows you to "exempt" a script from being templated by STS. See the following post on how to do this:

 

Exclude a page from being used by STS

 

Sorry about that Bill....I guess knowing which contrib is effected could help just a little bit :-"

 

I am using (or trying to use anyway) the Ship_Estimator_v2.2.2


T. Patterson

Share this post


Link to post
Share on other sites

Not sure which contribution you are referring to as I use a shipping estimator that does not use popups and it works just fine with STS.

 

With that said, STS allows you to "exempt" a script from being templated by STS. See the following post on how to do this:

 

Exclude a page from being used by STS

 

Bill, I have read through that thread but I do not see what you are referring to. Everything else looks great with the STS templates, only that one function that is causing the problem. Which shipping estimator are you using?


T. Patterson

Share this post


Link to post
Share on other sites

i've a nice template and you can install if you want. it doesn't require sts. it goes as a fresh installation. you can look at the view at www.xxxxxx.com

 

 

Why are you posting this in the STS Support Thread?? Please don't.

Edited by bkellum

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Bill, I have read through that thread but I do not see what you are referring to. Everything else looks great with the STS templates, only that one function that is causing the problem. Which shipping estimator are you using?

 

The link pointed to this post....

 

How to exclude a page from being templated in STSv4.5.x:

 

In the sts_default.php file, find the following code:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
         return ''; // We don't use template for these scripts

Add your php file that you want STS to exclude and it will not template that file. Note: Add the script name as follows:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "your_script_here")|| strstr($scriptbasename, "info_shopping_cart"))
         return ''; // We don't use template for these scripts

 

That should do the trick for you.

Hope this helped,


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

My freshly installed STS 4.6 is displaying half of its own template buttons (eg: cart Update) and half of my old buttons from catalog\includes\languages\english\images\buttons (eg: cart Checkout)

 

 

What is the logic here, please?

 

.

 

Matt,

 

Did you read the section in the STS User Manual regarding the button sets?


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

The link pointed to this post....

 

How to exclude a page from being templated in STSv4.5.x:

 

In the sts_default.php file, find the following code:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
         return ''; // We don't use template for these scripts

Add your php file that you want STS to exclude and it will not template that file. Note: Add the script name as follows:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "your_script_here")|| strstr($scriptbasename, "info_shopping_cart"))
         return ''; // We don't use template for these scripts

 

That should do the trick for you.

Hope this helped,

 

Thanks a million that did the trick! It took me a few times to figure out just what the script name was supposed to be....but after trying about a dozen variations it finally worked. I appreciate the help.

 

Todd


T. Patterson

Share this post


Link to post
Share on other sites

Matt,

 

Did you read the section in the STS User Manual regarding the button sets?

Sorry sir, I did, but I probably saw the next portentious section coming and skimmed the buttons a bit. Still, I wouldn't have expected a half-and-half situation on the standard button set, so I thought I'd done something wrong. :blush:

Edited by MattReid

Share this post


Link to post
Share on other sites

Sorry sir, I did, but I probably saw the next portentious section coming and skimmed the buttons a bit. Still, I wouldn't have expected a half-and-half situation on the standard button set, so I thought I'd done something wrong. blush.gif

 

 

Not a problem Matt. Thanks for posting back. thumbsup.gif


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Good good sir.

 

 

My next problem is with the fact that (for example) $content$ bundles everything together, so unlike the original osCommerce, you cannot assign different font attributes to a page heading, for example the word "Categories" or "Contact us" or the product name and price at the top of product_info. While I'm trying to work out how to get around this, any clues?

Share this post


Link to post
Share on other sites

Good good sir.

 

 

My next problem is with the fact that (for example) $content$ bundles everything together, so unlike the original osCommerce, you cannot assign different font attributes to a page heading, for example the word "Categories" or "Contact us" or the product name and price at the top of product_info. While I'm trying to work out how to get around this, any clues?

 

You can use a specific product_info.php.html template and put it into the /content/ folder. So you can design your product info page till the smallest detail using all tags in file sts_inc/product_info.php

You can also make specific templates for the info boxes. In both case you can create special css rules and apply them to the tags.

 

If you don't want to do this, then you can still alter the original php files either assigning style definitions into the file itself or using css, in the same way you would do without sts. The $content$ will appear as you styled it.

 

Or you can do a combination of both

Share this post


Link to post
Share on other sites

Good good sir.

 

 

My next problem is with the fact that (for example) $content$ bundles everything together, so unlike the original osCommerce, you cannot assign different font attributes to a page heading, for example the word "Categories" or "Contact us" or the product name and price at the top of product_info. While I'm trying to work out how to get around this, any clues?

 

 

There is nothing in the original osCommerce (meaning you have not installed any contributions) that cannot be done in STS. You need to familiarize yourself with the stylesheet as well as get a good tool that will allow you to view the parts of the page that is style dependent (web toolbar in your browser).


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Thanks guys.

 

Bill, do you mean like the 'Developer Tools' F12 function in IE?

 

 

Yes, that would be the one. If you go to View | Class ID Information, you will see the style associated with each element on your page.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

STS + Ultra Pics + lightbox

 

You need to do a couple of things...

 

At the end of this solution I should make :

 

-----------------

 

Then, in your content template (template_folder/content/product_info.php.html), add your new STS tags where you want them: For example:

$products_image_sm_1$

 

-----------------

 

But I don't have template_folder/content/product_info.php.html :( . I am using freeoscommerce_009 template . When I press on enlarge button nothing happens . If STS is disabled enlarge works good.

Share this post


Link to post
Share on other sites

STS + Ultra Pics + lightbox

 

You need to do a couple of things...

 

At the end of this solution I should make :

 

-----------------

 

Then, in your content template (template_folder/content/product_info.php.html), add your new STS tags where you want them: For example:

$products_image_sm_1$

 

-----------------

 

But I don't have template_folder/content/product_info.php.html sad.gif . I am using freeoscommerce_009 template . When I press on enlarge button nothing happens . If STS is disabled enlarge works good.

 

thumbsup.gif Then you should simply add the folder to that template set and put your content template inside it. It's not called Simple Template System for nothing whistling.giflaugh.gif


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×