Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Hi all,

 

A picture will be better to explain my problem with STS 4.1

All is working fine with templates configuration for categories (including infoboxes templates); except with $content.

The content template displayed here for testing is the file product_info.php_26.html fitted in the full directory of the STS v4.1 package. This file is located in my specific sub-directory sts_templates/atelier/content

It is detected but not executed.

 

Does anyone could help me ? Any help will be very appreciated.

 

Jacques

 

screen.jpg

Link to comment
Share on other sites

To Shittli: if the object $sts exists, it means that STS is installed. Then you have to check with

$sts->display_template_output == true

that STS is enabled.

 

To Jaques: check in admin the configuration of the product_info module: under "Files to include for a content template" you must have product_info.php listed.

 

- Rigadin

Link to comment
Share on other sites

Rigadin, thanks a lot for your fast answer & solution!

Kind regards, Thomas

 

To Schittli: if the object $sts exists, it means that STS is installed. Then you have to check with
$sts->display_template_output == true

that STS is enabled.

Link to comment
Share on other sites

The STS updates by Cally are causing the double header problem. The infoboxes templating is working fine, you have to define a template for the infobox header and a template for the content.

 

You can find here a list of what to install to have the latest working version.

Hey Chris, thanks for making that VERY USEFUL link. Good Job! I'll pass it along to all who ask.

 

Bill Kellum

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

Spoke too soon....

 

After changing the path and domain settings in my configure file I started seeing product and navigation images. So I thought I was fine, except I wasn't. When I tested a purchase I saw that my "add to cart", "checkout", etc. images were still missing. These are all the images that are in the includes/languages/english/images/buttons/ directory. Basically OSC was looking for the includes directory in my root directory, rather than in my catalog directory.

 

I tried to find where this path was being created but felt a little lazy. So I quick fixed it by copying the includes directory to my root, which worked fine. Now I'm trying to integrate the Paypal Web Payments Pro contribution into my OSC install and I'm getting the same problem with some of the images... (OSC is looking for a specific file in my root directory rather than under my catalog). Tried my quick fix and it worked for the images, but not for the functionality of the paypal WPP contribution.

 

The short of it. I need to figure out how to get my OSC install to not look for some directories in my root when it should be looking in my catalog directory. As best I can tell, something in my STS install is causing this bug.

 

Any thoughts?

 

-jlr1001

How did you install Oscommerce? It appears that your configuration files are all screwed up. I may be wrong, but this does not appear to be a STS problem. Since OSC is trying to look in the root for you images, you must have set it up to do so during the OSC install. Check all of your paths to be sure you have not inverted root paths for catalog paths. Remove STS and see if you are still experiencing the broken image links in the standard store frontend.

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

Spoke too soon....

 

After changing the path and domain settings in my configure file I started seeing product and navigation images. So I thought I was fine, except I wasn't. When I tested a purchase I saw that my "add to cart", "checkout", etc. images were still missing. These are all the images that are in the includes/languages/english/images/buttons/ directory. Basically OSC was looking for the includes directory in my root directory, rather than in my catalog directory.

 

I tried to find where this path was being created but felt a little lazy. So I quick fixed it by copying the includes directory to my root, which worked fine. Now I'm trying to integrate the Paypal Web Payments Pro contribution into my OSC install and I'm getting the same problem with some of the images... (OSC is looking for a specific file in my root directory rather than under my catalog). Tried my quick fix and it worked for the images, but not for the functionality of the paypal WPP contribution.

 

The short of it. I need to figure out how to get my OSC install to not look for some directories in my root when it should be looking in my catalog directory. As best I can tell, something in my STS install is causing this bug.

 

Any thoughts?

 

-jlr1001

Take a look here.

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

I have installed a few contributions that I want in my product's pages like the:

box_qty_in_product_info

more_pics_6_v1.2

PDF_data_sheet_v1.5

but I cannot make them work when STS is enabled.

I succesfully added some new infoboxes with coding the new variables into sts_user_code.php file, but I don't seem to make it through the product page, although I searched this forum looking for related help and also read the documentation several times...

Anyone knows what am I missing?

Link to comment
Share on other sites

Hi all, I'm having a very peculiar problem. I have spent almost 4 hours searching but there is no post addressing this problem.

 

When I access my catalog (the index page to be specific), the TEXT_MAIN and a few other bits of text are missing. When I turn STS off, they show up correctly.

 

