Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Has anyone figured out how to get Simple Template System (STS) to work with Auction 1.4.4? I've got both contributions working perfectly, but when I turn on STS, the Auction contribution is no longer visable.

 

I've search all over trying to figure out how to set up STS with other contributions, but there does not appear to be any instructions on how to integrate. All I see are a few posts saying that if a contribution makes a change to product_info.php, there must be corresponding chages to includes/modules/sts_inc/product_info.php .

Link to comment
Share on other sites

Has anyone figured out how to get Simple Template System (STS) to work with Auction 1.4.4? I've got both contributions working perfectly, but when I turn on STS, the Auction contribution is no longer visable.

 

I've search all over trying to figure out how to set up STS with other contributions, but there does not appear to be any instructions on how to integrate. All I see are a few posts saying that if a contribution makes a change to product_info.php, there must be corresponding chages to includes/modules/sts_inc/product_info.php .

 

David,

What does the Auction contribution have that STS has issues with?

I'm not familiar with the contribution but if it is just an infobox that does not get displayed, then that is a very common issue that has a very simple procedure that is documented in the sts_user_code.php file.

 

Also, it may just need a template page created for it. If the contribution has a custompage.php script that you have to include in either the index.php, column_right.php or column_left.php files, then all you would have to do is either create a custom template called custompage.php.html (exchange "custompage" for the real PHP script name).

 

:thumbsup: When trying to integrate a contribution with STS, check the STS Power Pack site that is full of tips on how to accomplish this. Your specific contribution may already be listed there.

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

About my problem with the popup page not resizing to the picture if i have STS 4.5.6 up and running:

After a lot of searching, editing, and errors I realized that the resize function works fine if I leave "Use template for the image popup page" in the admin section set to false

So I will settle for that, for the time being.

 

I'm still not being able to duplicate your problem. Maybe it's because I came across this a while back and just don't recall what I did to fix it. :blink:

 

If I get time this week, I will create a test shop running RC1 & STSv4.5.6 and see if I can duplicate it and then come up with a fix or a work around.

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, sorry if I am a doofus but I can't seem to install STS4.5.5

 

Am running osCommerce version osCommerce 2.2-MS2. - with no other installed contributions or modifications yet.

After downloading latest STS 4.5.4 (from www.oscommerce.com/community/contributions,1524),

went into store admin area to install STS's module.

No matter what I do, I cannot install the main (Defalut) module.

For Use Templates? ... I keep trying to set it to "true" and then Update ... and it keeps reverting back to false.

 

All the other modules (Index, Product info, popup image) seem to be ok.

 

Can someone please give me a pointer here??

 

Thank you. Really please - thank you

 

Helena

p/s I have done all the basic instructions given in the install.html already

p/s I posted this somewhere else coz I am new to all this. sorry if this query is appearing twice in the forum.

Link to comment
Share on other sites

You are probably using version 2.2MS2, which is not the last one. Take osCommerce 2.2RC1 and it'll work. This is a bug of the MS2. For a solution, read little bit back on this thread, many had the same problem.

 

- Chris

Link to comment
Share on other sites

I, sorry if I am a doofus but I can't seem to install STS4.5.5

 

Am running osCommerce version osCommerce 2.2-MS2. - with no other installed contributions or modifications yet.

After downloading latest STS 4.5.4 (from www.oscommerce.com/community/contributions,1524),

went into store admin area to install STS's module.

No matter what I do, I cannot install the main (Defalut) module.

For Use Templates? ... I keep trying to set it to "true" and then Update ... and it keeps reverting back to false.

 

...

 

ok! no problem! I AM a self-confessed doofus!

I found the solution :)

Some sort of compatibility issue with osCommerce update 060817 and STS4.5

The patch is: osC MS2 060817 Module Patch for STSv4.2 & 4.3 found at: http://www.oscommerce.com/community/contributions,1524 .. and of couse, by the great Bill Kellum.

Thanks so much Bill! Has anyone told you lately you are just Super?

Link to comment
Share on other sites

What is STS? :blush:

STS stands for the "Simple Template System". There are a lot of PHP simple template systems available for PHP scripts and STS is the one created for the PHP script "osCommerce".

 

