Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Please disregard the above post as I have now found the answer.

 

I added the 'width' tag on the style sheet and things are looking and working great and the infobox templates work great too. The only problem is when I use a fixed width 3 column css template then after I specify the width the image items are ok but when I go to log in the same problem as before occurs, but at least I now know where the problem lies.

 

What I would like to ask is how am I able to insert a small image before each category in the category infobox. I have seen other oscommerce sites that have that as well as a dotted line between each category but I have no idea how to do that, can someone enlighten me at all?

 

Thanks for the help.

Yes, the width tag can cause problems in some browsers if added in the HTML rather than in the styesheet.

 

Regarding your categories, I suggest the following:

Category bullet and line: http://www.oscommerce.com/community/contributions,2105

Category Box Images: http://www.oscommerce.com/community/contributions,2387

 

Hope this helped you out,

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

Hoping someone can give me some direction here, just installed STS 4.5.8 on a fresh install of MS2.

When trying to enable STS (default module)in the admin modules screen I select "edit" then select the radio button for "true" under the "Do you want to use Simple Template System?" then select save, it returns me to the original sts module screen and shows the setting as "false" as if I never made the selection, Its installed! I have gone back and verified every file is where it should be(3 times) I even started from scratch with a new install of oscommerce but still get the same result.

Being a total newb to oscommerce and sts I'm sure its something simple I missed.

Any help you kind experts could lend me would be very appreciated.

Edited by sitefire
Link to comment
Share on other sites

Hoping someone can give me some direction here, just installed STS 4.5.8 on a fresh install of MS2.

When trying to enable STS (default module)in the admin modules screen I select "edit" then select the radio button for "true" under the "Do you want to use Simple Template System?" then select save, it returns me to the original sts module screen and shows the setting as "false" as if I never made the selection, Its installed! I have gone back and verified every file is where it should be(3 times) I even started from scratch with a new install of oscommerce but still get the same result.

Being a total newb to oscommerce and sts I'm sure its something simple I missed.

Any help you kind experts could lend me would be very appreciated.

 

The version of osC that you are using has a Module Refresh bug. See the following link to correct your problem:

http://www.oscommerce.com/forums/index.php?sho...p;#entry1117449

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

If I remove the category name and image, is there a way to get the products table to line up with the top table on the navigation on the left? It currently lies slightly above.

 

Thanks

 

Lotti

Link to comment
Share on other sites

hi,

 

i've just installed STSv4.5.8 and got it to work without any hassles and have started templating :)

 

i've managed to get templates working on index as follows :

 

index.php_mfr_722.html

(per manufacturer 722)

 

however i'm wonderin if there's a work around so that each product_info page followed from here also has the template.. i've tried a file named as follows:

 

