Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Sorry this was originally posted in templates and images can a mod delete the orignal please.

STS - HTC php pages in red under text control

 

Hi Bill

I am still trying to get my head around the google dup content issues on our site and want to drill down the HTC side of things. What I have noticed and to be honest never really picked up on it, is that all my php pages like index, reviews, whats new are all in red instead of black text in text control. The only page on the text control admin in black is my default title entry, description and key words. However index shows in red but the tags are populated OK, this is the only red page that will properley populate the header tags.

 

I installed your complete package with htc rather than hack it. Have I missed something out.

 

Brian,

 

Don't worry about the pages listed in RED. This is normal for STS users and actually means that you did not insert the HTC code in those pages (which is what you want, otherwise it will not work with STS). The author omitted these errors in his latest version of HTC .


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

Hello, I got a simple question. I've been using the "$myaccount" and "$myaccountlogoff" tags and it works good but when the user is logged in, it doesn't switches to "log off" (it's still "my account").

 

 

Is it possible to make a customer links like these:

 

1. Log in (when not logged in) / Log off (when logged in).

2. My account (when not logged in redirects to login page, when logged in redirects to my account page).

3. Create an account (disappers when logged in).

 

Please help.

 

Cheers,

Soulfain.

Share this post


Link to post
Share on other sites
Hello, I got a simple question. I've been using the "$myaccount" and "$myaccountlogoff" tags and it works good but when the user is logged in, it doesn't switches to "log off" (it's still "my account").

 

 

Is it possible to make a customer links like these:

 

1. Log in (when not logged in) / Log off (when logged in).

2. My account (when not logged in redirects to login page, when logged in redirects to my account page).

3. Create an account (disappers when logged in).

 

Please help.

 

Cheers,

Soulfain.

 

The STS User Manual gives a brief describtion of each tag that comes with STS.

 

$myaccountlogoff

 

If the customer is logged in: text link to the My Account page followed by a separator and then by a text link to the logoff page. Same as $myaccount | $logoff

If customer is not logged in: same as $myaccount.

Use SSL if available.

Created in: includes/modules/sts_inc/general.php

Possible use: text link in header.

See also: $myaccount , $logoff .


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, it was helpful. Another problem is how to style these file previews on the homepage?

 

24322665fe6.jpg

 

Can it be as simple as editing the template files in STS or I have to deep inside the PHP files?

Share this post


Link to post
Share on other sites
Thanks, it was helpful. Another problem is how to style these file previews on the homepage?

 

Can it be as simple as editing the template files in STS or I have to deep inside the PHP files?

 

You can do this with STS in one of two ways:

 

  1. Create a home page template named index.php_0.html and add a static image of the product and then link to it.
  2. Install the Individual Boxes for Products in Central Module add-on.
    http://www.oscommerce.com/community/contributions,4491


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
for a new site I am designing using STS, I want to move the page heading into the blue line above. So in this example, move "Specials This Month" into the blue line above and delete the corny image all together.

 

How can I go about this?

 

As well, how can I remove the border on the categories box on the left?

 

Thanks,

Dale

 

rockthewatch.gif

 

 

I hope everyone is having a great holiday. Does anyone know how I can move the line "Specials This Month" into the blue line I made above?

 

Thanks,

Dale

Share this post


Link to post
Share on other sites
I hope everyone is having a great holiday. Does anyone know how I can move the line "Specials This Month" into the blue line I made above?

 

Thanks,

Dale

 

Dale,

 

1. Remove the blue box and then add a blue box/border to the CSS class "pageTitle" in your stylesheet. If you only want the blue box for the specials title but leave all of the other page titles untouched, create a new CSS class in your stylesheet and edit the name of the CSS class in specials.php to reflect the new class name.

 

For example:

Find:

			<td class="pageTitle" id="pageTitle"><h1><?php echo HEADING_TITLE; ?></h1></td>

Change it to something else such as:

		   <td class="pageTitleSpecials" id="pageTitle"><h1><?php echo HEADING_TITLE; ?></h1></td>

 

 

2. Remove the image call in specials.php:

 

Find:

			<td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>

Comment out the echo statement:

			<td class="pageHeading" align="right"><?php // echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td>


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 was asked to post my comment here thanks in advance for the help! :)

 

i have created a html layout and sucessfully installed STS. in adobe photoshop i created a layout for my website, and then imported it into dreamweaver. I centered the image for the website and added a new layer (To add the website content such as $cart etc). when i compiled my website on my 13" macbook everything looks perfect although when i use another computer with a larger screen my background image centers itself but my layered objects stay where they are (to the left) and everything looks terrible! how do i align the layer to move with the centered background image. sad.gif

 

cheers,

 

Rebellion1986.

Share this post


Link to post
Share on other sites
Dale,

 

1. Remove the blue box and then add a blue box/border to the CSS class "pageTitle" in your stylesheet. If you only want the blue box for the specials title but leave all of the other page titles untouched, create a new CSS class in your stylesheet and edit the name of the CSS class in specials.php to reflect the new class name.

 

For example:

Find:

			<td class="pageTitle" id="pageTitle"><h1><?php echo HEADING_TITLE; ?></h1></td>

Change it to something else such as:

		   <td class="pageTitleSpecials" id="pageTitle"><h1><?php echo HEADING_TITLE; ?></h1></td>

 

 

 

I want the blue box for every Page Title, not just Specials. How would I go about doing that?

 

Thanks,

Dale

Share this post


Link to post
Share on other sites
I want the blue box for every Page Title, not just Specials. How would I go about doing that?

 

Thanks,

Dale

Do the same thing for the index.php as well as simply modify the pageTitle class in your stylesheet or create a pageTitle class in your custom 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

Hi guys,

 

I'm stumped again - LOL I've tried searching and just haven't seemed to find the answer. Our credit card entry is now on the order_confirmation.php page (due to security modifications from osC to upgrade the store). If someone tries to use a credit card that we don't accept, they get booted back to the login screen with no error message. There is no error message in the URL either :blink:

 

I tried these instructions: http://forums.oscommerce.com/index.php?s=&...t&p=1071646 but it didn't fix anything.

 

Anybody know how to get it to show the TEXT_CCVAL_ERROR_INVALID_NUMBER message when the customer enters a cc number we don't accept? I have been wracking my brain going through all of the checkout pages I can find and I can't see any reason this wouldn't show up. I'm hoping someone here has run into this one already :blush:


~Tracy
 

Share this post


Link to post
Share on other sites

Hi, i hope this is the right place for STS support.

 

I have a text link for logging in "<a href="/login.php">Login</a> however when the customer has used this to log into their account, i need this to change to "Logoff".

 

Somone in the main support section gave me the following code:

<?php

if ( tep_session_is_registered('customer_id') ) {

echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">Logout</a>'; // simple text link

} else {

echo '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">Login</a>'; // another simple text link

}

?>

 

However im not sure if this will work with STS.

Please help.

Many thanks!

Share this post


Link to post
Share on other sites
Hi, i hope this is the right place for STS support.

 

I have a text link for logging in "<a href="/login.php">Login</a> however when the customer has used this to log into their account, i need this to change to "Logoff".

 

Somone in the main support section gave me the following code:

<?php

if ( tep_session_is_registered('customer_id') ) {

echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">Logout</a>'; // simple text link

} else {

echo '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">Login</a>'; // another simple text link

}

?>

 

However im not sure if this will work with STS.

Please help.

Many thanks!

 

Yes, this is the correct thread to ask STS related questions. If you ask outside of this thread, you will end up with answers like the one you got above.

 

STS already comes with a pre-defined tag that will do exactly what you are wanting (see the STS User Manual for a list of all of the pre-defined tags and what they do).

 

See post# 4631 just a few posts up from yours.


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 center the page, i did this:

Using a div tag just before the body tag as so:

CODE

<div align="center">
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

**HTML code for the body goes here**

</body>
</div>
</html>

 

 

But it didn't work, only the upper part of the header is centered.

:unsure:

 

.

Edited by celina2007

Share this post


Link to post
Share on other sites
Hey guys i want a centered site, i am using STS now, how can i center it please?

The beauty of STS is that you use standard web practices such as CSS to do these type of tasks.

 

Wrap your content and then assign a CSS class to it. Then in your stylesheet, add the CSS code to center the wrapped content.

 

For example:

 

Wrap your content in a div:

 

<div class="page_wrap">
Your content here
</div>

 

Then define the new CSS class "page_wrap" in your stylesheet:

 

 
.page_wrap {
/* includes the header, main body content and the footer */
margin:0 auto;
padding:0 0 0 0;
width:780px;
/* use what ever width you want */
background: url('images/body_bg.jpg') repeat-y;
/* use any background color or image that you want or leave out */
text-align:center;
}


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

Hey guys,

 

I am not sure if there are a solution for it, but we seams quite a few having the same problem. The Ajax shopping cart doesn't work correctly with STS. Some asked questions here (ajax shopping cart) but no one had a solution.

 

I try a post here and see if any of you guys got it to work with STS? In such case what kind of adjustments are needed?

 

Cheers

Hakan

Share this post


Link to post
Share on other sites
Hey please how to delete the header of categories infobox in STS?

If I remember correctly, you are using the Modern Template RC2a that was converted to an STS template (by me). This template also uses the CSS Category Menu in which I created a specific infobox template for it named "infobox_categories_cssmenu.php.html" in the boxes folder of the template folder.

 

I created this infobox template to have a static header in a table cell:

<td width="100%" height="14" class="infoBoxHeading">Categories</td>

You will simply need to edit that line of HTML.

 

You can also use a dynamic heading using the STS tag "$headertext" such as the following example:

<td background="images/infobox_03.gif" class="infoBoxHeading" width="1428">$headertext</td>

I chose to use the static header text instead as it matched the design of the original Modern Template RC2 better. ;)


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