In short, STS allows you to either create a single HTML template for your entire shop or a specific template for each individual page, infobox, category, manuafacturer, etc. in your shop. By using STS, you can use your web design skills into osCommerce without having to know a lot about PHP. However, STS also allows you to use your PHP skills directly within the template page to add more functionallity to osCommerce that would not be available otherwise.

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

That sounds like something I could use....so if you have an existing site that is plain HTML, and you would like to keep that layout but make it OSCommerce, something like STS could make that transition a bit smoother? We just completed one OSCommerce store and it's not bad for a first attempt but still has that "default" edge to it. I'm envious of the sites that were able to jazz theirs up so beautifully.

 

There's so much to learn it gets overwhelming at times, but still fun...thanks :rolleyes:

Link to comment
Share on other sites

That sounds like something I could use....so if you have an existing site that is plain HTML, and you would like to keep that layout but make it OSCommerce, something like STS could make that transition a bit smoother? We just completed one OSCommerce store and it's not bad for a first attempt but still has that "default" edge to it. I'm envious of the sites that were able to jazz theirs up so beautifully.

 

There's so much to learn it gets overwhelming at times, but still fun...thanks :rolleyes:

Yep, STS works perfectly for keeping your existing theme. I think the thought of designing your web site to match a script is majorly backwards. You should be able to merge a script such as osCommerce into an existing web site, not the other way around. STS fills that huge void. :thumbsup:

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 everyone, i am new to osC and the forums here. So far i love the product and am happy to be here. I have installed the newest osC (v2.2RC1) and STS (v4.5.4 Full then v4.5.5 updates, then v4.5.6 updates) and am now doing my tweaking via STS. I am having a tiny hiccup though and would really appreciate some help.

 

I would like to make links within infoBoxContents to behave differently than body links. I have added the below code just below .infoBoxContents in the stylesheet.css but it is not making a difference...

 

A.infoBoxContents { 
 color: #FFFFFF; 
}

A.infoBoxContents:hover {
 color: #CCCCCC;
}

 

 

It has not done the trick for me. I know i am missing something simple here.

 

My main reason for wanting the body links and infoBoxContents links to behave differently is that i changed the background colors of each so that one color scheme for links will not work in both areas. Kind of like the way that the breadcrumbs behave differently.

 

I have just spent the last half hour or so digging around different files and such and also searching here but seem to be at a dead end for the time being. I am pretty tired though so i may just not be thinking straight. Any help would be greatly appreciated.

 

thX! I hope i posted this to the correct area.

-CC

 

 

P.S. When i enter 'full' as my 'Template folder' and set 'Use template for infoboxes' to 'true', the tables are broken and display out of whack. So for now i just have that part set to 'false'. I can do a screenshot if it helps.

Edited by Computer Candy
Link to comment
Share on other sites

I would like to make links within infoBoxContents to behave differently than body links. I have added the below code just below .infoBoxContents in the stylesheet.css but it is not making a difference...

 

A.infoBoxContents { 
 color: #FFFFFF; 
}

A.infoBoxContents:hover {
 color: #CCCCCC;
}

It has not done the trick for me. I know i am missing something simple here.

 

-CC

 

Hi CC ...

what you need to do is:

.infoBoxContents A {
color: #FFFFFF;
}
.infoBoxContents A:hover {
color: #CCCCCC;
}

 

that should do the trick.

With your code, for every one of your links in the in the Info Boxes, you would have to write <a href='...' class='infoBoxContents'>...</a>

Your code was saying, for all hyperlinks WITH A CLASS of 'infoBoxContents' .. then it should have those colours.

 

What the code I have given is saying is that for all hyperlinks within a block that already has the class of 'infoBoxContents', then the hyperlinks within should have those colours.

 

hope that helps,

Helena

Link to comment
Share on other sites

Thank you! It seems obvious now that i see it. It is very appreciated. :)

 

Anyone happen to be able to confirm my P.S. above?

P.S. When i enter 'full' as my 'Template folder' and set 'Use template for infoboxes' to 'true', the tables are broken and display out of whack. So for now i just have that part set to 'false'. I can do a screenshot if it helps.
Link to comment
Share on other sites

I have downloaded and installed STS 4.5.4 for 2.2MS2 and RC1 the latest full version I then updated it with STS 4.5.6 for 2.2MS2 and RC1, I went to my Admin panel and installed teh emplates

 

Default

Index

Popup image

Product info

 

