Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Had a quick question, what would be the easiest way of setting the page width to a fixed width I have RC2, STS 4.5.8 and HTC SEO.

The site looks fine but I had to go and view it on a 1280x1024 enabled monitor and now my OCD has kicked in : )

Would like to set the site to 1024 centered.

I assume this would be done in my default STS template somewhere?

Thanks for any help you guys may have.

Edited by sitefire

Share this post


Link to post
Share on other sites
If you are using content templates for product_info pages, turn off this option in the STS Product Info module. Does the HTSEO link display correctly? If so, the problem lies with missing HTSEO code in the sts_inc/product_info.php file.

 

:thumbsup: Note: Any contribution that makes edits to the stock product_info.php script, AND YOU USE PRODUCT_INFO CONTENT TEMPLATES, then those same edits would need to be duplicated in the sts_inc/product_info.php file.

Thanks for your help Bill,

 

I'm not using Product Info templates, but I did try with it on which made no difference.

 

I had look through the code changes for the old HTC version, and the code for "Currently Viewing:" is there also (exactly the same). So I am wondering if the HTC version does or doesn't work with STS?

 

This seems to be the only problem between the two for me - everything else is working fine.

 

Regards, Owen.

Share this post


Link to post
Share on other sites
Thanks for your help Bill,

 

I'm not using Product Info templates, but I did try with it on which made no difference.

 

I had look through the code changes for the old HTC version, and the code for "Currently Viewing:" is there also (exactly the same). So I am wondering if the HTC version does or doesn't work with STS?

 

This seems to be the only problem between the two for me - everything else is working fine.

 

Regards, Owen.

Owen, STS is 100% compatible with the older version of HTC and I'm sure it works with HTC SEO as I had a lot of dialog with Jack as he was working on it.

 

What do you mean by the "Currently Viewing:"? Where is this at? Can you provide a link so that I can get a better idea what you are refering to?


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
Owen, STS is 100% compatible with the older version of HTC and I'm sure it works with HTC SEO as I had a lot of dialog with Jack as he was working on it.

 

What do you mean by the "Currently Viewing:"? Where is this at? Can you provide a link so that I can get a better idea what you are refering to?

Thanks for the reply Bill.

 

Jack has confirmed that on his test install of osCommerce with STS and HTSEO that this part does not work.

 

I have currently commented out the code for it, but I am happy to un-comment it so you can see it.

 

The code is added to the stock product_info.php file (around line 260 in mine - although this will be different if you view the source).

 

Look for:

      <?php /*** Begin Header Tags SEO ***/ ?>
     <tr>
      <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
     </tr>
     <tr>
      <td class="smallText" align="center"><?php echo TEXT_VIEWING; ?> 
      <?php echo '<a title="' . $header_tags_array['title'] . '" href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $product_info['products_id'], 'NONSSL') . '"/# ' . $header_tags_array['title'] . '">' . $header_tags_array['title']; ?></a></td>
     </tr>
     <?php /*** End Header Tags SEO ***/ ?>		

The "$header_tags_array['title']" is the part that is not working.

 

if you go to http://parts.pinball-fixers.com/product_in...?products_id=29 you will see the "Currently Viewing:" text at the bottom.

 

Thanks for taking the time to help on this Bill.

 

Regards, Owen.

Share this post


Link to post
Share on other sites
Thanks for the reply Bill.

 

if you go to http://parts.pinball-fixers.com/product_in...?products_id=29 you will see the "Currently Viewing:" text at the bottom.

 

Thanks for taking the time to help on this Bill.

 

Regards, Owen.

 

No, no, no....that is where you went wrong. In HTCv2.6.3 (the current version of Header Tags Controller) you should not add any of the HTC code into the files on the catalog side, such as product_info.php. STS automatically adds the HTC metatags to the files on the catalog side as long as you have installed HTC on the admin side correctly, updated the Database with the HTC modifications and added the STS tags in your template. For more details on this, click on the link in my signature below.

 

I know you are using HTC SEO, but you mentioned that the code did not work in HTCv2.6.3 either so that is why I mentioned the above. STS saves you alot of time and effort by pulling in the HTC information into the proper template page so the catalog edits should not be done.

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
No, no, no....that is where you went wrong. In HTCv2.6.3 (the current version of Header Tags Controller) you should not add any of the HTC code into the files on the catalog side, such as product_info.php. STS automatically adds the HTC metatags to the files on the catalog side as long as you have installed HTC on the admin side correctly, updated the Database with the HTC modifications and added the STS tags in your template. For more details on this, click on the link in my signature below.

 

I know you are using HTC SEO, but you mentioned that the code did not work in HTCv2.6.3 either so that is why I mentioned the above. STS saves you alot of time and effort by pulling in the HTC information into the proper template page so the catalog edits should not be done.

Very true Bill, and I have done as suggested.

 

But this particular code does not get automatically pulled in, as it is for a text link inside the product page - it has nothing to do with the META tags. They work fine by the way - as I have followed the instructions.

 

So, is there a better place to insert this code?

 