Could anyone give me a hint as to why this might happen. This problem also reared its head on a previous website I was doing - without a solution, but it was easy to work around because oscommerce's cart was the only thing we were using on that project. I need to use the oscommerce pages this time around and any help would be greatly appreciated.

 

I can supply code from any required pages.

 

Thanks for your time and any help you can give.

 

Mo.

Link to comment
Share on other sites

How did you install Oscommerce? It appears that your configuration files are all screwed up. I may be wrong, but this does not appear to be a STS problem. Since OSC is trying to look in the root for you images, you must have set it up to do so during the OSC install. Check all of your paths to be sure you have not inverted root paths for catalog paths. Remove STS and see if you are still experiencing the broken image links in the standard store frontend.

 

I should have mentioned this before since this is a big piece of the picture...

 

This is an OSC v. install using fantastico. So the paths and directories in my configuration file were set for me, and I've confirmed that they're pointing to the right places.

 

The reason I keep thinking this is a problem with STS is that the default template (when I have STS turned off) works fine. I've tried to see if it was a problem with my.....

 

Hold on....

 

(Checks something)

 

Got it. And it was a silly problem.

 

As I was typing I was mentally running through how I typically write html. It occurred to me that declaring a base url might be the cause of the problem. And it happens that I still had such a declaration in my template--a legacy piece of markup from the initial design/testing phase.

 

After removing that base href tag and restoring my configure.php file to its default, the template's now working as it should...

 

Thanks for everyone who responded, hopefully this gaffe on my part will be of some help to people.

 

 

 

 

-jlr1001

Link to comment
Share on other sites

To Shittli: if the object $sts exists, it means that STS is installed. Then you have to check with
$sts->display_template_output == true

that STS is enabled.

 

To Jaques: check in admin the configuration of the product_info module: under "Files to include for a content template" you must have product_info.php listed.

 

- Rigadin

 

Thank you very much !

It's working now.

 

Jacques

Link to comment
Share on other sites

Hi -- I'm new here and to OsCommerce in general.

I have essentially no knowledge in PHP or anything other than HTML.

 

Right now, I have a layout I want to use for my basic t-shirt shop:

http://www.harashoclothing.com/index1.htm

 

(Click for the pop-up)

 

I tried to edit the .css file, but nothing happened.

 

Also, I edited the index.php file in the languages/english directory, but the HEADING_TITLE and TABLE_HEADING_NEW_PRODUCTS are still appearing.

 

Generally speaking, I need some MAJOR help and QUICKLY...

I have already tried to look for a freelancer, but I've been jipped and so now I"m a little wary.

 

I'm willing to pay for anyone who can help me out!!

Pleease help me!

Thanks

Jamie

Link to comment
Share on other sites

Rigadin, thanks a lot for your fast answer & solution!

Kind regards, Thomas

also another quick way to check if sts is on from the url is to browse:
http://www.domain.com/index.php?sts_debug=debug

Link to comment
Share on other sites

Hi -- I'm new here and to OsCommerce in general.

I have essentially no knowledge in PHP or anything other than HTML.

 

Right now, I have a layout I want to use for my basic t-shirt shop:

http://www.harashoclothing.com/index1.htm

 

(Click for the pop-up)

 

I tried to edit the .css file, but nothing happened.

 

Also, I edited the index.php file in the languages/english directory, but the HEADING_TITLE and TABLE_HEADING_NEW_PRODUCTS are still appearing.

 

Generally speaking, I need some MAJOR help and QUICKLY...

I have already tried to look for a freelancer, but I've been jipped and so now I"m a little wary.

 

I'm willing to pay for anyone who can help me out!!

Pleease help me!

Thanks

Jamie

Jamie,

here are a few suggestions:

1.Simplify, forget javascript popup now on store entry and just assign your default template in admin >Modules > sts > Deafult > Template folder > your template folder

 

2. If you see HEADING_TITLE and TABLE_HEADING_NEW_PRODUCTS, then that means you do not have them defined in catlog/includes/english/index.php , index.php should look as below:

define('TEXT_MAIN', 'blah blah blah');
define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');
define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');
if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
 define('HEADING_TITLE', '');
 define('TABLE_HEADING_IMAGE', '');
 define('TABLE_HEADING_MODEL', 'Model');
 define('TABLE_HEADING_PRODUCTS', 'Product Name');
 define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');
 define('TABLE_HEADING_QUANTITY', 'Quantity');
 define('TABLE_HEADING_PRICE', 'Price');
 define('TABLE_HEADING_WEIGHT', 'Weight');
 define('TABLE_HEADING_BUY_NOW', 'Buy Now');
 // added new line
 define('TABLE_HEADING_MULTIPLE', 'Qty.');
 define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');
 define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');
 define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');
 define('TEXT_SHOW', '<b>Show:</b>');
 define('TEXT_BUY', 'Buy 1 \'');
 define('TEXT_NOW', '\' now');
 define('TEXT_ALL_CATEGORIES', 'All Categories');
 define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');
} elseif ($category_depth == 'top') {
 define('HEADING_TITLE', 'whatever you want to say here');
 define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
} elseif ($category_depth == 'nested') {
 define('HEADING_TITLE', '');
 define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');
}

 

3. osComm forum and Knowledgebase has just about all the answers to your questions. You just have to learn how to serach for it. These two resources are from my signature: effective searching and knowledge base

Link to comment
Share on other sites

also another quick way to check if sts is on from the url is to browse:
http://www.domain.com/index.php?sts_debug=debug

 

Schittli needed to check in the php code if sts was used or not, in order to make an if..then..else or something like that.

 

The URL debug trick does not always tell you everything about STS:

- If STS is installed but disabled, using the sts_debug= in the URL will turn it on only for you, so you'll not know if it's enabled or not.

- If the admin has changed the debug password, you'll not see anything. The password can be changed in the default module. If there you change "debug" to "toto" you have to type sts_debug=toto in URL to see something changing.

 

- Rigadin

Link to comment
Share on other sites

I have installed a few contributions that I want in my product's pages like the:

box_qty_in_product_info

more_pics_6_v1.2

PDF_data_sheet_v1.5

but they don't show when STS is enabled.

I succesfully added some new infoboxes with coding the new variables into sts_user_code.php file, but I don't seem to make it through the product page, although I searched this forum looking for related help and also read the documentation several times...

Anyone knows what am I missing?

When I try to use the full/content/product_info.php.html, the variables will show like: $productdesc#

If I disable this product_info.php.html, the one being used and correctly displayed is the one I have under: full/product_info.php.html, but still the problem from my last post persists. I cannot see the information for the installed contributions.

Can someone tell me please, which product_info.php.html page I should be using or just a hint of what can be happening here? I'm clueless. Thanks!

Link to comment
Share on other sites

Hi Rigadin.

 

I'm having a problem that I hope you or someone here could help me out with.

 

Recently I changed the values of some text variables such as TEXT_MAIN in my defines. I was experimenting and I changed them to blanks. The problem is that when I put something back in those values (strings), nothing displays at all when I have STS v4 on.

 

As soon as I turn STS off, the default store shows everything that has been defined.

 

My store is not live yet and can be reached at Aetrex.com.au/catalog. (If the design looks a little bit crap, keep in mind that it will be shown inside an iframe, and is optimsed thus).

 

This is the code from index.php in catalog/includes/languages/index.php:

 

<?php

