Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Addendum:

 

When I say incomplete pages - the source code shows:

 

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->


<td width="100%" valign="top"><table width="537" border="0" align="center" cellpadding="0" cellspacing="0" style="padding-right:5px; ">

  <tr>

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

		<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>

	  </tr>
-->


 <tr><td class="main">	  <div style="position: relative; left: -10px; top: -10px;" id="top_homepage_box">
	<div id="home_audio_link"><a href="home-audio-c-40.html"><img src="images/home_audio_homepage.jpg" alt="Home Audio"/></a></div>
	<div id="car_audio_link"><a href="car-audio-c-42.html"><img src="images/car_audio_homepage.jpg" alt="Car Audio"/></a></div>
	<div id="tv_video_link"><a href="tv-and-video-c-24.html"><img src="images/tv_video_homepage.jpg" alt="TV and Video"/></a></div>
  </div></td></tr>





<tr>

		<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="20"></td>

	  </tr>
				<tr>

		<td><!-- featured_products //-->

  <div style="position: relative; left: -10px;" id="featured_products_wrapper">
	<div id="featured_products_heading">
	  FEATURED PRODUCTS
	</div>  
	<div id="featured_products_box">
	  <div id="featured_products_inner_box">
<table style="display: none;" width="100%" height="0%" border="0" cellspacing="0" cellpadding="0" align="left">



 <tr>



<td></td>

 

N.B. This site was working fine, with STS, on a PHP4 server - it is the move to PHP5.2 where this issue has suddenly occured.

Edited by UpsideUp
Link to comment
Share on other sites

Am using STS on PHP5.2 - but have issue where blank or incomplete pages are being shown.

 

I have switched off gzip_compression in admin - but to no avail.

 

Has anyone encountered / found a fix for this issue?

 

TIA.

 

 

STS is 100% compatible with PHP5.2 and MySQL 5.x.

 

Your issue most likely rises from your Featured Products contribution or some other code not updated for PHP5/MySQL5.

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

Addendum:

 

When I say incomplete pages - the source code shows:

 

N.B. This site was working fine, with STS, on a PHP4 server - it is the move to PHP5.2 where this issue has suddenly occured.

 

 

See post 5210 above.

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

 

Have a slightly odd question hopefully someone can help me me out? I guess u would need a pretty good knowledge of php and STS though...

 

The problem is im using the sts product info module and have redesigned the $content area of the product info pages to include a nice little javascript tab system using jquery. The problem is the thing relys on being able to 'jump' to different parts of the page using href=#somewhere_else_on_page.

 

This all works fine when i view the template page in my browser but when on the product_info.php page in the shop i get slightly strange problem. This is that the tab links no longer href to www.mysite.com/product_info.php?products_id=123/#tab1 but instead just to www.mysite.com/#tab1 (losing the "/product_info.php?products_id=123" bit) so i just end up at my index page! I have no idea how to stop this!!

 

In the template the code is simply

<a href="#tab1"><span>TAB 1</span></a>

so you would'nt expect this to happen. I have managed to get around it to some extent by using

 

<a href="<?php
 echo curPageURL();
?>/#tab1"><span>TAB 1</span></a>

 

the problem with this is that it looks pretty nasty as the tabs have a nice fade effect which is lost as the whole page has to reload this way before going to the #tab1 location.

 

Im guessing somehow this is caused by sts but im not sure how. anyone with a good knowledge of the system i would really appreciate ur help!

 

Thanks

 

Matt

Edited by mastubbs
Link to comment
Share on other sites

<a href="<?php
 echo curPageURL();
?>/#tab1"><span>TAB 1</span></a>

 

I meant to say also

 <?php DEFINE ('STS_CONTENT_END_CHAR', '$'); ?>
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
 $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
 $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
?>

Link to comment
Share on other sites

Ok. So i have read the "create content template" like a thousand times and google my head off but I have trouble understanding how things comes together here.. If someone have time to explain this with some code it would be great! I read the previous post in this thread on how to create content template for a brand new page but I wan't to create a content template for a existing page and that, I don't get

 

Ok. I want to make content templates for some parts of the shop so I don't need to change the real oscommerce file and so it simplifies changing layout of a shop (I have several).

 