product_info.php_mfr_722.html

 

) for when i browse to product_info.php?manufacturers_id=722&products_id=10189 (

 

but this doesn't work.. anyone got any ideas?

 

(i've tried searching the help files/forum etc but to no avail)

i know i can do it the index.php_336_792.html way for instance but product_info via manufacturer would save creating 100s of template files.

 

thanks in advance :)

kev.

Edited by kev@num
Link to comment
Share on other sites

tada:

 

edit sts_product_info.php

 

 

// Check now for the 'outside' template (columns, header, footer):

// Is there a template for this particular product?

 

 

//kev hack for custom product_info template per manufacturer

if (isset($_GET['manufacturers_id'])) {

$check_file = STS_TEMPLATE_DIR . "product_info.php_mfr_".$_GET['manufacturers_id'].".html";

if (file_exists($check_file)) {

// Use it

$this->template_file = $check_file;

return $check_file;

}

}

Link to comment
Share on other sites

Not sure if this is STS related or not (don't want to turn STS off on a live shop - LOL)

 

I am running the HTML Validator in the Firefox Webmaster Tools toolbar, and one of the errors that I am getting is that there is a closing tag like this: /> rather than just >.

 

The tag is here:

<input type="hidden" name="osCsid" value="92e8d1263a67c15cb94ed1d6ccadf661" /><input type="hidden" name="search_in_description" value="1">

 

This is in the search box (includes/boxes/search.php) - however, there is no /> in the script there - just calls to the draw_hidden_field, hide_session_id, and draw_input_field

 

In my includes/functions/html_output.php I seem to have the code creating these - but I cannot find any /> closing tags in here:

////
// Output a form input field
 function tep_draw_input_field($name, $value = '', $parameters = '', $type = 'text', $reinsert_value = true) {
$field = '<input type="' . tep_output_string($type) . '" name="' . tep_output_string($name) . '"';

if ( (isset($GLOBALS[$name])) && ($reinsert_value == true) ) {
  $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
} elseif (tep_not_null($value)) {
  $field .= ' value="' . tep_output_string($value) . '"';
}

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

return $field;
 }

////
// Output a form hidden field
 function tep_draw_hidden_field($name, $value = '', $parameters = '') {
$field = '<input type="hidden" name="' . tep_output_string($name) . '"';

if (tep_not_null($value)) {
  $field .= ' value="' . tep_output_string($value) . '"';
} elseif (isset($GLOBALS[$name])) {
  $field .= ' value="' . tep_output_string(stripslashes($GLOBALS[$name])) . '"';
}

if (tep_not_null($parameters)) $field .= ' ' . $parameters;

$field .= '>';

return $field;
 }

////
// Hide form elements
 function tep_hide_session_id() {
global $session_started, $SID;

if (($session_started == true) && tep_not_null($SID)) {
  return tep_draw_hidden_field(tep_session_name(), tep_session_id());
}
 }

 

So, I'm wondering if STS does anything to manipulate or change the above functions? I am guessing it doesn't as I haven't found anything looking through my files, and I've not found any /> ending tags in STS either - but decided it's worth asking in case someone knows where this is :)

~Tracy
 

Link to comment
Share on other sites

Hi any idea how to customize one infobox without affecting others?

 

Basically, I am looking at changing the background color of category infobox, however when I changed the background color of infobox in css, other boxes got affected. Can someone enlighten me how I could achieve this.

 

Thank you.

Link to comment
Share on other sites

Cheers for the links to the contributions bill they are great!

 

However, I still have a slight problem with the infoboxes in regards to the font size.

 

On my style sheet I have specified a certain font size and all works well, but when I turn on the infobox templates the font goes to a larger size than I want and I am not really sure how to adjust the size of the font. I have tried adjusting the size via the infobox but that doesnt seem to make any difference as the font in all the infoboxes are larger than I want.

 

Where can I change to font size on the infoboxes?

Link to comment
Share on other sites

You should be able to utilize the class in your stylesheet in your infobox template. You create a template for the infobox you are trying to change, and then use <span class="myclasshere">My text here</span> - or you can assign the class to a <p> tag, etc... inside your template.

 

Cheers for the links to the contributions bill they are great!

 

However, I still have a slight problem with the infoboxes in regards to the font size.

 

On my style sheet I have specified a certain font size and all works well, but when I turn on the infobox templates the font goes to a larger size than I want and I am not really sure how to adjust the size of the font. I have tried adjusting the size via the infobox but that doesnt seem to make any difference as the font in all the infoboxes are larger than I want.

 

Where can I change to font size on the infoboxes?

~Tracy
 

Link to comment
Share on other sites

By using the Infobox Templates ability that comes with STS, or by using the Infobox Customizer contribution #1261

 

Hi any idea how to customize one infobox without affecting others?

 

Basically, I am looking at changing the background color of category infobox, however when I changed the background color of infobox in css, other boxes got affected. Can someone enlighten me how I could achieve this.

 

Thank you.

~Tracy
 

Link to comment
Share on other sites

Hey Bill,

 

I've got a really strange thing happening over here IMHO.

 

I have two closing body & html tags when I view the source of my site. I have one here:

<!-- end footer /-->	</td>
 </tr>

</table>
</td>
 </tr>
</table>
</body>
</html><!-- beginning of menu footer - PHP Layers Menu 3.2.0-rc (C) 2001-2004 Marco Pratesi - http://www.marcopratesi.it/ -->

 

A whole bunch of links here, and then another after the dynamenu footer output like so:

<!-- end of menu footer - PHP Layers Menu 3.2.0-rc (C) 2001-2004 Marco Pratesi - http://www.marcopratesi.it/ -->
</body>
</html>

 

Now - if I remove the closing </body></html> tags in catalog/index.php it seems to remove the one's after the dynamenu footer. If I remove the closing </body></html> tags in my index.php_0.html template I get the </body></html> removed that is before the dynameu footer (which is the result I want). I've also learned that doing this on the index.php.html (and other template files) resolves this issue throughout the site.

 

The change I made that seemed to start this phenomenon (I think) was I had to move my application_bottom include on my site to just above the </body></html> tags on the php pages in order to get the dynamenu footer to output before these tags, and to have it actually output (for some reason it only seems to output from the application_bottom.php file, I did try from both the osC footer.php and the STS footer.php.html files). For example, my catalog/index.php now looks like this:

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
</body>
</html>

 

I don't understand why I need to remove the </body></html> tags from the templates in order to keep from having duplicate tags though. So thought I would pass this on to see if there is a fix (other than removing the tags from the templates) or if you've ever heard of this before even. :blush:

~Tracy
 

Link to comment
Share on other sites

Thank you for the reply Tracy, but I cant seem to adjust the font in the infoboxes.

 

In the template I made I specified the font using the spanclass but it did not change it at all on the site.

 

I also tried linking it to my main css template that I know makes the text smaller when the infobox templates are off and that did not change it either.

 

Any ideas where I am going wrong?

Link to comment
Share on other sites

The only places I am aware of that you can set the class for something in an info box are

 

includes/classes/boxes.php

 

includes/boxes/your_infobox_name_here.php

 

or includes/sts_templates/full/boxes/your_infobox_name_here.php.html

 

Those are the places I would check to see if there are any stylesheet references to your infoboxes.

 

Another thing you can do is to download the developers toolbars for either Firefox or IE (depending on which you like to use) and then you can see what stylesheet elements are affecting what areas on your page. This way, you could turn on the infobox templates, and then view the site in your browser and see if the stylesheet class is being applied.

 

 

Thank you for the reply Tracy, but I cant seem to adjust the font in the infoboxes.

 

In the template I made I specified the font using the spanclass but it did not change it at all on the site.

 

I also tried linking it to my main css template that I know makes the text smaller when the infobox templates are off and that did not change it either.

 

Any ideas where I am going wrong?

~Tracy
 

Link to comment
Share on other sites

Well I have had a look at each of the files but cannot see where it is getting the adjustments.

 

On my main css file I have the font set at 70% which displays a nice neat font all through the template from each of the infoboxes to the main content area. However, as soon as I soon as I switch on the infobox templates then all the text from the infoboxes to the main content become bigger and its as if something somewhere is over riding the main css file to make the content text bigger.

 

Does anybody know how I can specify the text size when the infobox templates are turned on?

Link to comment
Share on other sites

Does anybody have an answer to my above question?

 

I have been trying to solve it all day but to no avail and am really stumped.

 

It would seem that when the sts infobox templates are switched on for some reason the site no longer follows the css file specified for it and some other file takes over. I cant seem to find that file anywhere and cannot understand why all the text all through my site is affected.

 

Hopefully someone can help me find an answer as its driving me mad!!!!

Link to comment
Share on other sites

Does anybody have an answer to my above question?

 

I have been trying to solve it all day but to no avail and am really stumped.

 

It would seem that when the sts infobox templates are switched on for some reason the site no longer follows the css file specified for it and some other file takes over. I cant seem to find that file anywhere and cannot understand why all the text all through my site is affected.

 

Hopefully someone can help me find an answer as its driving me mad!!!!

Garreth,

 

Keep in mind that STS only "repeats" what is coded in either your CSS codings (template, stock stylesheet, boxes class, etc.) or in the PHP coding (actual script, boxes class, usercode, etc.).

 

:thumbsup: Tracy gave a very solid suggestion regarding using the Web Developer Toolbars available for download for either Firefox or IE. Download one or both of them and use it. From the browser, it will tell you the exact CSS style, Table, Cell, Div, etc. that is being used. You can then use that information to change whatever needs changing in your shop. I use these toolbars on a daily basis. Big time savers when troubleshooting.

 

This is the best solution that I can give besides digging into your code myself (sorry, I am way too busy at the moment).

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 don't understand why I need to remove the </body></html> tags from the templates in order to keep from having duplicate tags though. So thought I would pass this on to see if there is a fix (other than removing the tags from the templates) or if you've ever heard of this before even. :blush:

 

Tracy, are you using a template for the header.php and the footer.php files and then including them in your index template? That maybe the reason for the errant body tags.

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 downloaded and installed the web developer tools for firefox and had a look at the files when the infoboxes are off and on but cant see where it is making the change.

 

It does have the link to the style sheet when the infoboxes are turned on but I cannot see what could be making the change through the whole of the site when the infoboxes are turned on. I am really not sure as to what is causing this even after looking at the code!!

Link to comment
Share on other sites

Tracy, are you using a template for the header.php and the footer.php files and then including them in your index template? That maybe the reason for the errant body tags.

 

I do have a footer.php.html file that is included in the templates - but it does not have an ending body or html tag in it.

 

I don't have a header template file that I am aware of.

~Tracy
 

Link to comment
Share on other sites

I have downloaded and installed the web developer tools for firefox and had a look at the files when the infoboxes are off and on but cant see where it is making the change.

 

It does have the link to the style sheet when the infoboxes are turned on but I cannot see what could be making the change through the whole of the site when the infoboxes are turned on. I am really not sure as to what is causing this even after looking at the code!!

 

Try pasting your code for one of your infobox templates up here and that should allow me to tell you what styles it is calling.

~Tracy
 

Link to comment
Share on other sites

I was having probs getting the infoboxes to work but eventually got them to work by inserting the header and main content for each box, but the header part is pretty much blank as this was the only way I could get them to work.

 

Here is the code for the category box:

 

<table width="130" border="0" cellspacing="0" cellpadding="0">

<tr>

<th scope="col"><img src="../../images/cat-box-top2.jpg" width="130" height="27"></th>

</tr>

<tr>

<td background="../../images/cat-box-middle2.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<th width="8%" scope="col"> </th>

<th width="88%" scope="col"><font size="-2"> $content</th>

<th width="4%" scope="col"> </th>

</tr>

</table></td>

</tr>

<tr>

<td><img src="../../images/cat-box-bottom2.jpg" width="130" height="11"></td>

</tr>

</table>

 

And here is the code for category header box:

 

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

<tr>

</table></td>

</tr>

<tr>

<td> </td>

</tr>

</table>

 

As you can see the header box is pretty much empty, but thats the only way I could get them to work. When I just have the main content up then the only image that displays is the lower half of the box, not the middle or top for some reason which is why I have a near empty header which then works.

 

I deleted the header files from each box and tested to see what would happen, and when I did that each box displayed the lower half image and the text all through the site went bigger. I am not sure but it seems that some other file is for some reason over riding the css file and I am not sure where that could be!

Link to comment
Share on other sites

Hi,

I'm considering installing STS. Can somebody help me understand how STS works and spare me from going thought sts code?

I'm worried about the placeholders thing. Template files must be parsed for them, so I hope that it doesn't happen with every request, otherwise I'm very afraid of its impact to the performance.

 

thanks for any info

Link to comment
Share on other sites

Hi,

I'm considering installing STS. Can somebody help me understand how STS works and spare me from going thought sts code?

I'm worried about the placeholders thing. Template files must be parsed for them, so I hope that it doesn't happen with every request, otherwise I'm very afraid of its impact to the performance.

 

thanks for any info

Minimal to none. There are far more critical speed issues to deal with in an osC site such as database optimization including optimizing queries, image optimization, cache, etc. that you should be concerned with. Your host also plays a big part in the speed issue regarding your database and page load times. A site using STS could be faster than a non-STS site if the all of the above is not considered.

 

The STS versions 1 - 3 had speed issues but STS version 4.x does not.

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

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