Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

thumbsup.gif Use your web browser's developer tools to show you what CSS style is being used for that or any other portion of your site. Then use that informatio to modify that style.

 

 

Hi Bill,

 

Thanks so much for responding, I really, really appreciate it as I'm desperate for help. I just tried using 'developer tools' in IE8. When I use 'find' and then 'select element by click' and select the relevant section of the site I find the CSS info for the font family and size under 'body' and 'poition', 'padding', 'overflow' etc under 'DIV#content' but I can find nothing for the background colour which is white.

 

I know what every image link and colour reference in my stylesheet do (from trial and error) and none of them control the background colour in this particular box.

 

 

If an area was not asigned a colour or image would it be white by default? Is it possible that there simply is no command controlling the background colour of this particular area in my stylesheet? I looked at the default OSCommerce stylesheet and noticed quite a lot more code than is in the CSS for the template I'm using?

 

(I'm sorry if that's a really stupid question, I'm new to all this.)

 

I sent you the URL by private message. If there's any way you could have a quick look when you have a moment and see if you can find the code that controls the background colour for big white box that runs down the middle of the page, I would be eternally grateful. I think that somewhere is a #FFFFFF, that I want to change to #000000, (or a little white image file somewhere) I just can't find them.

 

Please understand, it's not laziness on my part, I spent hours trying to find the solution online before making a post on this forum and I tried to use your advice about using 'developer tools' I'm just well and truly lost.

 

Thanks again for taking the time to respond.

 

My absolute best wishes,

 

Tom

Share this post


Link to post
Share on other sites

Hi Bill,

 

Thanks so much for responding, I really, really appreciate it as I'm desperate for help. I just tried using 'developer tools' in IE8. When I use 'find' and then 'select element by click' and select the relevant section of the site I find the CSS info for the font family and size under 'body' and 'poition', 'padding', 'overflow' etc under 'DIV#content' but I can find nothing for the background colour which is white.

 

I know what every image link and colour reference in my stylesheet do (from trial and error) and none of them control the background colour in this particular box.

 

 

If an area was not asigned a colour or image would it be white by default? Is it possible that there simply is no command controlling the background colour of this particular area in my stylesheet? I looked at the default OSCommerce stylesheet and noticed quite a lot more code than is in the CSS for the template I'm using?

 

(I'm sorry if that's a really stupid question, I'm new to all this.)

 

I sent you the URL by private message. If there's any way you could have a quick look when you have a moment and see if you can find the code that controls the background colour for big white box that runs down the middle of the page, I would be eternally grateful. I think that somewhere is a #FFFFFF, that I want to change to #000000, (or a little white image file somewhere) I just can't find them.

 

Please understand, it's not laziness on my part, I spent hours trying to find the solution online before making a post on this forum and I tried to use your advice about using 'developer tools' I'm just well and truly lost.

 

Thanks again for taking the time to respond.

 

My absolute best wishes,

 

Tom

 

Add a background color to div id="content-wrapper" which is within your template stylesheet.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

Thanks very much Bill, that's got it. I am trying to use WinMerge a lot to try to fathom what the heck is going on, but I'm painfully aware that this is only my second shop (first not quite finished) and this is my introduction to php, so I'm taking big bites. Even the forum's pretty daunting at this stage, so thanks for your :thumbsup: :blush: stuff. If I start to get any kind of profit at the end of this learning curve, rest assured it's in my ethics to feel begrudgingly obliged to stump up.

 

 

I might be back with more stupid questions, can you tell? :-" I'm trying hard to hammer stuff out for myself, really I am. Now enough chit chat, I'm off to figure out how to actually use the thing.

.

Hello, I have a similar error, but I can not figure where is the mistake. Please tell me where was yours?

Thanks

Share this post


Link to post
Share on other sites

Hello i am a complete novice with OSCommerce, i have come across various problems utilising this system, the main of which is trying to change the layout within an STS template for the product information page. I have also just recently installed the facebox module to create lightbox effect for the images. Although i have came across a problem where, when i use STS templates for product information it doesn't display the facebox images. I have tried to use various types of placeholders for the content, but unfortunately it doesn't execute the javascript code required for the facebox addon.

 

 

Can anyone shine any light on my issue?

 

thanks in advance.

 

Ashley

Share this post


Link to post
Share on other sites

Hi Bill,

 

You sir, are a glorious, glorious man and I will write songs in your honour!!

 

Seriously, I know stuff like this is probably fairly basic but I can't tell you how happy you just made me!! I would hug you right now if I could.

 

Thanks again, I really, really appreciate your time and your effort.

 

My absolute best wishes,

 

Tom

 

Add a background color to div id="content-wrapper" which is within your template stylesheet.

Share this post


Link to post
Share on other sites

Dear All,

 

I have the exakt problem as ku163 and it drives me crazy. I can't find what's wrong. Could you please help me and ku163?

 

As he writes below...

templatesname/boxes/infobox.php.html - works fine

templatesname/boxes/infobox_new_products.php.html - doesn't work

templatesname/boxes/infobox_new_products_header.php.html - works fine

 

Thanks,

Johan

 

I had read the post ,I know such as "also purchased" or "New for products for..." can also have their own template.Just like the other infobox .

 

But there are still some problem for me.

I had create :

templatesname/boxes/infobox.php.html

templatesname/boxes/infobox_new_products.php.html

templatesname/boxes/infobox_new_products_header.php.html

 

the infobox.php.html is work well for all column left/right infobox.

the infobox_new_products_header.php.html also work well for the "New Products For September"

but the infobox_new_products.php.html not work,it's means not work for the box content.

 

my infobox_new_products.php.html :

 

<table width="100%" border="3" cellspacing="0" cellpadding="0" bgcolor="#FF0000">

<tr>

<td bgcolor="#FF0000" >$content</td>

</tr>

</table>


Specialization is for insects...

Share this post


Link to post
Share on other sites

I need help with info box templates. I've switched to the multiple template file and turned on "Use templates for infoboxes". I've also edited the infobox.php.html file to something closer to what I want. Problem is that the header of each info box is retaining that light blue color. I can't get rid of it, and I don't know where it's pulling from. I've been searching for days for an answer, but 296 pages is a lot of reading and I'm not really sure how to effectively search threads in this type of forum.

 

I feel confident that if I could get rid of that blue background I could manipulate the rest to be what I want it to be. If you could point out anything else relevant to box design, I would appreciate that too.

 

My store is located at: http://www.automotivestep.com/store/index.php

 

Things will keep changing as I'm trying to figure this out. Also, please don't judge, I am painfully new to website design and everything else involved.

 

Thanks for any help,

Tim.

Share this post


Link to post
Share on other sites

Tim,

 

You should find that information in the infoBoxHeading section of stylesheet.css in your store folder.

 

Rgds,

Johan


Specialization is for insects...

Share this post


Link to post
Share on other sites

Tim,

 

You should find that information in the infoBoxHeading section of stylesheet.css in your store folder.

 

Rgds,

Johan

 

 

Thank you. I appreciate the help.

Share this post


Link to post
Share on other sites

Hi All,

 

I've just noticed a strange problem. I'm still in the early stages of modifying my site and I noticed that some of the pages don't display any image files (just empty boxes with little red crosses in the top left corner) It's only on some pages on most pages the images display fine.

 

Does anyone know why this might be the case?

 

My site is at www.obtds.co.uk if you click on one of the product images on the homepage you can see what I mean.

 

Any help would be hugely appreciated.

 

Best Wishes,

 

Tom

 

P.S. I don't know if this problem has anything to do with STS but in a previous post on the board, as soon as I mentioned I had STS installed I was told I should be posting in this thread.

Share this post


Link to post
Share on other sites

Hi All,

 

I've just noticed a strange problem. I'm still in the early stages of modifying my site and I noticed that some of the pages don't display any image files (just empty boxes with little red crosses in the top left corner) It's only on some pages on most pages the images display fine.

 

Does anyone know why this might be the case?

 

My site is at www.obtds.co.uk if you click on one of the product images on the homepage you can see what I mean.

 

Any help would be hugely appreciated.

 

Best Wishes,

 

Tom

 

P.S. I don't know if this problem has anything to do with STS but in a previous post on the board, as soon as I mentioned I had STS installed I was told I should be posting in this thread.

 

No, this is not related to STS. What I see is that you are missing category images (top right on product listing). You need to set images for this categories via admin->catalog, select a category, the press "edit"

 

If you are missing any other images, please be more specific

Share this post


Link to post
Share on other sites

Hi guys, I must be doing something wrong. I am installing STS v4.6 on a RC2.2a shop (fresh install) I am following all of the instructions in the Install.html file, however, when I complete the last file and go to look for the module it blanks out the admin panel, and sometimes the store. Can you asist me please?

Share this post


Link to post
Share on other sites

Hi guys, I must be doing something wrong. I am installing STS v4.6 on a RC2.2a shop (fresh install) I am following all of the instructions in the Install.html file, however, when I complete the last file and go to look for the module it blanks out the admin panel, and sometimes the store. Can you asist me please?

 

NVM got it to take, now on to theming!

Share this post


Link to post
Share on other sites

After taking over a site from someone else, I've been able to clean up stuff and add new features by mimicking what's already there.

 

Now, I think I need a deeper understanding of STS to get the next step done.

 

The site is STS4.5.8.

 

I want to install Article Manager 1.5.7_5

 

I can see exactly what I need to do to add the Article Manager Author's Box in a column on the Homepage, Category and Subcategory pages, etc. - But, those are pages for which STS templates already exist.

 

I want to display the Article Manager articles on their own pages, rendered with an STS template created for that purpose.

 

I found the code below in this forum. From it, I gather that binding STS to Application Manager is done here.

 

What I don't understand is what I name the STS template for the Article Manager article pages and in which STS directory I place this template so it will be used.

 

You need to add the following in the includes/modules/sts_inc/sts_column_left.php:

// ARTICLE Manager

 if (AUTHOR_BOX_DISPLAY == 'true'){

       require(DIR_WS_BOXES . 'authors.php');

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

 }else{

$sts->template['authorskbox']='';

 }



 if (ARTICLE_BOX_DISPLAY == 'true'){

       require(DIR_WS_BOXES . 'articles.php');

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

 }else{

$sts->template['articlesbox']='';

 }

 

Now use $articlesbox$ and $authorskbox$ in your template where you want them.

Share this post


Link to post
Share on other sites

Hi this is my shop: Pink Heaven Gift Ideas

Name: Guest

Password: pwd2109

 

So I'm using STS4.6 and OptionTypesV2.1.3_1. I've managed to do pretty much everything on my own after reading ALOT on these forums but I've hit a problem. I've created an option for some products so that the buyer can upload a photo to be used on the chocolate bar wrapper. I keep getting an error when trying to upload the photo. For example, goto Categories->Holidays->Easter->Easter Egg and Photo and select a file and add to cart. This is the error I get:

 

Fatal error: Call to a member function image() on a non-object in catalog/includes/functions/html_output.php on line 78

 

So this is the code on line 78 in the html_output.php file:

 

// START STS v4.4:

global $sts;

$sts->image($src); // Take image from template folder if exists.

// END STS v4.4

 

 

 

So I guess its something to do with STS? I have had the error appear at other times but not consistently. Any help appreciated!

 

EDIT: I am not using a product_info.php.html template

Edited by lezperez

Share this post


Link to post
Share on other sites

 

So I'm using STS4.6 and OptionTypesV2.1.3_1.

[...]

 

Fatal error: Call to a member function image() on a non-object in catalog/includes/functions/html_output.php on line 78

 

So this is the code on line 78 in the html_output.php file:

 

// START STS v4.4:

global $sts;

$sts->image($src); // Take image from template folder if exists.

// END STS v4.4

 

In real this is not related to STS it self, but to changes done to includes/application_top.php because of option types V2 addon

 

Option types require to move this

// initialize the message stack for output messages
 require(DIR_WS_CLASSES . 'message_stack.php');
 $messageStack = new messageStack; 

some lines higher than it's original position

 

So the STS addition

  // START STS 4.5.8
 require (DIR_WS_CLASSES.'sts.php');
 $sts= new sts();
 $sts->start_capture();
 // END STS 4.5.8

comes after that, and exactly this is causing the error

 

Make sure you have the STS code in your application_top.php and that you place it just before the message stack code.

 

This should solve the issue

Share this post


Link to post
Share on other sites

Hi All,

 

I'm not sure if this is the right section for this (I have sts installed, but I'm not sure if it's relevant?) but was just wondering whether it's possible to align the arrows at the top of the infoboxes so that they are exactly aligned within the columns? (i.e. all the way to the right, so that they are ligned up vertically?)

 

Would really appreciate any advice.

 

Many thanks in advance and my very best wishes,

 

Tom

 

P.S. I also asked a question in the 'dynamenu' thread as I'm really struggling to get the flyout menu working with STS (Despite trying my hardest to follow all instructions and reading the entire forum thread. I'm doing something wrong. I just don't know what.)

Share this post


Link to post
Share on other sites

Hy, I have this problem adding a new variable in STS, please take a look Here to see what is it about. Sorry because I posted it out of this topic; I was guided by the thought that new questions should be addressed inside a forum, rather than inside a topic. I hope is ok if I didn't rewritten the question, just added a link to my original post.

multimixer said that it was already answered to that... so please give me a link to that answer, because I could not find it.

 

Thanks again.

Share this post


Link to post
Share on other sites

Hy, I have this problem adding a new variable in STS, please take a look Here to see what is it about. Sorry because I posted it out of this topic; I was guided by the thought that new questions should be addressed inside a forum, rather than inside a topic. I hope is ok if I didn't rewritten the question, just added a link to my original post.

multimixer said that it was already answered to that... so please give me a link to that answer, because I could not find it.

 

Thanks again.

Hy, I know that I can add $loginlogofflogo which will show me a different image for login/logoff situations, I also have other options, like $myaccountlogoff, but what I want is to have a Log In or Log Off text link. So, What I've done was to add a new variable in

 

catalog\includes\modules\sts_inc\general.php

$sts->template['login'] = '<a href=' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . ' class="headerNavigation">' . HEADER_TITLE_LOGIN . '</a>';

 

then in this part I added my stuff:

if (tep_session_is_registered('customer_id')) {
.
.
$sts->template['loginoff'] = $sts->template['logoff'];
.
.
}else{
.
.
$sts->template['loginoff'] = $sts->template['login'];
.
.
}

 

But, the Login part doesn't work :(. I have Log Off, but after logging off, there is nothing, I have no Log In text.

Is there something more to be done? I missed (or messed) something?

 

Thanks a lot.

 

I would do it that way

   if (tep_session_is_registered('customer_id')) {
     $sts->template['logoff'] = '<a href=' . tep_href_link(FILENAME_LOGOFF, '', 'SSL')  . ' class="headerNavigation">' . HEADER_TITLE_LOGOFF . '</a>';
     $sts->template['login'] = '';
   } else {
     $sts->template['login'] = '<a href=' . tep_href_link(FILENAME_LOGIN, '', 'SSL')  . ' class="headerNavigation">' . HEADER_TITLE_LOGIN . '</a>';
     $sts->template['logoff'] = '';
   }

 

and then use $login$$logoff$ in my template wherever I like

Edited by multimixer

Share this post


Link to post
Share on other sites

Bit of help needed, have installed this contribution and everything works fine with the catalog until you go to the checkout.

 

It sends you to the correct SSL directory but all of the image links etc, which are pointed TO BY $templatedir also include the base directory.

 

e.g catalog is https://www.xx.com/shop

 

all the links are then linked /shop/includes/sts_template

 

hope i explained that well

Share this post


Link to post
Share on other sites

I would do it that way

   if (tep_session_is_registered('customer_id')) {
     $sts->template['logoff'] = '<a href=' . tep_href_link(FILENAME_LOGOFF, '', 'SSL')  . ' class="headerNavigation">' . HEADER_TITLE_LOGOFF . '</a>';
     $sts->template['login'] = '';
   } else {
     $sts->template['login'] = '<a href=' . tep_href_link(FILENAME_LOGIN, '', 'SSL')  . ' class="headerNavigation">' . HEADER_TITLE_LOGIN . '</a>';
     $sts->template['logoff'] = '';
   }

 

and then use $login$$logoff$ in my template wherever I like

Thanks, in this way it worked. I can't understand why it didn't in my way :(

Share this post


Link to post
Share on other sites

Thanks, in this way it worked. I can't understand why it didn't in my way :(

 

There are various ways to do this ie instead of having 2 different tags $logind and $logoff, you can have the same

ie $mytag, but with a different content on each if/else side,

 

if this {

$mytag=a

} else {

$mytag=b

}

 

or you say

 

$tag1=a

$tag2=b

 

and then

 

if this {

$mytag=tag1

} else {

$mytag=tag2

}

 

then you place $mytag in the template and it will display according to the situation, a or b

Share this post


Link to post
Share on other sites

There are various ways to do this ie instead of having 2 different tags $logind and $logoff, you can have the same

ie $mytag, but with a different content on each if/else side,

 

if this {

$mytag=a

} else {

$mytag=b

}

 

or you say

 

$tag1=a

$tag2=b

 

and then

 

if this {

$mytag=tag1

} else {

$mytag=tag2

}

 

then you place $mytag in the template and it will display according to the situation, a or b

This is how I tried at the first time.

My variable was called 'loginoff'.

// 'logoff' was already declared by default in STS
$sts->template['login'] = '<a href=' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . ' class="headerNavigation">' . HEADER_TITLE_LOGIN . '</a>';

//after this, was that if

if (tep_session_is_registered('customer_id')) {
   $sts->template['loginoff'] = $sts->template['logoff'];
}else{
   $sts->template['loginoff'] = $sts->template['login'];  //here nothing happened.
}

This was my first approach and now is done using a single variable, but after }else{, instead of using

$sts->template['loginoff'] = $sts->template['login'];

i used your suggestion: direct link:

$sts->template['loginoff'] = '<a href=' . tep_href_link(FILENAME_LOGIN, '', 'SSL')  . ' class="headerNavigation">' . HEADER_TITLE_LOGIN . '</a>';

And it worked. This tells me that the declaration of 'login' variable at first had some flaws.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×