Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

YOu could try templatemonster.com

 

OK for my problem:

 

I have my site running with STS but I am having problems with popups for some reason, I have this working elsewhere but here it doesnt for some reason.

 

www.divebureau.com/catalog

 

When you try to enlarge the image it gives:

 

Warning: session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in /home/d/i/divebureau/public_html/catalog/includes/functions/sessions.php on line 67

 

I have checked product_info.php and sts_template for whitespace any other suggestions?

 

Also it is using sts_template.html, but I do have a popup_image.php.html file in sts_templates?

Link to comment
Share on other sites

I am having some real issues adding new boxes to my STS template. I want to add a:

 

$articlesbox

$addfavorites

$authorsbox

 

on the right. I tried doing this:

 

Short Version:

 

In /includes/column_left.php: Duplicate the code in column_left.php that you find around the require(BOXFILENAME) and make sure that the $sts_block_name has the correct name for the block ABOVE it. This is the name you'll use for the variable in the sts_template.html file.

 

NOTE: I moved ALL boxes into column_left.php to make maintaining it easier so you don't have to figure out which (left or right) file the boxes are stored in. If you want to put stuff in column_right it will work, but it's easier to just leave them in column_left.php.

 

In /includes/sts_display_output.php: In the Create custom boxes

section, add a new line like this:

 

 

CODE 

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

 

 

 

 

That should be all you need to do. In the above example, you can then use $newsdeskbox as a variable name in your sts_template.html file.

from an earlier post and no luck. What am I missing? Do I need to edit sts_user_code.php?

 

Here is what I have in column_right.php:

// Article Manager

require(DIR_WS_BOXES . 'authors.php');

// STS: ADD

$sts_block_name = 'authorsbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

require(DIR_WS_BOXES . 'articles.php');

// STS: ADD

$sts_block_name = 'articlesbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

require(DIR_WS_BOXES . 'add_favorites.php');

// STS: ADD

$sts_block_name = 'addfavorites';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

and here is what I did in sts_display_output.php:

 

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

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

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

 

See results here at this label

Laser labels, barcode labels, custom labels

Link to comment
Share on other sites

Hi

 

I am trying to add a new box to my shop. Everything works ok in IE but for some reason in firefox the box takes the whole of the page destroying the whole layout in the center.

 

you can see it here:

 

http://magipedia.com/index.php?language=en

 

Also when you click on a product , you can see the description fine but the buy button doesnt appear in firefox (in IE works fine)

 

You can see it here:

 

http://magipedia.com/product_info.php?products_id=51

 

I have been suffering with this for 4 days nows, and I cannot find a solution, please if someone can help me with this one you will make me very happy.

 

Thanks :)

Link to comment
Share on other sites

Well, I figured it out! For anyone interested, you have to enter:

 

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

 

into the sts_user_code.php file also. After doing that, the boxes work.

Laser labels, barcode labels, custom labels

Link to comment
Share on other sites

I don't think I was clear enough with charmdiva, either that or she's already bailed out for the holidays and is taking a media fast. Charmdiva, I'd love it if you were to share your notes and specifics on the changes you've made.

 

That being said, I keep coming back and posting questions that I know have easy answers. It makes me feel like a fool, but I haven't done any coding or web design in a few years. So I'm more than a bit rusty. What I would like to do is have the "New products for *" be only two columns wide, and sit against the right side of the content area. I'd also like to place the text and price to the right of the product images, and have a simple sentence or two along with it. And then also sit off the bottom of the content area. Kind of frame this box on three sides with some white space, instead of just going edge to edge to edge. It makes the design look a little cramped, so I'm wanting to open it up a little more. Only thing is, I can't figure out how to make the changes. I'm pretty sure that the infobox is being made by catalog/includes/modules/new_products.php

 

To see where I'm at and what I've done goto http://www.outerworldadult.com/catalog I still haven't put in the store content yet, so it's just osC default content, and things are more than a little rough. Also if there are any really glaring issues, please let me know.

 

Hey I was just curious if you, or anyone else could post their finished sts_template.html for comparison. I would like this so I can possibly learn how people are modding their templates and doing wrapping boxes in certain graphics.

Link to comment
Share on other sites

Hi,

 