Default template (v2.1.1)

 

Use Templates?

true

 

Code for debug output

debug

 

Files for normal template

sts_user_code.php

 

Base folder

includes/sts_templates/

 

Template folder

full

 

Default template file

sts_template.html

 

Use template for infoboxes

false

 

Index template (v2.0.0)

 

Use template for index page

true

 

Files for index.php template

sts_user_code.php

 

Check parent templates

true

 

Product image popup templates (v1.0.0)

 

Use template for the image popup page

false

 

Files to include

 

Product info templates and content templates (v2.1.0)

 

Use template for product info page

true

 

Enable STS3 compatibility mode

false

 

Files for normal template

sts_user_code.php

 

Files for content template

sts_user_code.php;product_info.php

 

I followed teh instructions;

 

HOW TO USE:

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

Just modify the

 

/catalog/includes/sts_template.html

 

file to look however you want. Use stylesheet settings or HTML setting to

provide a custom look and feel to your site and arrange elements wherever you

like them.

 

I don not see /catalog/includes/sts_template.html but I do see /catalog/includes/full/sts_template.html

 

So I Modified the /catalog/includes/full/sts_template.html

 

But I do not see any changes, what I see is a page with

 

This is the template for index.php page. You can find it here: /includes/sts_templates/full/index.php.html

 

This maybe a dull question but do I need to alter all of the templates? which would mean that it is not just a case of modifying the /catalog/includes/FULL/sts_template.html

Link to comment
Share on other sites

I have downloaded and installed STS 4.5.4 for 2.2MS2 and RC1 the latest full version I then updated it with STS 4.5.6 for 2.2MS2 and RC1, I went to my Admin panel and installed teh emplates

 

Default

Index

Popup image

Product info

 

Default template (v2.1.1)

 

Use Templates?

true

 

Code for debug output

debug

 

Files for normal template

sts_user_code.php

 

Base folder

includes/sts_templates/

 

Template folder

full

 

Default template file

sts_template.html

 

Use template for infoboxes

false

 

Index template (v2.0.0)

 

Use template for index page

true

 

Files for index.php template

sts_user_code.php

 

Check parent templates

true

 

Product image popup templates (v1.0.0)

 

Use template for the image popup page

false

 

Files to include

 

Product info templates and content templates (v2.1.0)

 

Use template for product info page

true

 

Enable STS3 compatibility mode

false

 

Files for normal template

sts_user_code.php

 

Files for content template

sts_user_code.php;product_info.php

 

I followed teh instructions;

 

HOW TO USE:

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

Just modify the

 

/catalog/includes/sts_template.html

 

file to look however you want. Use stylesheet settings or HTML setting to

provide a custom look and feel to your site and arrange elements wherever you

like them.

 

I don not see /catalog/includes/sts_template.html but I do see /catalog/includes/full/sts_template.html

 

So I Modified the /catalog/includes/full/sts_template.html

 

But I do not see any changes, what I see is a page with

 

This is the template for index.php page. You can find it here: /includes/sts_templates/full/index.php.html

 

This maybe a dull question but do I need to alter all of the templates? which would mean that it is not just a case of modifying the /catalog/includes/FULL/sts_template.html

 

 

I have since worked this one out and now use teh test folder instead of the full folder

Link to comment
Share on other sites

I know this has got to be something simple that I'm missing here - but I can't seem to figure out what.

 