1) The first thing I wan't to make a content template for is the "homepage". I have done a index.php_0.html template (but I don't even think I need this). What I realy wan't is to make placeholders of the welcome text, "welcome guest..." and title etc. So I realy can change the placing of this. Since I use a contrib that lets med edit information pages It's no good for me to make a static page for the welcome file (index.php_0.html) so the placeholder is the way to go for me.

 

I have peeked at the sts_product_info.php file for sts. But I don't understand how it captures the content from the product_info.php file from oscommerce so thats a dead end for me.

 

I understand that this is done in several steps. First I need to create the content template in /content/ and name it like mystartpage.php.html. second I need to create some placeholders in, say /sts_inc/sts_user_code.php.

 

But how do I get sts to understand how to use the content template for the index.php_0.html?

 

Maby some friendly soul could explain this (like to a child) in some bits of code.

 

2) Second thing I wan't to change layout for is the infopage box. I need to clean up the content and list the items in this box in a list. Same thing here. How do I make sts understand that it should use the content template for this box?

Link to comment
Share on other sites

  • 2 weeks later...

Hi,

 

i have quite a strange problem.

I am trying to use $breadcrumbs in product_info.php

 

But it shows just $breadcrumbs without replacing by code. After some experiments I've found that it works correcltly if the length of placeholder is not more tat 5 symbols. I te same when I am trying to make my own placeholder. So $bread works great but $breadc is problem.

 

What it can be?

Link to comment
Share on other sites

Hi,

 

i have quite a strange problem.

I am trying to use $breadcrumbs in product_info.php

 

But it shows just $breadcrumbs without replacing by code. After some experiments I've found that it works correcltly if the length of placeholder is not more tat 5 symbols. I te same when I am trying to make my own placeholder. So $bread works great but $breadc is problem.

 

What it can be?

Are you using an End Character for the other variables? If so, you should be using one for any additional variables as well.

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

Hello all..

 

I've some problems with the FWR Tree menu to work together with STS.

Here's a link: http://www.oscommerce.com/community/contributions,5942/

 

My site can be found here: http://datorbasen.se/db/

 

The site isnt fully shown becuase im working on it - and dont want to publish all here :D

 

It should be a tree-menu.. But it's NOT working.. Please - Help me!

Link to comment
Share on other sites

I installed Dynamenu v1_11, STS 4.5.8, Header tag seo V_3.1.5, ultimate seo URL 2.1d

Dynamenu not flyout if STS is enabled, If STS is disabled dynamenu will flyout.

also I have to exclamation marks (garbage characters) in my template below $content.

my site http://www.tiffanys.web.aplus.net/18/

 

Any help will be appreciated!

Edited by nudylady
Link to comment
Share on other sites

Eek I'm stuck!

 

I downloaded a new template from

http://www.ezosc.com/templates/2009/06/26/minimal-purple/

 

and installed STS no problem.

 

I'm not sure how to install in template files.

 

I tried uploading the minimal-purple folder to sts_templates and then changing 'test' to 'minimal-purple' in my default module but it just broke my site! whoops.

 

Can anyone help?

Link to comment
Share on other sites

Eek I'm stuck!

 

I downloaded a new template from

http://www.ezosc.com/templates/2009/06/26/minimal-purple/

 

and installed STS no problem.

 

I'm not sure how to install in template files.

 

I tried uploading the minimal-purple folder to sts_templates and then changing 'test' to 'minimal-purple' in my default module but it just broke my site! whoops.

 

Can anyone help?

 

 

Jon,

 

Although ezosc follows the STS "standards" when creating their custom templates, they are designed specifically for their version of osc: EZOSC. Therefore, they created several STS tags in the sts_user_code.php file that pertain to custom pages in ezosc that are not in a stock osC. This does not mean that you cannot use their templates, it only means that you will need to add in the missing functions if you want the template to be exactly as it was intended.

 

You could contact ezosc for help or simply run a file comparison tool such as BeYond Compare to find what the differences are from your shop (see what STS tags you are missing and what files these tags refer to).

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 installed Dynamenu v1_11, STS 4.5.8, Header tag seo V_3.1.5, ultimate seo URL 2.1d