I've installed STS on MS2 and everything seems to work including the new boxes I've added. Yet it still seems to have problems with the what's new box and displaying new added products. Instead it shows "There are currently no products." although I've added about 30 or 40 new items and they're all shown randomly INSIDE the box and on the "New products in..."

 

Second problem is with the contrib "Down for Maintenance". When the site's down it only displays an empty template content frame and no "down for maintenance text" as configured in admin, except the breadcrumb pointing to down for maintenance title.

 

As both worked fine before adding the STS contrib and the template, I'm quite sure it has something to do with STS and/or my installation. Maybe I forgot something, but driving me nuts since 3 days? :blink:

 

Anybody have an idea how to solve this? I've tried searching all over support site and forums, but couldn't find anything alike.

 

Help and suggestions highly appreciated.

 

Site can be seen here.

 

Let me know if someone need code samples. Just thought I'd save some bits if anybody has a simple solution in advance.

 

 

Stefan

Link to comment
Share on other sites

i just need a quick link to the most current COMPLETE release. i dont want to have to download 10 other quick fixes to make the release work. so if someone could hook that up, id greatly appreciate it.

 

i installed 2.01 which im sure is outdated but i got this error

 

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /usr/home/lotusgfx/public_html/shop/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /usr/home/lotusgfx/public_html/shop/includes/application_top.php on line 511

 

 

so id like the most current

 

thank you

Link to comment
Share on other sites

i just need a quick link to the most current COMPLETE release. i dont want to have to download 10 other quick fixes to make the release work. so if someone could hook that up, id greatly appreciate it.

 

i installed 2.01 which im sure is outdated but i got this error

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /usr/home/lotusgfx/public_html/shop/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /usr/home/lotusgfx/public_html/shop/includes/application_top.php on line 511

so id like the most current

 

thank you

 

Hi,

 

you usually don't need all 10 releases for it to work, but depends on your inst and the contribs you have installed. 2.01 is the latest complete version, and then a lot of hotfixes from which you normally only need these 4:

 

http://www.oscommerce.com/community/contri...,hosteurope

http://www.oscommerce.com/community/contri...,hosteurope

http://www.oscommerce.com/community/contri...,hosteurope

http://www.oscommerce.com/community/contri...,hosteurope

 

So to be up to date you only need these.

I'd put it together, but as I have my above mentioned problem I wouldn't upload it as a new complete version before I have the bug solved.

 

 

Stefan

Link to comment
Share on other sites

Hey srajek, my highest compliments on your design.  Would it be too much to ask for you to send me a copy of your sts_template.html for reference use?

 

Hi Salvage,

thanks for your compliments. ;-)

If you like it as reference, no problem. Same for everyone else.

Only thing I ask for is to leave the copyright notice untouched if you use it.

 

<!-- #############################################

STS-Template design by srajek

 

Copyright © 2005 by

 

http://www.estatepipes.de

 

All rights reserved!

 

If you like it - feel free to use it as reference,

change as needed for your site, but leave this

copyright notice untouched and included as is. 

NO usage for smoking and pipe related sites

except with written permission of author.

############################################## -->

<html>

<head>

<!--$headcontent-->

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

</head>

<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<!-- header -->

 

 

<STYLE TYPE="text/css">

    /* ###################################################

      Special-Template CSS - Copyright © 2005 by srajek

      ###################################################

    */

.topbanner_logo{

width: 291;

      height: 119;

}

.date_location{

      position:absolute;

  left: 195px;

  top: 136px;

  visibility:block;

  z-index:1;

  color: #A39545;

  width: 400;

}

.topbanner_td1{

font-family: Verdana, Arial, sans-serif;

font-size: 11px;

line-height: 1.5;

background-image: url('includes/sts_templates/images/top_left.jpg');

background-repeat: no-repeat;

height: 120;

width: 291

}

.topbanner_td2{

background-image: url('includes/sts_templates/images/top_mid.jpg');

background-repeat: repeat-x;

height: 120

}

.topbanner_td3{

background-image: url('includes/sts_templates/images/top_right.jpg');

background-repeat: no-repeat;

height: 120;

width: 524

}

/* MENU bar css controls */

.menubarmain{

height: 20px;

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

line-height: 1.5;

}