/*

$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

define('TTEXT_MAIN', 'CHEESE<br>');

define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s');

define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products');

define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected');

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'EASY SEARCH <BR> <FONT SIZE="2"> YOU CAN SEARCH BY PRICE AND GENDER</FONT>');

define('TABLE_HEADING_IMAGE', '');

define('TABLE_HEADING_MODEL', 'Model');

define('TABLE_HEADING_PRODUCTS', 'Product Name');

define('TABLE_HEADING_MANUFACTURER', 'Manufacturer');

define('TABLE_HEADING_QUANTITY', 'Quantity');

define('TABLE_HEADING_PRICE', 'Price');

define('TABLE_HEADING_WEIGHT', 'Weight');

define('TABLE_HEADING_BUY_NOW', 'Buy Now');

define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.');

define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.');

define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: ');

define('TEXT_SHOW', '<b>Show:</b>');

define('TEXT_BUY', 'Buy 1 \'');

define('TEXT_NOW', '\' now');

define('TEXT_ALL_CATEGORIES', 'All Categories');

define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers');

} elseif ($category_depth == 'top') {

define('HEADING_TITLE', 'EASY SEARCH <BR> YOU CAN SEARCH BY PRICE AND GENDER');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

}

?>

 

 

 

 

 

This is the code from catalog/index.php

 

text<?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 © 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">

<TR>

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

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

$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";

}

}

 

// needed for the new products module shown below

$new_products_category_id = $current_category_id;

?>

</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_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 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);

$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 TTEXT_MAIN; ?></TD>

</TR>

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

<?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 hope I can get some help from anyone with any clue why this might happen.

 

Thanks so much for any help.

Link to comment
Share on other sites

Thanks Chris for expounding on thuse use of sts_debug.

 

on the misplaced STS buffering of column_right.php as shown in source of store index page below:

<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<!-- footer_eof //-->
</td></tr></table>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Strict //EN" "http://www.w3.org/TR/html4/strict.dtd">

1. Is there supposed to be a catolog/includes/modules/sts_inc/column_right.php as indicated in the STS4.doc of the STS4.1 install package?

2. what is and where is the buffering order of sts variables defined ?

Link to comment
Share on other sites

I was wondering if anyone can offer some insight into a problem I am having in trying to get Article Manager to work with my site which has STS 4.1 installed? Apparently, I posted the question in the wrong area, so I'm going to give this a try. You can view the question by visiting the following thread:

 

http://www.oscommerce.com/forums/index.php?showtopic=221692

 

Any insight is greatly appreciated!

 

Thanks,

Ara

Link to comment
Share on other sites

I was wondering if anyone can offer some insight into a problem I am having in trying to get Article Manager to work with my site which has STS 4.1 installed? Apparently, I posted the question in the wrong area, so I'm going to give this a try. You can view the question by visiting the following thread:

 

http://www.oscommerce.com/forums/index.php?showtopic=221692

quote] I went to your store and everything appears to be OK. Have you found the solution to your problem yet? If not, can you be more specific as to what specific errors you are getting or what features are not working with your site? By the way, the forum for Article Manager is here in case you have not tried there yet.

 

Hope this helps, Bill Kellum

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

Hi,

 

I tried to update from V4.0.7 to v4.1, I uploaded these files as told in instructions:

 

Replace the following files with the ones provided in this release:

- includes/modules/sts_inc/product_info.php

- includes/modules/sts_inc/sts_column_left.php

- includes/modules/sts_inc/sts_user_code.php

- includes/modules/sts_inc/sts_display_output.php

- includes/modules/sts_inc/sts_footer.php

 

- includes/modules/sts/sts_product_info.php

- includes/classes/sts.php (this i found in clean_osc not upload folder?!?!)

- includes/application_bottom.php (this i found in clean_osc not upload folder?!?!)

- includes/column_right.php (this i found in clean_osc not upload folder?!?!)

 

- Delete the following file:

- includes/modules/sts_inc/sts_column_right.php

 

 

I checked where it says to do the manual changes and already been done, presume those instructions were for previous versions.

 

Anyway, my main page displays the template i already had but when i go to a category (to index.php) i get no formatting at all and just a load of mess, anyone know why???

 

I was using the same template before for all pages? Has something changed in admin - I didn't change any of these files though so the settings wouldn't change would they?

 

Was it right to pull files from the clean_osc folder, should i only have copied brand new files and edited the rest by hand?

 

Thanks

 

Becki

Link to comment
Share on other sites

THE DESCRIPTION IS TOO VAGUE AND I CANNOT UNDERSTAND IT

 

two files are included sample_index.php.html & tableless_osc.css

FTP both to your server under catalog, http://www.yourdomain.com/catalog/

then browse http://www.yourdomain.com/catalog/sample_index.php.html

edit div inside tableless_osc.css

 

I HAVE UPLOADED MANY CONTRIBS INCLUDING EASY POPULATE AND GRAPHIC BOXES

BUT I CANNOT FIGURE THIS ONE OUT. SEEMS VERY IMPORTANT FOR THE COMMUNITY.

 

http://www.oscommerce.com/community/contri...h,tableless+CSS

 

Is this contrib really working? I am going to have over 140,000 products so meta tagging them seemed redundant to say the least. I figure why do that when I can just use css instead of html template tables and the content will become available to search engines.

 

this is what someone wrote on http://www.osc-help.net/product_info.php?c...roducts_id=3511

 

"Originally when it came to reinstalling my site I was going to replace the nested table version with a more modern CSS / XHTML version. As I was a total beginner in CSS / XHTML my first attempts were completely not what I wanted and I couldnt understand why until I came across this contribution which help me alot. What it does is a provide a standard template with a CSS stylesheet already setup in the style of the standard oscommerce header / 3 column layout / footer. The difference that it makes are: a) The content is higher to the top (better for search engine rankings) B) There is more content to code ratio (using nested tables creates lots of unnecessary code) What you will find is that the side column infoboxes will be still be generated using nested tables due to the classes/boxes.php so you will need some php knowledge to convert them into DIV which I have done. I found this contribution invaluable to helping me understand webdesign using CSS and I can honestly say that my site has higher rankings due to it."

 

WHY USE THE HTML STS TEMPLATE WHEN IT LOADS SLOWER AND HIDES CONTENT FROM SEARCH ENGINES SO THAT YOU HAVE TO META TAG EVERYTHING? --- CONFUSED.

 

I need to make a descision about how to further customize this website because the deadline is like a week away. I appreciate any helpful advice.

Link to comment
Share on other sites

THE DESCRIPTION IS TOO VAGUE AND I CANNOT UNDERSTAND IT

 

two files are included sample_index.php.html & tableless_osc.css

FTP both to your server under catalog, http://www.yourdomain.com/catalog/

then browse http://www.yourdomain.com/catalog/sample_index.php.html

edit div inside tableless_osc.css

 

I HAVE UPLOADED MANY CONTRIBS INCLUDING EASY POPULATE AND GRAPHIC BOXES

BUT I CANNOT FIGURE THIS ONE OUT. SEEMS VERY IMPORTANT FOR THE COMMUNITY.

 

http://www.oscommerce.com/community/contri...h,tableless+CSS

 

Is this contrib really working? I am going to have over 140,000 products so meta tagging them seemed redundant to say the least. I figure why do that when I can just use css instead of html template tables and the content will become available to search engines.

 

this is what someone wrote on http://www.osc-help.net/product_info.php?c...roducts_id=3511

 

"Originally when it came to reinstalling my site I was going to replace the nested table version with a more modern CSS / XHTML version. As I was a total beginner in CSS / XHTML my first attempts were completely not what I wanted and I couldnt understand why until I came across this contribution which help me alot. What it does is a provide a standard template with a CSS stylesheet already setup in the style of the standard oscommerce header / 3 column layout / footer. The difference that it makes are: a) The content is higher to the top (better for search engine rankings) B) There is more content to code ratio (using nested tables creates lots of unnecessary code) What you will find is that the side column infoboxes will be still be generated using nested tables due to the classes/boxes.php so you will need some php knowledge to convert them into DIV which I have done. I found this contribution invaluable to helping me understand webdesign using CSS and I can honestly say that my site has higher rankings due to it."

 

WHY USE THE HTML STS TEMPLATE WHEN IT LOADS SLOWER AND HIDES CONTENT FROM SEARCH ENGINES SO THAT YOU HAVE TO META TAG EVERYTHING? --- CONFUSED.

 

I need to make a descision about how to further customize this website because the deadline is like a week away. I appreciate any helpful advice.

Why are you posting this here in the STS forum? You should email the author of the contribution (avail1now) if you have questions. Also, if you are looking for the STS contribution, you can download it here.

 

Hope this helps clear things up for you,

 

Bill Kellum

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

Becki,

 

the upload/catalog folder in the STS V4.1 package lacked two files listed in the instructions, namely: includes/application_bottom.php , and includes/column_right.php. Bit it did include includes/classes/sts.php

I can see how that is confusing. You should be fine however with the two files from the clean install. Now go ahead and do:

 

1. upload revised sts.php class, sts_default.php module, headertags.php module and an instruction for style-depending-buttons , sts update Apr 14 2006

 

2. then make sure you make this change in includes/classes/sts.php , small typo in sts.php class on line 87, it is listed on the contribution page.

 

Replace:

$this->template_folder = $sts_template_folder[0];

with

$this->template_folder = $template_folder_installed[$sts_template_folder];

 

3. If your template is coming up for your catalog/index.php that is good news.

now just make sure you set all the parameters correctly in admin > modules > sts

set Default, index, and product Info as listed in this earlier post

Good Luck

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