Dynamenu not flyout if STS is enabled, If STS is disabled dynamenu will flyout.

also I have to exclamation marks (garbage characters) in my template below $content.

my site http://www.tiffanys.web.aplus.net/18/

 

Any help will be appreciated!

 

Take a look in the STSv4 Power Pack site (a site for all STS add-ons) and you will find a tutorial on how to get your Dynamenu to work with STSv4.

 

http://addons.oscommerce.com/info/4456

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

Jon,

 

Although ezosc follows the STS "standards" when creating their custom templates, they are designed specifically for their version of osc: EZOSC. Therefore, they created several STS tags in the sts_user_code.php file that pertain to custom pages in ezosc that are not in a stock osC. This does not mean that you cannot use their templates, it only means that you will need to add in the missing functions if you want the template to be exactly as it was intended.

 

You could contact ezosc for help or simply run a file comparison tool such as BeYond Compare to find what the differences are from your shop (see what STS tags you are missing and what files these tags refer to).

Thanks - I think I'll steer clear of EXOSC for the time being. I don't suppose anyone knows a good source of free templates that work easily with the latest version of STS?

Link to comment
Share on other sites

Hi:

 

Thanks for use our template, rigth now we are working in all our template to be compatible 100% with oscommerce

 

The common problem is that the menu table is missing , just rum this query in database and the template will be work fine

 