.menubarmain_td1{

background-image: url('includes/sts_templates/images/nav_left.gif');

background-repeat: no-repeat;

height: 20px;

width: 188

}

.menubarmain_td2{

background-image: url('includes/sts_templates/images/nav_mid.gif');

background-repeat: no-repeat;

height: 20px;

width: 131

}

.menubarmain_td2 td{

vertical-align: text-top;

}

.menubarmain_td3{

background-image: url('includes/sts_templates/images/nav_right.jpg');

background-repeat: no-repeat;

height: 20px;

width: 450;

text-align: right;

vertical-align:top;

}

.menubarmain_td3 A:link, .menubarmain_td3 A:active, .menubarmain_td3 A:visited{

font-size: 11px;

font-family: Arial;

color: #A39545;

font-weight: bold;

text-decoration: none;

}

.menubarmain_td3 A:hover{

font-family: Arial;

font-size: 11px;

color: #DEC552;

}

.menubarmain_td4{

background-image: url('includes/sts_templates/images/nav_mid2.gif');

background-repeat: repeat-x;

height: 20px

}

/* MAIN table css controls */ 

.maincont_tb{

background-image: url('includes/sts_templates/images/back_main.jpg');

background-repeat: no-repeat;

background-color: #4A0000;

padding-left: 5px;

padding-top: 15px

}

/* LEFT bar css controls */

.maincont_left_td {

width: 125;

padding: 5px;

margin: 0px;

}

.leftbar_td{

padding: 3px;

/*background-color: #4A0000;

border: 1px solid #A39545;*/

}

/*CONTENT in LEFT bar css */

.infoBoxLeft {

/*background: #660000;*/

border: 1px solid #A39545;

}

TD.infoBoxLeft, SPAN.infoBoxLeft {

font-family: Verdana, Arial, sans-serif; font-size: 10px;

}

infoBoxHeadingLeft {

}

TD.infoBoxHeadingLeft {

/*background-color: #4A0000;*/

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

font-weight: bold;

color: #000000;

text-align: right;

}

.infoBoxContentsLeft {

/*background-color: #DDDEE0;*/

}

.infoBoxContentsLeft A:link, .infoBoxContentsLeft A:active, .infoBoxContentsLeft A:visited{

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

font-weight: bold;

color: #A39545;

}

.infoBoxContentsLeft A:hover {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

font-weight: bold;

color: #000000;

}

/* RIGHT bar css controls */ 

.maincont_right_td {

width: 199;

background-image: url('includes/sts_templates/images/back_right2.gif');

background-repeat:  repeat-y;

text-align: right;

padding: 0px;

margin: 0px

}

.rightbar_tb{

width: 199;

height: 100%;

vertical-align: top;

background-image: url('includes/sts_templates/images/back_right.jpg');

background-repeat: no-repeat;

padding-top: 10px;

padding-left: 40px;

padding-right: 0px

}

/*(Specific for osCommerece) CONTENT in RIGHT bar css */

.infoBoxRight { 

border: 1px solid #A39545;

}

.infoBoxHeadingRight {

padding-left: 4px;

}

TD.infoBoxRight, SPAN.infoBoxRight { font-family: Verdana, Arial, sans-serif; font-size: 10px; }

TD.infoBoxHeadingRight {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

font-weight: bold;

background: #5781AE;

color: #ffffff;

}

.infoBoxContentsRight {

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

/*background-color: #E8ECEF;*/

}

.infoBoxContentsRight A:link, .infoBoxContentsRight A:active, .infoBoxContentsRight A:visited{

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

font-weight: bold;

color: #5781AE;

}

.infoBoxContentsRight A:hover

{

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

font-weight: bold;

color: #000000;

}

.footer_tb{

text-align: center;

color: #DEC552;

}

.footer_td{

font-family: Verdana, Arial, sans-serif;

font-size: 10px;

background-color: #660000;

color: #A39545;

}

</STYLE>

<!-- Top table with logo -->

<table width="100%" height="100%" border="0" align="center" valign=top cellpadding="0" cellspacing="0">

  <tr><td valign=top>

<!--- top logo header --->

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

