Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Thanks for the responce.

The STS error is on one page becuse I intentionaly deleted the sts_template file to show that the image apears when the page reverts back to the OScommerce design. If you look at the second link that I sent there is no STS error message but the images do not show. This is the page that I am having the problem with.

http://www.crikeyspies.com/oscommerce/prod.../products_id/31

Share this post


Link to post
Share on other sites

Hi everyone.

 

I've searched around and found similar problems but none of the solutions seem to help...

 

not even sure if this is an STS problem or not...

 

I am using the product info templates. I am also usign master products for some of these. I have just tried to create a product that uses the standard options/product attributes drop down list. The list appears fine... if I don't have the products quantity there the product won't add at all.. and if I do, the product will add but without the options.. any ideas how to get it to add to cart with the product attributes?

 

Thanks

Share this post


Link to post
Share on other sites
ok that link is broken for some reason. Here is the right link

http://www.crikeyspies.com/oscommerce/prod.../products_id/31

 

I noticed from the two links that you provided that the images were pointing to different image folders.

 

This appears to be a link problem. Are you using a WYSIWYG editor such as Dreamweaver or FrontPage? These programs must have a "/" in front of the link (absolute) so that you can preview them in their design window. The problem here is that you should not use absolute links because it will bring up security errors in your browser and drive away customers.

 

Check your image links and that should take care of your problem.


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
I noticed from the two links that you provided that the images were pointing to different image folders.

 

This appears to be a link problem. Are you using a WYSIWYG editor such as Dreamweaver or FrontPage? These programs must have a "/" in front of the link (absolute) so that you can preview them in their design window. The problem here is that you should not use absolute links because it will bring up security errors in your browser and drive away customers.

 

Check your image links and that should take care of your problem.

 

Thanks Bill

The two links are pointing to two different image folders because in order to show the differences on the same page I had to duplicate the ocscommerce shopping cart. This way you can see essentially the exact same page twice. One with STS and one without STS. The STS template is using the $content tag only. Therefore it is drawing the image from oscommerce.

 

So my question is what file of the STS contribution should I look at that controls the display of the product_info.php page when the only STS template that I am using is the sts_template.html If I look at that file maybe I can figure it out.

Daniel

 

P.S.

Since you brought up the absolute links I will bring that problem up in another thread.

Share this post


Link to post
Share on other sites
This appears to be a link problem. Are you using a WYSIWYG editor such as Dreamweaver or FrontPage? These programs must have a "/" in front of the link (absolute) so that you can preview them in their design window. The problem here is that you should not use absolute links because it will bring up security errors in your browser and drive away customers.

 

Check your image links and that should take care of your problem.

Bill,

I hope I am explaining this correctly. This is a separate issue, I believe, because my other issue only happens on the product_info.php page while this happens on all secure pages.

I am using a shared SSL on a shared server. So in my configure.php my domain is

www.crikeyspies.com

The SSL domain is

https://secure13.shareddomain.com/crikeyspies/

(The ?shareddomain? is replaced with the real domain name.)

 

This works with oscommerce because oscommerce always adds the /crikeyspies/ after the https://secure13.shareddomain.com. However, STS does not add the /crikeyspies/ after the https://secure13.sharedomain.com. Therefore, when in the secure section none of the images show and the page can?t find the css or links because it dropped the /crikeyspies/ directory.

The proper url is

https://secure13.shareddomain.com/crikeyspies/oscommerce/....

 

But STS brings up this for images and links:

 

https://secure13.shareddomain.com/oscommerce/....

 

As you can see the /crikeyspies/ is dropped. My guess is STS stops at the .com

 

So as a work around I had to use absolute links with the https://secure13.shareddomain.com/crikeyspies/

 

This way the template pulls up the images and link in both the secure and unsecure sections. I hope I explained this correctly.

How do I get STS to recognize a shared domain and use relative links?

Thanks so much for your time and help.

Daniel

Edited by spwd01

Share this post


Link to post
Share on other sites

Hi,

 