CREATE TABLE IF NOT EXISTS `menu` (

`menu_id` int(11) unsigned NOT NULL AUTO_INCREMENT,

`menu_text` varchar(255) COLLATE utf8_unicode_ci NOT NULL,

`menu_url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,

`sort_order` int(1) NOT NULL DEFAULT '0',

PRIMARY KEY (`menu_id`)

) ENGINE=MyISAM;

 

Thanks

Luis

 

 

Eek I'm stuck!

 

I downloaded a new template from

http://www.ezosc.com/templates/2009/06/26/minimal-purple/

 

and installed STS no problem.

 

I'm not sure how to install in template files.

 

I tried uploading the minimal-purple folder to sts_templates and then changing 'test' to 'minimal-purple' in my default module but it just broke my site! whoops.

 

Can anyone help?

Link to comment
Share on other sites

Hi All, I have a question regarding the template for infobox, I tried to read the user menu but I don't quite understand how to do it, please see if anyone can help me for that.

 

I want to assign a typical infobox layout for the language box, I just want to take away the box's frame with just the country flags showing on the top of the page, I created 2 files for that infobox (infobox_language_header.php.html & infobox_language.php.html)(actually I think I don't need the header), my problem is I don't know how to "link" this new html layout to the sts template.

 

Pleaes kindly help me for that, thank you very much!

Link to comment
Share on other sites

Hi All, I have a question regarding the template for infobox, I tried to read the user menu but I don't quite understand how to do it, please see if anyone can help me for that.

 

I want to assign a typical infobox layout for the language box, I just want to take away the box's frame with just the country flags showing on the top of the page, I created 2 files for that infobox (infobox_language_header.php.html & infobox_language.php.html)(actually I think I don't need the header), my problem is I don't know how to "link" this new html layout to the sts template.

 

Pleaes kindly help me for that, thank you very much!

 

 

First of all, you did not follow the correct naming syntax for infoboxes. You MUST use the same name as what is listed in the includes/boxes/ directory. The correct syntax would be infobox_languages.php.html. Then, you use the STS tag that is listed in the includes/modules/sts_inc/sts_column_left.php file for the language box which is $languagebox. If you want, you can edit the code to remove the box as so:

 

 

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

include(DIR_WS_BOXES . 'languages.php');

$sts->restart_capture ('languagebox', 'box');

Remove the 'box' so it looks like this:

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

include(DIR_WS_BOXES . 'languages.php');

$sts->restart_capture ('languagebox');

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

First of all, you did not follow the correct naming syntax for infoboxes. You MUST use the same name as what is listed in the includes/boxes/ directory. The correct syntax would be infobox_languages.php.html. Then, you use the STS tag that is listed in the includes/modules/sts_inc/sts_column_left.php file for the language box which is $languagebox. If you want, you can edit the code to remove the box as so:

 

 

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

include(DIR_WS_BOXES . 'languages.php');

$sts->restart_capture ('languagebox', 'box');

Remove the 'box' so it looks like this:

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

include(DIR_WS_BOXES . 'languages.php');

$sts->restart_capture ('languagebox');

 

 

First of all, thank you for your help!

 

I can now linking to the new template.

 

I removed all tables in infobox_languages.php.html and I removed the header file (infobox_languages_header.php.html) as well, then I follow you script and edited includes/modules/sts_inc/sts_column_left.php file, don't know why there is still a box containing the country flag icons, is it possible to remove this box? I just want my flags icons in the layout.

 

I know nothing about scripting so I am sorry if I missed something again, thank you so much.

Link to comment
Share on other sites

I have a problem with the info boxes in STS v4.5.3.

 

The problem can be seen in the image below the box headers are overwritten by something and i have no idea of what it is that over write the headers.

Not even the info_information box works as it should..

 

osc_error.jpg

 

Any suggestions of what it can be ??

Link to comment
Share on other sites

Dear All, got few questions regarding the modification of template layout, please kindly help!

 

question.jpg

 

1. In Shopping Cart infobox, the line spacing between products were too tight, so I add a "line-height: 20px;" to CSS style "infoBoxContents", the line spacing is great after that, however, if the product name is too long then it will break into 2 lines, the line spacing for this product will then look so strange, what I can do to avoid this? I would like to keep some spacing for each product but not for a single product name.

 

2. how to change the color of the balck 1 pixel line over the price?

 

3. how to change the CSS for the price?

 

4. I would like to remove the box (blue area in my example) that surrounding the language flags, I asked the same question 2 days ago but I still couldn't figure out how to do that. I deleted everything except "$content" in infobox_languages.php.html, I also tried to add a css style to constraint the height and padding but didn't work. I am not sure if that "box" code is located at cataglue/includes/boxes/languages.php, I dont know scripting so I don't know how to modify it.

 

Please kindly help if you have any idea, thank you very much!!

Link to comment
Share on other sites

Take a look in the STSv4 Power Pack site (a site for all STS add-ons) and you will find a tutorial on how to get your Dynamenu to work with STSv4.

 

http://addons.oscommerce.com/info/4456

 

Hello bill. Thanks for your help. I have not made the menu flyout.

IE bottome status bar showing !Error on page if $dmbox is included in sts_template.html

I found your PDF file: How to get Dynamenu to work with STSv4x

 

May I ask a few questions?

 

1

STEP 3: You must include the following line of code in your template where you would like the menu to appear:

<?php include(DIR_WS_BOXES . 'dm_categories.php'); ?>

Do I put this line of code in catalog/includes/header.php or sts_template.html?

I tried both files.

 

2

STEP 3 TIP: insert sample code into your “includes/modules/sts_inc/sts_user_code.php” file
.

DONE. I put it on very top in sts_user_code.php just above

$sts->start_capture();

echo "\n<!-- Start Category Menu -->\n";

 

3

STEP 4. You must include the following line of code in each of your templates that will be using the menu (The "footer" should be echoed *just before* the closing </BODY> tag.):<?php echo $GLOBALS['dmfooter']; ?>

I put this line of code in sts_template.html. Am I right?

 

4

STEP 4 TIP 1: It may be easier to just create a file with the above code and then save this file to includes/modules/sts_inc/file_name and then add the file_name to the list of files to include in the STS admin.

 

I created a file sts_dm.php contains the this code only:

 

$sts->start_capture('dmbox', 'box');

require(DIR_WS_BOXES . 'dm_categories.php');

$sts->stop_capture('dmbox', 'box');

 

then go to admin-STS module-Files for normal template, I add ,sts_dm.php after sts_user_code.php

 

5

STEP 4 TIP 2: in application_bottom.php add the above code.

I added <?php echo $GLOBALS['dmfooter']; ?> in application_bottom.php. Right?

 

 

I tried all above. But it doesn't flyout. my site: www.tiffanys.web.aplus.net/25

when STS disable it's OK www.tiffanys.web.aplus.net/18

STS is the 1st addon to my OSC. I just copied the files over.

Edited by nudylady
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...