<tr>

  <td align="left" class="topbanner_td1"><a href="$urlcataloglogo"><img src="includes/sts_templates/images/shop_logo.gif"></a></td>

  <td align="left" class="topbanner_td2"><table width="100%" class="expender_tb"> <tr><td></td></tr></table></td>

  <td align="right" valign="bottom" class="topbanner_td3"><table width="100%" class="expender_tb"><tr><td></td></tr></table></td>           

</tr>

</table>

<!-- menu bar along the top -->

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

<tr>

    <td class="menubarmain_td1">  $date</td>

    <td class="menubarmain_td2"></td>

    <td class="menubarmain_td4"><table width="100%" class="expender_tb"><tr><td></td></tr></table></td>   

    <td class="menubarmain_td3">

                <span style="margin-right: 8px;"><a href="$urlcataloglogo">Home</a></span>

  <span style="margin-right: 8px;">$myaccount</span>

  <span style="margin-right: 8px;">$cartcontents</span>

  <span style="margin-right: 8px;">$checkout</span>

  <span style="margin-right: 8px;">$guestbook</span>

  <span style="margin-right: 8px;">$forum</span>

</td>

</tr>

</table

 

 

<!-- header_eof -->

 

<!-- body -->

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

  <tr>

    <td width="125" valign="top" class="maincont_left_td"><table border="0" width="195" style="table-layout:fixed" cellspacing="0" cellpadding="0" class="leftbar_tb">

 

<!-- left_navigation -->

          <tr>

            <td>

    $categorybox<p>

    $searchbox<p>

    $manufacturerbox<p>

    $whatsnewbox<p>

    $informationbox<p>

    $cardbox<p>

  </td>

          </tr>

<!-- left_navigation_eof -->

 

    </table></td>

 

<!-- body_text -->

    <td width="100%" valign="top" class="maincont_mid_td"><table border="0" width="100%" cellspacing="0" cellpadding="4">

      <tr>

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

          <tr>

            <td>$breadcrumbs<p>$content</td>

          </tr>

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

          <tr>

        <td>

</td>

          </tr>

        </table></td>

      </tr>

      </table></td>

<!-- body_text_eof -->

   

    <td width="125" valign="top" class="maincont_right_td"><table border="0" width="125" style="table-layout:fixed" cellspacing="0" cellpadding="0" class="rightbar_tb">

<!-- right_navigation -->

          <tr>

            <td>

 </td>

          </tr>

          <tr>

            <td>

<p align="center">$login_box</p>

<p align="center">$newsbox</p>

<p align="center">$cartbox</p>

<p align="center">$quickiebox</p>

<p align="center">$wishlistbox</p>

<p align="center">$orderhistorybox</p>

<p align="center">$maninfobox</p>

<p align="center">$bestsellersbox</p>

<p align="center">$specialfriendbox</p>

<p align="center">$reviewsbox</p>

<p align="center">$languagebox</p>

<p align="center">$currenciesbox</p>

    </td>

        </tr>

</table>

 

<!-- right_navigation_eof -->

 

  </tr>

  </tr>

</table>

<!-- body_eof -->

 

<!-- footer -->

 

<table width="100%" align="center" border="0" cellspacing="0" cellpadding="0" class="footer_tb">

<tr>

<td>

    <p style="text-align: right">

    <img border="0" src="includes/sts_templates/images/back_right_btm.gif" width="199" height="27"></td>

</tr>

<tr>

<td>$banner<p>

$footer<p>

        </td>

</tr>

</table>

 

<!-- footer_eof -->

 

</body>

</html>

 

There still two thing to achieve with it:

 

Works absolute perfect for IE, but

 

1) I've got an offset in Mozilla between menubar and right frame, where it sets a space between menubar and back_right image.

 

2) Konquerer ignores the table fixed style and sizes the maincont_right_td and rightbar_tb to 199px (size of back_right image table) instead of 125px, so the boxes expand over the line of back_right2 image.

 

Don't know if there are more with other browsers (i.e. Firefox, Netscape...)

 