So how can I get different index pages to work properly?

 

Homepage should have a picture, the rest should contain content.

 

I have a problem getting this working properly.

Share this post


Link to post
Share on other sites
So how can I get different index pages to work properly?

 

Homepage should have a picture, the rest should contain content.

 

I have a problem getting this working properly.

See the following post (#3755 in this thread):

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

 

See post #4326 as well:

http://forums.oscommerce.com/index.php?s=&...t&p=1303555

 

Also, for a home page template, create a template named index.php_0.html and leave out the $content tag and insert your image instead.

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

Hi,

Another problem im having with sts is im tyring to link to custom category templates from my menu.

My menu is made using javascript due to the expanding submenus etc....

When i use the $urlcat_122 as the link in the javascript, it only links to the category template when the javascript is in the actual template the menu is on. When i try using an external .js file the link does not work.

Is there a way to get this to work using an external .js file as there is quite a lot of javascript which i dont really want to include in the template files.

Many thanks

Share this post


Link to post
Share on other sites
Hi,

Another problem im having with sts is im tyring to link to custom category templates from my menu.

My menu is made using javascript due to the expanding submenus etc....

When i use the $urlcat_122 as the link in the javascript, it only links to the category template when the javascript is in the actual template the menu is on. When i try using an external .js file the link does not work.

Is there a way to get this to work using an external .js file as there is quite a lot of javascript which i dont really want to include in the template files.

Many thanks

 

Lee,

 

First off, I wouldn't use the $urlcat tag as it is a resource hog and it left over from the early days of STS. A better way would be to make a direct link as so:

STS Link to a category:

<a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a>

Also, regarding the extra javascript files...

There are a couple ways of doing this:

  1. $extracss
     
    You can use this placeholder if you want to dynamically add something in the html header, like an extra css file or external JavaScript file to load, depending on the page viewed.
     
    How to Use: place <!--$extracss--> between <head> and </head> of your template. It is important to keep the comment chars before and after $extracss, otherwise it won't work.
     
    Code example: simple example to dynamically add a stylesheet to the template. This stylesheet is located in the same folder as the template itself. This code can be placed in includes/modules/sts_inc/sts_user_code.php for example.
    $sts->template['extracss'].= '<link rel="stylesheet" type="text/css" href="' . STS_TEMPLATE_DIR  .'stylesheet2.css">';


  2. Create a STS module for it:
    See Post #4608 in this thread: http://forums.oscommerce.com/index.php?s=&...t&p=1343201

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

Share this post


Link to post
Share on other sites
Yes, this is the correct thread to ask STS related questions. If you ask outside of this thread, you will end up with answers like the one you got above.

 

STS already comes with a pre-defined tag that will do exactly what you are wanting (see the STS User Manual for a list of all of the pre-defined tags and what they do).

 

See post# 4631 just a few posts up from yours.

 

Hi, thanks for the reply. Il use this post for future support.

I did consider the $logoff and $myaccountlogoff tags however they dont do exactly what im after. Rather than the having my account when the user is logged out and then my account | log off when the user is logged in, im after my account | login and then my account | logoff.

The $loginofflogo tag sounds perfect however i need it to be text links rather than images. Is there a way to do this?

Many thanks.

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

×