If you did look at my page, then you would have also noticed the Social Bookmark logo's. These are also inserted into the product_info.php file from the HTSEO instructions - they work.

Which now makes me think that I should do something similar for the Currently viewing text link...

 

The code in question is supposed to pull the information from $header_tags_array['title'] to create a text link based on the product currently being viewed.

 

Regards, Owen.

Share this post


Link to post
Share on other sites
The code in question is supposed to pull the information from $header_tags_array['title'] to create a text link based on the product currently being viewed.

 

Regards, Owen.

Wouldn't the use of $breadcrumbs do the same thing?

 

I will have to dig into the HTC SEO code to see what the purpose of that link as well as the code being added to the product_info.php file. It may be the fact that HTC SEO is relying on it's custom code in the product_info.php file to create the link and can't because the link is not there. This may be something you have to ask yourself if it is worth it or not.

 

:thumbsup: Keep in mind, that any custom mods to the product_info.php file will have to be duplicated in the sts_inc/product_info.php file if you plan to use the content template feature of STS. If not, then not a big deal as STS will pull in all of the data from the stock product_info.php file with the $content tag.


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
Wouldn't the use of $breadcrumbs do the same thing?

That's a fair point. I was focused on this particular thing, but you are right.

 

I will still see if I can find a way around this (with my limited PHP knowledge).

 

Thanks Bill.

Share this post


Link to post
Share on other sites

Further to my previous post, I'm actually trying to follow the instructions in this post

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

 

I don't know what I need to include in the category template so that it will display the product listing for that category. Using $content displays the home page content, so I presume I need to replace that with some php code?

Share this post


Link to post
Share on other sites

Still hoping someone can give me a direction to go.

Trying to set a fixed width and center position for my site to maintain the same look across browsers, I'm using rc2a, sts 4.5.8 and htc seo.

Tried using stylesheet but doesn't look like it changes anything, so I'm thinking the change needs to be made to the default sts template somewhere?

Thanks in advance for any help you can give.

Share this post


Link to post
Share on other sites
Further to my previous post, I'm actually trying to follow the instructions in this post

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

 

I don't know what I need to include in the category template so that it will display the product listing for that category. Using $content displays the home page content, so I presume I need to replace that with some php code?

 

Try creating a home page template (index.php_0.html) without the $content tag. Then, create a category template (index.php_x.html - x being the category ID) and only include the $content tag.

 

Then you would insert a PHP include statement into your home page template to bring in the category page:

<?php include("index.php_x.html"); ?>

where x is the category ID.

 

I'm not sure why you didn't like the All Products with Images contribution:

http://www.oscommerce.com/community/contributions,1501

 

You could use that contribution above and add an include statement for the all products page into your home page template and that should give you what you are looking for.


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
Still hoping someone can give me a direction to go.

Trying to set a fixed width and center position for my site to maintain the same look across browsers, I'm using rc2a, sts 4.5.8 and htc seo.

Tried using stylesheet but doesn't look like it changes anything, so I'm thinking the change needs to be made to the default sts template somewhere?

Thanks in advance for any help you can give.

No one may have responded to your post since this is a basic HTML or CSS function. You would center each template page that you have. If you only are using one template, such as the default template (sts_template.html), then you would need to center the body of the page, just like you would any other non-osC web page.

CSS for stylesheet:

body  {
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
Try creating a home page template (index.php_0.html) without the $content tag. Then, create a category template (index.php_x.html - x being the category ID) and only include the $content tag.

 

Then you would insert a PHP include statement into your home page template to bring in the category page:

<?php include("index.php_x.html"); ?>

where x is the category ID.

 

I had already tried this.

Surely you need to somehow pass the cPath value for the category to index.php_x.html? Otherwise it just displays the content for the home page rather than the category.

Share this post


Link to post
Share on other sites
I had already tried this.

Surely you need to somehow pass the cPath value for the category to index.php_x.html? Otherwise it just displays the content for the home page rather than the category.

The name of template itself will grap the cPath (STS does this).

 

Do you have the Index Module enabled in the STS Modules in the Admin?


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
The name of template itself will grap the cPath (STS does this).

 

Do you have the Index Module enabled in the STS Modules in the Admin?

 

Yes I have the Index Module enabled.

 

I'm a noob to osCommerce (let alone STS) and I could be wrong but I don't think the template provides the cPath. I think, for example, that by making a selection in the category box this provides the cPath which in turn tells it which template to use.

 

Maybe I just need to assign the cPath value within the category template?

Share this post


Link to post
Share on other sites
Yes I have the Index Module enabled.

 

I'm a noob to osCommerce (let alone STS) and I could be wrong but I don't think the template provides the cPath. I think, for example, that by making a selection in the category box this provides the cPath which in turn tells it which template to use.

 

Maybe I just need to assign the cPath value within the category template?

 

Well, it's like leading a horse to water but you can't make him drink. :blink:


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
No one may have responded to your post since this is a basic HTML or CSS function. You would center each template page that you have. If you only are using one template, such as the default template (sts_template.html), then you would need to center the body of the page, just like you would any other non-osC web page.

CSS for stylesheet:

body  {
text-align: center;
}

 

 

Hi Bill, thats easy for you to say :rolleyes: all kidding aside, I figured it was something like that, however being new to oscommerce and your fantastic(by the way) sts! I am unsure where exactly to add the code to the template or for that matter what code to add :blink:

I'm sure in time I'll get the full hang of things, so far everything else has been easy with oscommerce and you contrib.

Share this post


Link to post
Share on other sites

Heeelllp - Infoboxes not displaying!!

 

Hi all - I'm pulling my hair out on this one.......

 

I'm using RC2.2 and the latest 4.5.8 STS downloads. The STS template works fine but I cannot get the $categorybox infobox template or any infobox template to work.

 

I've gone over all the code and checked to be sure that I am using the correct names, folders etc etc for the new infobox, infoboxes enabled in admin via the STS Module page - still no templated infobox is displaying.

 

I've used STS many times but never hit this snag - if I copy a complete template folder over from another site that was built using an earlier (4.5.2 I think) version of STS then the infoboxes still do not display.

 

Any ideas?

 

Graeme

Share this post


Link to post
Share on other sites
Heeelllp - Infoboxes not displaying!!

 

Hi all - I'm pulling my hair out on this one.......

 

I'm using RC2.2 and the latest 4.5.8 STS downloads. The STS template works fine but I cannot get the $categorybox infobox template or any infobox template to work.

 

I've gone over all the code and checked to be sure that I am using the correct names, folders etc etc for the new infobox, infoboxes enabled in admin via the STS Module page - still no templated infobox is displaying.

 

I've used STS many times but never hit this snag - if I copy a complete template folder over from another site that was built using an earlier (4.5.2 I think) version of STS then the infoboxes still do not display.

 

Any ideas?

 

Graeme

What do you mean by the infoboxes not showing? Do you mean your infobox templates are not showing or do you mean any of the infobox tags such as $searchbox, $whatsnewbox etc. is not bringing in the osCommerce boxes?


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
What do you mean by the infoboxes not showing? Do you mean your infobox templates are not showing or do you mean any of the infobox tags such as $searchbox, $whatsnewbox etc. is not bringing in the osCommerce boxes?

Hi Bill

In basic STS template mode we have $categorybox (for example) which pulls in the default infobox from the inlcudes/boxes folder - that works just fine.

 

I also have customised infoboxes in the STS Templates/boxes/ folder.

 

I go to the admin and 'activate' the STS infoboxes by setting 'Use template fo infoboxes' to 'true'.

 

There is no visible change to the front of the store - the original infobox is still displayed - it's as though the STS is not picking up the change made in admin.

 

(It's the same on my local WAMP and a live XAMP server)

 

Regards

 

Graeme

Share this post


Link to post
Share on other sites

Found the problem (and cured it)

 

Basic error in copying the changes over into includes/classes/boxes.php - missed a line and that was the root cause - such an easy way to waste an entiire evening

 

:angry:

Graeme

Share this post


Link to post
Share on other sites
Found the problem (and cured it)

 

Basic error in copying the changes over into includes/classes/boxes.php - missed a line and that was the root cause - such an easy way to waste an entiire evening

 

:angry:

Graeme

Glad you got it working. :rolleyes:

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 installed STSv4.3.3 with HTCv2.6.0 Bundle (osC 2.2-MS2) one year ago on my site, and I had no problem with the STS configuration which is the same since that time.

I regularly make database updates, sts layout adjustments and some other updates but no action have been performed relating to STS settings via admin menus.

I noticed lately that I have no display when my site is displayed with spanish language but works fine using french or english one.

 

Here are the urls :

Normal display : http://www.atelierdutennis.com/product_inf...amp;language=fr

Wrong display : http://www.atelierdutennis.com/product_inf...amp;language=es

 

Can somebody have any idea ? I am searching for the origin of this problem but didn't found out anything at the moment.

 

Thanks a lot in advance for your precious help.

Share this post


Link to post
Share on other sites
I installed STSv4.3.3 with HTCv2.6.0 Bundle (osC 2.2-MS2) one year ago on my site, and I had no problem with the STS configuration which is the same since that time.

I regularly make database updates, sts layout adjustments and some other updates but no action have been performed relating to STS settings via admin menus.

I noticed lately that I have no display when my site is displayed with spanish language but works fine using french or english one.

 

Here are the urls :

Normal display : http://www.atelierdutennis.com/product_inf...amp;language=fr

Wrong display : http://www.atelierdutennis.com/product_inf...amp;language=es

 

Can somebody have any idea ? I am searching for the origin of this problem but didn't found out anything at the moment.

 

Thanks a lot in advance for your precious help.

 

 

I detected the fault, due to a comment sign oversight in a file for spanish options.

:blush:

Share this post


Link to post
Share on other sites
I detected the fault, due to a comment sign oversight in a file for spanish options.

:blush:

Jacques, Thanks for posting that everything is OK and that you found the culprit. :thumbsup:


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

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

×