I added some new specials today (we haven't had any in a bit) and when the Specials box shows up it has no title. I checked the includes/boxes/specials.php , includes/classes/boxes.php , includes/languages/english.php and catalog/stylesheet.css and I just cannot find any reason why it wouldn't show up.

 

I've compared the code to codes for other boxes that do have their titles showing up and I'm at a loss as to what other file I might be missing to look at. Any ideas? :blush:

~Tracy
 

Link to comment
Share on other sites

I have since worked this one out and now use teh test folder instead of the full folder

I would not call that a solution but rather an out for not understanding how STS works. The text on your page should give you a clue on what template page is being used and therefore what template to edit.

 

You have set the default template to be sts_template.html but you also activated the Index Module so now you will be using the index (catalog) templates as well (which is normal but not necessary).

 

Using the Full folder would be recommended if you want to use all of the STS features such as infobox templates. Once you get more familiar with STS, you can even create your own template folder and name it anything you want such as Holidays, Theme_1, Theme_2 and so on. You don't have to stick with the test or full template folders. They are there for you to learn from to see how STS works and how to create the proper folder structure within your custom template folder (content, boxes, etc).

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 know this has got to be something simple that I'm missing here - but I can't seem to figure out what.

 

I added some new specials today (we haven't had any in a bit) and when the Specials box shows up it has no title. I checked the includes/boxes/specials.php , includes/classes/boxes.php , includes/languages/english.php and catalog/stylesheet.css and I just cannot find any reason why it wouldn't show up.

 

I've compared the code to codes for other boxes that do have their titles showing up and I'm at a loss as to what other file I might be missing to look at. Any ideas? :blush:

 

Tracy, are you using Infobox Templates? If so, you may have left out the title in the specials infobox template.

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

Good question - but I'm not using Infobox Templates (and it says false in Admin).

 

I've also tried turning off STS (saying "false" in admin to "Use Templates") - and then I DO get the Specials Box Title. But with STS turned on I do Not :huh:

 

Any other thoughts on where to look? :blush:

 

Tracy, are you using Infobox Templates? If so, you may have left out the title in the specials infobox template.

~Tracy
 

Link to comment
Share on other sites

TO SHOW PRODUCT QUANTITY IN PRODUCT DETAIL PAGE (using osc 2.2-MS2, sts 4.5.4)

 

Please help. For the last 2 days I have been going through the sts manual, round & round in the forums, trying desperately to look at the code in files .. and I am still lost, sadly and badly hampered by my lack of PHP knowledge.

 

I just want to add the Products Quantity to show on my products detail page.

 

Please tell me where to go, what file and what code I need to do this.

 

I added $products_quantity$ in (catalog)/includes/sts_templates/(template directory)/content/product_info.php.html ... but to no avail.

 

And yes, the sub-module 'Product info' of the STS module is activated.

 

THANKS for any help whatsoever.

 

Helena

Link to comment
Share on other sites

TO SHOW PRODUCT QUANTITY IN PRODUCT DETAIL PAGE (using osc 2.2-MS2, sts 4.5.4)

 

Please help. For the last 2 days I have been going through the sts manual, round & round in the forums, trying desperately to look at the code in files .. and I am still lost, sadly and badly hampered by my lack of PHP knowledge.

 

I just want to add the Products Quantity to show on my products detail page.

 

Please tell me where to go, what file and what code I need to do this.

 

I added $products_quantity$ in (catalog)/includes/sts_templates/(template directory)/content/product_info.php.html ... but to no avail.

 

And yes, the sub-module 'Product info' of the STS module is activated.

 

THANKS for any help whatsoever.

 

Helena

Helena,

What you are wanting to do is not an "out of the box" osCommerce feature. OsCommerce has an option in the admin to show the products quantity on the product listing page but not as an option on the product detail page.

 

If you want to do this, you will need to modify the code yourself or install a contribution that does this for you. STS has nothing to do with it other than allowing you to add the PHP code needed to perform this task directly within the template itself.

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

Good question - but I'm not using Infobox Templates (and it says false in Admin).

 

I've also tried turning off STS (saying "false" in admin to "Use Templates") - and then I DO get the Specials Box Title. But with STS turned on I do Not :huh:

 

Any other thoughts on where to look? :blush:

I'm sure you already checked your languages files for:

// specials box text in includes/boxes/specials.php
define('BOX_HEADING_SPECIALS', 'Specials');

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

Good question - but I'm not using Infobox Templates (and it says false in Admin).

 

I've also tried turning off STS (saying "false" in admin to "Use Templates") - and then I DO get the Specials Box Title. But with STS turned on I do Not :huh:

 

Any other thoughts on where to look? :blush:

Also, for good measure...

 

Compare your classes/boxes.php file with the boxes.php file from the latest version of STS to see if you may have deleted some of the STS code for the infobox templates:

 

 

function infoBoxHeaderTemplate($headertext,$right_arrow) {
// STS 4.3: put header template and tags in $sts object, do not display them now.
// STS 4.5.2: BUG corrected, was checking content cache instead of header cache
  global $sts;

 $btrace=debug_backtrace();
 $boxname=basename($btrace[1]['file'],".php");
 $boxprefix = "infobox_";

 // Added in v4.4: allows to use catalog_filename.html as template for boxes created directly in a catalog script.
 $boxname2 = basename($btrace[2]['file'],".php"); // backtrace 2 is the file calling the calling file (like sts_column_left.php)
if ($boxname2=='') $boxprefix = "catalog_";

  if (file_exists(STS_TEMPLATE_DIR."boxes/$boxprefix".$boxname."_header.php.html")) {
  $template=sts_read_template_file (STS_TEMPLATE_DIR."boxes/$boxprefix".$boxname."_header.php.html");
 } elseif (isset($sts->infobox['default_header'])) { // Corrected in v4.5.2, was checking content cache
$template = $sts->infobox['default_header']; // Default box already in memory, get it from there
 } elseif (file_exists(STS_TEMPLATE_DIR."boxes/infobox_header.php.html"))  { // v4.5.2: header template optional
  $template=sts_read_template_file (STS_TEMPLATE_DIR."boxes/infobox_header.php.html");
  $sts->infobox['default_header'] = $template;
 } else $sts->infobox['default_header'] = ''; // v4.5.2: If no header template, cache an empty string
 $sts->infobox_header_template = $template;
 $sts->infobox_headertext = $headertext;
 $sts->infobox_right_arrow = $right_arrow;
}

function infoBoxTemplate($content) {
// STS 4.3: read content, display header & content.
// STS 4.4: reset headertext and right_arrow variables in case next box has no header.
  global $sts;
 $btrace=debug_backtrace();
 $boxname=basename($btrace[1]['file'],".php"); // backtrace 1 is the calling file
 $boxprefix = "infobox_"; // Added in v4.3SP2.

 // Added in v4.4: allows to use catalog_filename.html as template for boxes created directly in a catalog script.
 $boxname2 = basename($btrace[2]['file'],".php"); // backtrace 2 is the file calling the calling file (like sts_column_left.php)
if ($boxname2=='') $boxprefix = "catalog_";

  if (file_exists(STS_TEMPLATE_DIR."boxes/$boxprefix$boxname.php.html")) {
  $template=sts_read_template_file (STS_TEMPLATE_DIR."boxes/$boxprefix$boxname.php.html");
 } elseif (isset($sts->infobox['default_content'])) {
$template = $sts->infobox['default_content']; // Default box already in memory, get it from there
 } else { // Otherwise read it from file and save it
$template = sts_read_template_file (STS_TEMPLATE_DIR."boxes/infobox.php.html");
  $sts->infobox['default_content'] = $template;

 }

 $template = $sts->infobox_header_template."\n".$template; // Add header before the content. Header can be empty.
 $template = str_replace('$headertext', $sts->infobox_headertext, $template);
 $template = str_replace('$right_arrow', $sts->infobox_right_arrow, $template);
 $template = str_replace('$content', $content, $template);

 echo $template;
 $sts->infobox_header_template = '';
 $sts->infobox_headertext = '';
 $sts->infobox_right_arrow = '';
}
 } // END tableBox class

:thumbsup: I did not post the entire STS changes to the boxes.php file 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

TO SHOW PRODUCT QUANTITY IN PRODUCT DETAIL PAGE (using osc 2.2-MS2, sts 4.5.4)

Helena,

What you are wanting to do is not an "out of the box" osCommerce feature. OsCommerce has an option in the admin to show the products quantity on the product listing page but not as an option on the product detail page.

 

If you want to do this, you will need to modify the code yourself or install a contribution that does this for you. STS has nothing to do with it other than allowing you to add the PHP code needed to perform this task directly within the template itself.

Hello Bill .. before I go any further, I just need to say I don't know how you do this coz you have such a BIG heart to answer so many questions and help so many people! :thumbsup: Thank you.

 

Yes, I know it is an "out of the box" modification. I was hoping someone would tell me how I could modify the code so I can display the quantity in the product detail page. I thought maybe I could define a placeholder (maybe in /includes/modules/sts_inc/sts_user_code.php file?). But I just didn't know how to do that.

 

And obviously there is some sort of variable/placeholder in osc ($products_quantity) from somewhere so that the qty shows in the Product Listing pages, I thought maybe I could caputre that somehow and put it into my (sts) product contents template?

 

If anyone can give me some pointers, that would be like heaven! Thanks,

Helena

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