You should create your template with only relative links. The base URL should be given in the html header, via the $headcontent variable. This variable must be in html header (must be inside html comment, check the doc for the correct syntax, otherwise it'll not be replaced).

 

There is no way to tell STS how to build links, it's done by html, osCommerce functions and the browser.

 

- Rigadin


STS v4.5 SP5 is out, and check the STS Power Pack contribution too!

New thumbnailer using phpThumb: oscThumb. Works great.

Share this post


Link to post
Share on other sites
Hi,

 

You should create your template with only relative links. The base URL should be given in the html header, via the $headcontent variable. This variable must be in html header (must be inside html comment, check the doc for the correct syntax, otherwise it'll not be replaced).

 

There is no way to tell STS how to build links, it's done by html, osCommerce functions and the browser.

 

- Rigadin

 

Rigadin,

Thanks for the reply.

I did read about that but I forgot to add the $headcontent variable to my STS_template. I feel dumb. So now the relative links are working in the secure sections. It also helped cure my other issue. I still don't know why the other issue only applied to the product_info.php and not the other files. Thank you and Bill for your help.

 

The only thing I haven't figured out was how to link a CSS using the <!--$extracss-->

 

The documentation says:

Quote---------------------------------------------------------------------------------------

"Optional. Allows placing a link to a stylesheet dynamically. Will be replaced by the content of $sts->template['extracss']. The whole html line must be placed in, like <link rel="stylesheet" type="text/css" href="stylesheet.css">

 

You must use this commented format of $extracss to keep the word "$extracss" from displaying in your web authoring software and be replaced by the correct value."

End Quote___________________________________________________________

 

What is the:

$sts->template['extracss']

 

The whole html line( <link rel="stylesheet" type="text/css" href="stylesheet.css"> )

must be placed in to what?

 

I am assuming I need to create a file to add the line to but what do I name that file and how do I tell $extracss where to find that file?

 

Thank so much for your help. I hope this isn?t another duh situation.

Daniel

Share this post


Link to post
Share on other sites
Hi everyone.

 

I've searched around and found similar problems but none of the solutions seem to help...

 

not even sure if this is an STS problem or not...

 

I am using the product info templates. I am also usign master products for some of these. I have just tried to create a product that uses the standard options/product attributes drop down list. The list appears fine... if I don't have the products quantity there the product won't add at all.. and if I do, the product will add but without the options.. any ideas how to get it to add to cart with the product attributes?

 

Thanks

 

any pointers in the right direction?

 

thanks

Share this post


Link to post
Share on other sites
any pointers in the right direction?

 

thanks

I would start by asking this in the Master Products forum as it appears to be a problem with that particular contribution. Have you tested to be sure you have completely installed Master Products contribution?

 

I know it's thin but I hope this was of some help to you.


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
I would start by asking this in the Master Products forum as it appears to be a problem with that particular contribution. Have you tested to be sure you have completely installed Master Products contribution?

 

I know it's thin but I hope this was of some help to you.

 

Thanks Bill.. I think i might just continue to use master products for my attributes for now but will ask in that forum as well. Thanks again.

Share this post


Link to post
Share on other sites
What is the:

$sts->template['extracss']

 

The whole html line( <link rel="stylesheet" type="text/css" href="stylesheet.css"> )

must be placed in to what?

 

I am assuming I need to create a file to add the line to but what do I name that file and how do I tell $extracss where to find that file?

 

Thank so much for your help. I hope this isn't another duh situation.

Daniel

Daniel, you would only use this line of code if you wanted to use a different stylesheet other than the one located in the catalog folder (yourstore/stylesheet.css). If you just want to use the default stylesheet from osCommerce, you would only need the following code in the head section of your HTML template:

 

<!--$headcontent--> 

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

You can see what is required in each template page that you create by using the "sts_blank_template.html" as an example to follow. :thumbsup:

 

Hope this helped.

Edited by bkellum

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
<link rel="stylesheet" type="text/css" href="stylesheet.css">[/code] You can see what is required in each template page that you create by using the "sts_blank_template.html" as an example to follow. :thumbsup:

 

Hope this helped.

 

Bill,

Thanks you have been helpful. I am sorry I didn't look at the blank template recently. I did when I started and forgot to double check when I changed things. After looking at the sts_blank_template.html it makes sense again. The template uses css like a normal html page.

 

I am using a different css as well as the oscommerce css to control the page. I understand how to point html to the css. So what is this :

 

$sts->template['extracss']

 

and how do I use that to control a second css for the page?

 

Do I need to use that or can I just point the css by using normal html? Sorry if I am being a pain.

Daniel

Share this post


Link to post
Share on other sites

In most cases the extracss tag is not needed, just put the link to your stylesheet in the header.

If you have for example another stylesheet for your infoboxes, you can add it to the extracss like this:

 

$sts->template['extracss'] .= '<link rel="stylesheet" type="text/css" href="boxestylesheet.css">';

and place <!--$extracss--> in your header.

 

As you can place php code into your templates, you can place something in extracss dynamically, for example according to user's language or month of the year or whatever you are able to code.

 

- Rigadin


STS v4.5 SP5 is out, and check the STS Power Pack contribution too!

New thumbnailer using phpThumb: oscThumb. Works great.

Share this post


Link to post
Share on other sites

Hi guys I am having an odd problem I am using the old STS and had moved my site form one server to another and all of the sudden now the template system does not seem to be working. the admin section is there however when you go to the catalog portion of the site that STS controls it is just a blank page. I looked at the view source and for some reason with this new company STS will not work. I therefore decided to upgrade to this newer version which is really great. Anyways no change its still doing the same thing. If any one can help point me in the right direction. I am lost here I have 4 sites using STS and all work. For some reason when I moved the site it will not work on this new hosting companies server. They are running the same set up as far as I can tell. If you want ot take a look you can see the site on a temporary url http://lucky8s.spirit-international.net/ and the actual site is still up on the old host I don?t want to move it until I have solved this. http://www.lucky8s.net/ Please keep me from banging my head against the wall here.

 

Any help would be really appreciated.

 

Thanks,

Share this post


Link to post
Share on other sites

Hi,

 

I have installed sts and it works fantastic! Great contribution.

 

I would now like to use the header tags controller contribution to auto update my title, keywords and description tags for each page.

 

I noticed there were some instructions in the sts contribution to use the header tags contrib if already installed.

 

If I want to install it now do I go ahead and install the header tags contribution and then update the database with the sql files from the sts contribution?

 

I just want to be a bit cautious with this step as everything is working perfectly and I don't want anything to stuff up.

 

Any help would be appreciated.

 

Cheers,

 

Grant B)

Share this post


Link to post
Share on other sites
Hi guys I am having an odd problem I am using the old STS and had moved my site form one server to another and all of the sudden now the template system does not seem to be working. the admin section is there however when you go to the catalog portion of the site that STS controls it is just a blank page. I looked at the view source and for some reason with this new company STS will not work. I therefore decided to upgrade to this newer version which is really great. Anyways no change its still doing the same thing. If any one can help point me in the right direction. I am lost here I have 4 sites using STS and all work. For some reason when I moved the site it will not work on this new hosting companies server. They are running the same set up as far as I can tell. If you want ot take a look you can see the site on a temporary url http://lucky8s.spirit-international.net/ and the actual site is still up on the old host I don't want to move it until I have solved this. http://www.lucky8s.net/ Please keep me from banging my head against the wall here.

 

Any help would be really appreciated.

 

Thanks,

Turn GZIP to False or at least change the value.

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

 

I have installed sts and it works fantastic! Great contribution.

 

I would now like to use the header tags controller contribution to auto update my title, keywords and description tags for each page.

 

I noticed there were some instructions in the sts contribution to use the header tags contrib if already installed.

 

If I want to install it now do I go ahead and install the header tags contribution and then update the database with the sql files from the sts contribution?

 

I just want to be a bit cautious with this step as everything is working perfectly and I don't want anything to stuff up.

 

Any help would be appreciated.

 

Cheers,

 

Grant B)