Gives me a hard time getting it perfect for all browsers, but I'm still working on it. :'(

 

Anybody have an idea I've overlooked?

 

 

 

Stefan

Link to comment
Share on other sites

I just installed 2.01 on a completely new OSC install. I did not use CONFIGURE-SAMPLE.php and instead edited /catalog/includes/configure.php. I belive I am using all the latest versions. This is the first time using STS and I can't get the search to pull up the specific results becuase of the 4 character limit. There are no other contributions loaded. This is a totally new install and my first STS install.

 

When I try to go into the catalog now I get this error:

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /home/ftpfed/public_html/oscommerce/catalog/includes/application_top.php on line 511

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /home/ftpfed/public_html/oscommerce/catalog/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ftpfed/public_html/oscommerce/catalog/includes/application_top.php on line 511

 

How do I fix this?

Edited by FluidDragon
Link to comment
Share on other sites

This is my configure.php xxxx'ed out passowrds

 

<?php
/*
 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

// Define the webserver and path parameters
// * DIR_FS_* = Filesystem directories (local/physical)
// * DIR_WS_* = Webserver directories (virtual/URL)
 define('HTTP_SERVER', 'http://www.federationmodels.com'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', false); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.federationmodels.com');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/oscommerce/catalog/');
 define('HTTPS_COOKIE_PATH', '');
 define('DIR_WS_HTTP_CATALOG', '/oscommerce/catalog/');
 define('DIR_WS_HTTPS_CATALOG', '');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/');
 define('DIR_FS_CATALOG', '/home/ftpfed/public_html/oscommerce/catalog/');
 define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
 define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

// define our database connection
 define('DB_SERVER', '64.5.48.42'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'xxxxxxx');
 define('DB_SERVER_PASSWORD', 'xxxxx');
 define('DB_DATABASE', 'ftpfed_db1');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
 
 // STS: ADD: Define Simple Template System files
 define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');
 define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php'); 
 define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');
 define('STS_TEMPLATE_DIR', DIR_WS_INCLUDES . 'sts_templates/');
 define('STS_DEFAULT_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html'); 
 define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');
 define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');
 define('STS_PRODUCT_INFO', DIR_WS_INCLUDES . 'sts_product_info.php');
// STS: EOADD
?>

Link to comment
Share on other sites

I'm having issues with the "Add to Cart" button. Each time I click it,. it just brings me back to the same product page. Any idea's on why and how to fix it?

 

I tried searching the forum for an answer, but some stupid "one of your words contains less than 4 characters" bull kept coming up

 

Usually I exhaust every other route before having to post a question..

 

Any help would be great :D

 

Edit: I'm using the sts template..... heh,.

Edited by TeQTrent
Link to comment
Share on other sites

I just installed 2.01 on a completely new OSC install. I did not use CONFIGURE-SAMPLE.php and instead edited /catalog/includes/configure.php. I belive I am using all the latest versions. This is the first time using STS and I can't get the search to pull up the specific results becuase of the 4 character limit. There are no other contributions loaded. This is a totally new install and my first STS install.

 

When I try to go into the catalog now I get this error:

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /home/ftpfed/public_html/oscommerce/catalog/includes/application_top.php on line 511

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /home/ftpfed/public_html/oscommerce/catalog/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/ftpfed/public_html/oscommerce/catalog/includes/application_top.php on line 511

 

How do I fix this?

 

 

howd you fix this?

im also getting this error and everything is fresh. someone plz help :D

Link to comment
Share on other sites

Hello,

 

I just installed the latest STS version and had to jump through hoops to get the column_right.php to not display two sets of the same box. While doing so, I somehow messed up my $content section and now it will not display. Would any of you be willing to help me in finding my error? below is a copy of my column_right.php file. I appreciate anyone's help.

 

Thanks....

 

 

<?php

/*

$Id: column_left.php,v 1.15 2003/07/01 14:34:54 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

// STS: ADD

$sts_block_name = 'header2columnleft';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

 

 

if ((USE_CACHE == 'true') && empty($SID)) {

echo tep_cache_manufacturers_box();

} else {

include(DIR_WS_BOXES . 'manufacturers.php');

}

 

// STS: ADD

$sts_block_name = 'manufacturerbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

require(DIR_WS_BOXES . 'whats_new.php');

 

// STS: ADD

$sts_block_name = 'whatsnewbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

require(DIR_WS_BOXES . 'search.php');

 

// STS: ADD

$sts_block_name = 'searchbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

require(DIR_WS_BOXES . 'information.php');

 

// STS: ADD

$sts_block_name = 'informationbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

require(DIR_WS_BOXES . 'shopping_cart.php');

 

// STS: ADD

$sts_block_name = 'cartbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

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

 

// STS: ADD

$sts_block_name = 'maninfobox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

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

 

// STS: ADD

$sts_block_name = 'orderhistorybox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

if (isset($HTTP_GET_VARS['products_id'])) {

if (tep_session_is_registered('customer_id')) {

$check_query = tep_db_query("select count(*) as count from " . TABLE_CUSTOMERS_INFO . " where customers_info_id = '" . (int)$customer_id . "' and global_product_notifications = '1'");

$check = tep_db_fetch_array($check_query);

if ($check['count'] > 0) {

include(DIR_WS_BOXES . 'best_sellers.php');

} else {

include(DIR_WS_BOXES . 'product_notifications.php');

}

} else {

include(DIR_WS_BOXES . 'product_notifications.php');

}

} else {

include(DIR_WS_BOXES . 'best_sellers.php');

}

 

// STS: ADD

$sts_block_name = 'bestsellersbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

if (isset($HTTP_GET_VARS['products_id'])) {

if (basename($PHP_SELF) != FILENAME_TELL_A_FRIEND) include(DIR_WS_BOXES . 'tell_a_friend.php');

} else {

include(DIR_WS_BOXES . 'specials.php');

}

 

// STS: ADD

$sts_block_name = 'specialfriendbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

if (substr(basename($PHP_SELF), 0, 8) != 'checkout') {

include(DIR_WS_BOXES . 'languages.php');

 

// STS: ADD

$sts_block_name = 'languagebox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

include(DIR_WS_BOXES . 'currencies.php');

 

// STS: ADD

$sts_block_name = 'currenciesbox';

require(STS_RESTART_CAPTURE);

// STS: EOADD

 

}

 

?>

Link to comment
Share on other sites

I'm having issues with the "Add to Cart" button.  Each time I click it,. it just brings me back to the same product page.  Any idea's on why and how to fix it?

 

I tried searching the forum for an answer, but some stupid "one of your words contains less than 4 characters" bull kept coming up

 

Usually I exhaust every other route before having to post a question..

 

Any help would be great  :D

 

Edit: I'm using the sts template..... heh,.

Just add before the $addtocartbutton these tags:

 

$startform <- Starts the add to cart form

$optionnames $optionchoices <- If your product has attributes include them when you add it to the cart

$addtocartbutton <- The actual add to cart button

$endform <- Ends the add to cart form

There's a diference between living & BEING ALIVE!

Link to comment
Share on other sites

Just add before the $addtocartbutton these tags:

 

$startform <- Starts the add to cart form

$optionnames $optionchoices <- If your product has attributes include them when you add it to the cart

$addtocartbutton <- The actual add to cart button

$endform <- Ends the add to cart form

 

 

I've done that, I should have added more information to my post.

 

All the tags are in place and nothing is that different, minus a few $(box) things like manufacturer,. etc.

 

 

Thank you very much, tho.

Link to comment
Share on other sites

hmm? I just don't know what I'm doing wrong. I'm using STS with OSC and I can't get the image to enlarge no matter what I try.

I have searched high and low and tried everything I have found with no luck.

 

Does anyone have a copy of OSC loaded with STS that works?

 

I tried adding the java to between the header tags and the link code. I must not be doing something right.

 

Does anyone know where I can get a copy of OSC and sts already combined and working? Free or not free.

 

Your help would be appreciated.

Thanks.

Dave.

Link to comment
Share on other sites

hmm? I just don't know what I'm doing wrong. I'm using STS with OSC and I can't get the image to enlarge no matter what I try.

I have searched high and low and tried everything I have found with no luck.

 

Does anyone have a copy of OSC loaded with STS that works?

 

I tried adding the java to between the header tags and the link code. I must not be doing something right.

 

Does anyone know where I can get a copy of OSC and sts already combined and working? Free or not free.

 

Your help would be appreciated.

Thanks.

Dave.

 

 

On this link, http://www.oscommerce.com/community/contributions,1524 there's a contribution "How to use pop up or click to enlarge with the product_info.php.html file" That totally helped me. Check it out. It explains everything step by step.

Link to comment
Share on other sites

Thanks for the reply.

Can you show me a copy of your page with the changes? I tried doing that and it doesn't work for some reason. I'm missing something.

Thaks.

Dave.

 

.

 

On this link, http://www.oscommerce.com/community/contributions,1524 there's a contribution "How to use pop up or click to enlarge with the product_info.php.html file" That totally helped me.  Check it out.  It explains everything step by step.

Link to comment
Share on other sites

One thing I forgot to mention.

I'm using 7dana.com

She added stl to OSC

 

 

It just changed the product_info page,. specifically the product image. So, say, if I want to view the cover of X dvd larger,. I can simply click on it to do so. If it doesn't work, I have no clue how to fix it, mate. I can say that I did try using a contribution that included OS commerce and a some other contributions, like sts template, and it didn't work. I had to do a clean install of OS Commerce, just itself, then manually add the other contributions.

Link to comment
Share on other sites

Seems I was banging my head against the wrong wall all this time and the solution was present in the STS Display Output code all the time :-"

 

Here are some key words for people searching so they can find this post

 

Simple Template System, STS Category, STS Categories, STS Templates, STS Multiple Templates

 

So essentially what I was looking to do was apply a template to an entire category and all of it's product pages using just one file. index.php_1.html, for example, should apply to

 

index.php?cPath=1

index.php?cPath=1_x

product_info.php?cPath=1_x&products_id=x

 

Currently STS doesn't do things this way. So the first thing to do is apply Greg K's fix for subcategories

 

in sts_display_output.php:

Replace:

// Look for category-specific template file like "index.php_1_17.html"
$sts_check_file = STS_TEMPLATE_DIR . "index.php_$sts_cpath.html";
//echo "$sts_check_file<BR>";
if (file_exists($sts_check_file)) {
// Use it
$sts_template_file = $sts_check_file;
}

With:

while ($sts_cpath != "")
{
// Look for category-subcategory-specific template file like "index.php_1_17.html"
$sts_check_file = STS_TEMPLATE_DIR . "index.php_$sts_cpath.html";
//echo "$sts_check_file<BR>";
if (file_exists($sts_check_file)) {
// Use it
$sts_template_file = $sts_check_file;
break;
} 
$sts_cpath = substr($sts_cpath, 0, (strrpos($sts_cpath, "_")));
}

 

Then you want to let STS know to apply that template to all the products in the category or subcategory when viewed with product_info.php. This is so simple I'm embarrassed I didn't spot it immediately. Anyways here's how you do that.

 

Find

/////////////////////////////////////////////
////// if product_info.php load data
/////////////////////////////////////////////
if ($scriptbasename == 'product_info.php') {
 require(STS_PRODUCT_INFO);
}

Replace with

/////////////////////////////////////////////
////// if product_info.php load data
/////////////////////////////////////////////
if ($scriptbasename == 'product_info.php') {
 // If no cPath defined, default to 0 (the home page)
 if ($cPath == "") {
$sts_cpath = 0; 
 } else {
       $sts_cpath = $cPath;
 }

while ($sts_cpath != "")
{
// Look for category-subcategory-specific template file like "index.php_1_17.html"
$sts_check_file = STS_TEMPLATE_DIR . "index.php_$sts_cpath.html";
//echo "$sts_check_file<BR>";
if (file_exists($sts_check_file)) {
// Use it
$sts_template_file = $sts_check_file;
break;
} 
$sts_cpath = substr($sts_cpath, 0, (strrpos($sts_cpath, "_")));
} 

}

// Open Template file and read into a variable
if (! file_exists($sts_template_file)) {
 echo "Template file doesn't exist: [$sts_template_file]";
}  else {
 echo "<!-- Using Template File [$sts_template_file) -->\n";
}

if (! $fh = fopen($sts_template_file, 'r')) {
echo "Can't open Template file: [$sts_template_file]";
}

$template_html = fread($fh, filesize($sts_template_file));
fclose($fh);

 

Wolla! Now your single category template will follow through all the way to your products. All I can say is duh and I hope this helps someone.

 

Iggy

Everything's funny but nothing's a joke...

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