Grant,

 

The easy way would be to download STS4.2 with HTC 2.5.9 from the STS contribution page. Then use a file comparison tool to find out what changes you need to make to your current files compared to the ones in this combined contribution.

Edited by bkellum

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

To use contribution #4549 you'll need to make some changes in includes/modules/sts_inc/product_info.php.

In general, the changes that a contribution makes in catalog/product_info.php must be done in this file when using content templates.

 

- Rigadin


STS v4.5 SP5 is out, and check the STS Power Pack contribution too!

New thumbnailer using phpThumb: oscThumb. Works great.

Share this post


Link to post
Share on other sites

Has anybody found a solution to the problem where it will not select true or change the folder name?

 

I have tried a re-install and deleting everything and re uploading but nothing at all!

 

It all installs fine and will work when I go into debug mode but it just doesnt allow me to select "true"

 

Is there a way I can set it in the code?

Share this post


Link to post
Share on other sites

Could anyone tell me how difficult it would be to create a placeholder for a contrib? I would like to use FAQDesk on a site with STS. FAQDesk creates it's own infobox.

 

Any help would be appreciated!

Share this post


Link to post
Share on other sites
Has anybody found a solution to the problem where it will not select true or change the folder name?

 

I have tried a re-install and deleting everything and re uploading but nothing at all!

 

It all installs fine and will work when I go into debug mode but it just doesnt allow me to select "true"

 

Is there a way I can set it in the code?

Are you using the latest osc release 060817? It appears this is a general problem with the compatibility.php file in the 060817 update.

Here is a work around: Add the following code

reset($ar);

at the end of the do_magic_quotes_gpc routine.

 

It will end up looking like this:

function do_magic_quotes_gpc(&$ar) {
if (!is_array($ar)) return false;
while (list($key, $value) = each($ar)) {
if (is_array($ar[$key])) {
do_magic_quotes_gpc($ar[$key]);
} else {
$ar[$key] = addslashes($value);
}
}
reset($ar);
}

 

This is not an STS issue, but rather a bug in the latest osc update.


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 to everyone who has contributed to STS. It's a fantastic contrib! And, has made my site look 1000Xs better. I have a problem with tabs though.

 

I tried to include the Nav Bar with On/Off tabs contrib but couldn't figure out how to get it to display using STS. . . So, then I tried to incorporate similar code from my Wordpress Blog so that the header would be the same across osC and Wordpress.

 

For the heck of it, I just copy/pasted the corresponding code from wordpress to my STS template file and osC stylesheet.

 

To my surprise, it actually works in Internet Explorer but does not work in Firefox. Obviously, IE can interpret my poor code, but it's not quite "right" because Firefox doesn't show it.

 

The problem is undoubtedly due to Wordpress' use of divs rather than tables, and my lack of expertise with divs, as well.

 

Here is the relevant code I added to STS template (just what begins and end with divs):

 

<table cellpadding="10" width="100%">
		 <tr>
		 		 <td align="center"><br />				 	

				  <div id="navigation">
						 	<ul>
									<li><a href="http://www.vineswine.com/index.php" title="VINES WINE SHOP">HOME</a></li>
									<li class="current_page_item"><a href="http://vineswine.com/blog/" title="VINES WINE BLOG">BLOG</a></li>
									<li class="page_item"><a href="http://vineswine.com/blog/about/" title="ABOUT">ABOUT</a></li>
							</ul>
					</div><!-- end id:navigation -->					

<table border="0" width="960" cellspacing="0" cellpadding="3">
<tr class="header">
			<td align="left"><br><a href="http://www.vineswine.com"><img src="http://www.vineswine.com/images/vineswine-temp.jpg" border="0" alt="VinesWine.com"></a><br></td>
			<td align="right"><?php echo tep_draw_form('search', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get') . tep_draw_hidden_field('search_in_description','1') . tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH+10) . 'px"') . ' ' . tep_draw_pull_down_menu('categories_id', tep_get_categories(array(array('id' => '', 'text' => BOX_ALL_CATEGORIES)))) . ' ' . tep_hide_session_id() . '<input type="submit" name="Submit" value="Search">' . '</form>'; ?></td>
</tr>

 

And, here is the relevant CSS added to the osC stylesheet:

 

#navigation {
background: transparent; 
margin: 20px auto 0px; 
overflow: hidden; 
width: 940px; 
position: relative; 
text-align: left;
font-family: Tahoma, Verdana, Arial, Serif;
}
html #navigation {
height: 1%;
}
#navigation ul li {
float: left; 
margin: 0px 5px 0px 0px; 
list-style-type: none;
}
#navigation ul li a {
border: #ddd 1px solid; 
border-bottom:none;
padding: 0 10px 2px 10px; 
display: block; 
background: #ededed; 
text-decoration: none;
}
#navigation ul li a:hover {
background: #fafafa;
}
#navigation ul li a:active {
background: #fafafa;
}
#navigation ul li.current_page_item a {
background: #fff;
color: #333;	
border: #ccc 1px solid; 
border-bottom:none;
}
#navigation ul li.search {
font-size: 0.9em; 
right: 0px; 
position: absolute; 
top: 0px;
}
#navigation ul li.search input#s {
border: #999 1px solid; 
font-size: 0.9em; 	
width: 100px; 
padding: 2px; 	
background:#fff;
}
#navigation ul li.search input#searchsubmit {
border: #999 1px solid; 
font-size: 0.9em; 
background: #e6e6e6; 
margin: 0px 0px 0px 2px; 
color: #265e15; 
padding: 2px; 	
}

 

I hope someone can help me out. Is what I'm doing even possible in Firefox or generally? If so, it must be something simple. I very much will appreciate any advice.

 

You can see what I'm talking about at the link below. Check it in IE and then in FF and you'll see the difference:

 

http://vineswine.com/index.php

 

 

Thanks!

Edited by Vines

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

Share this post


Link to post
Share on other sites

You are my HERO!

Now I can abandon my short-lived traumatic experiment with Zen Cart :thumbsup:

 

 

Anouncing:

tableless_CSS version 2 is an entirely revised upgrade to the previous version of tablessless_CSS intended to work with any version of STS . It is a two column CSS layout which can be modified to three columns. Install instructions for STS V 4.1 and higher: takes 5 minutes.

 

see a demo at http://www.outprize.com/index.php?sts_template=tableless_CSS

 

Get it here tableless_CSS

 

enjoy

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

×