Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Lori, you are going to so angry with yourself once you get this down and see how simple it is. :blush:

 

This is where you messed up. You need to copy that newpage.php page for each new page that you install and name the copies whatever (anything but newpage.php).

 

So... for your example, you would upload the following:

includes/languages/english/faqs.php

 

You are getting an error because you do not have any such page called faqs.php.

Hmmm... I tried that but I am still getting a 404 error. When I click on the FAQs button it does say this in the browser address bar: http://www.domainname.com/catalog/faqs.php so it looks like it is trying to pull the correct page.

 

I also tried changing this code in the faqs.php page that is filed under includes/languages/english/faqs.php.

 

<?php

/*

$Id: shipping.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

 

Use this page as a template for any new pages that you want for your store.

 

In the code below, substitute 'Newpage Template' for the actual name of your new page.

*/

 

define('NAVBAR_TITLE', 'FAQS');

define('HEADING_TITLE', 'FAQS');

 

define('TEXT_INFORMATION', '<p><b><font size="4">T</font></b>his is our newpage template.</a></p>');

?>

 

I am sure this is so simple and for whatever reason I must have something off somewhere. I have tried 3 times starting from the beginning. ARGH! I am driving myself nuts with this.

 

I will continue trying to solve the mystery.

 

Thanks!

Share this post


Link to post
Share on other sites
Hmmm... I tried that but I am still getting a 404 error. When I click on the FAQs button it does say this in the browser address bar: http://www.domainname.com/catalog/faqs.php so it looks like it is trying to pull the correct page.

 

I also tried changing this code in the faqs.php page that is filed under includes/languages/english/faqs.php.

I am sure this is so simple and for whatever reason I must have something off somewhere. I have tried 3 times starting from the beginning. ARGH! I am driving myself nuts with this.

 

I will continue trying to solve the mystery.

 

Thanks!

Okay, so I got the page to come up after adding faqs.php to /catalog directory. I had forgotten about this one. However, now the images are not showing up correctly so I need to take a look at the template.

 

Thanks.

Share this post


Link to post
Share on other sites

Hi Bill,

 

I fixed the image problem and now everything looks good. Thank you so much for your help! I just have a few last questions to help me understand how this works.

 

So, you have the "template: which I called faqs.php.html: this is filed under sts_template/test

 

Then you have a faqs.php page which is filed under catalog/includes/languages/english

 

Then you have ANOTHER faqs.php page which is filed under catalog

 

My question is this...

 

1. The faqs.php page - does this serve as the "actual" page where I will have my content for that specific page? I guess I know that it does but why do you have to put it under two places as I listed above? If I create another page called sitemap.php, do I then need to also put that in the two directories above? I understant that I also need to put in the code.

 

2. If my FAQs, Contact, Site Map, etc all use the same template, can I just rename the template general.php.html and then make the necessary code adjustments? I really do not need a template for each page.

 

Thanks again!!!!

Share this post


Link to post
Share on other sites
It is so much easier than that. Reload a stock search.php and then follow the advice I gave a few pages back in this thread:

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

 

Hope this helped you out,

 

Thanks Bill. You are the kindest soul here. However, I couldn't find any post regarding search.php in the link you gave. Can you write out the post number here, so that I could locate?

 

Once again, thanks.

Share this post


Link to post
Share on other sites
Thanks Bill. You are the kindest soul here. However, I couldn't find any post regarding search.php in the link you gave. Can you write out the post number here, so that I could locate?

 

Once again, thanks.

Here you go my friend....

 

<form name="advanced_search" action="advanced_search_result.php" method="get">

<td bgcolor="anycolor">

<table width="100%" cellpadding="0" cellspacing="0"><tr><td class="navigation">Search </td>

<td align="center"><input type="hidden" name="search_in_description" value="1"><input type="hidden" name="inc_subcat" value="1" 1><input type="text" name="keywords" size="10" maxlength="30" class="searchForm" style="width: 95px"></td><td align="center"> <input type="image" src="$templatedir/images/gobutton.gif" border="0" alt="Search" title=" Search "></td></tr></table>

</td></form>

The above code can be used anywhere in your template and can be styled anyway you desire. The items in bold need to be changed to your liking.


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

 

I fixed the image problem and now everything looks good. Thank you so much for your help! I just have a few last questions to help me understand how this works.

 

So, you have the "template: which I called faqs.php.html: this is filed under sts_template/test

 

Then you have a faqs.php page which is filed under catalog/includes/languages/english

 

Then you have ANOTHER faqs.php page which is filed under catalog

 

My question is this...

 

1. The faqs.php page - does this serve as the "actual" page where I will have my content for that specific page? I guess I know that it does but why do you have to put it under two places as I listed above? If I create another page called sitemap.php, do I then need to also put that in the two directories above? I understant that I also need to put in the code.

 

2. If my FAQs, Contact, Site Map, etc all use the same template, can I just rename the template general.php.html and then make the necessary code adjustments? I really do not need a template for each page.

 

Thanks again!!!!

Lori,

There is a big difference in the files and you need both (faqs.php pages). If you followed the instructions, you started out by making a copy of the following two files:

  1. "catalog/shipping.php". .
  2. "catalog/includes/languages/your_language/shipping.php".

The files both have the same name but are very different. The copy of "catalog/shipping.php" file will be named

"catalog/faqs.php" (Note: I am not telling you to get rid of your original shipping.php file, just to make a copy of it and name the copy "faqs.php"). The copy of "catalog/includes/languages/your_language/shipping.php" file will be named "catalog/includes/languages/your_language/faqs.php".

 

The instructions go on to tell you that you need to edit some code in the copied files. If you don't do this, you will basicially have a copy of two shipping content files which is kind of worthless. Here are the edits that you should have made:

 

Open your "catalog/faqs.php" file and locate the following code:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHIPPING);

Change it to:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_FAQS);

Find:

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHIPPING, '', 'NONSSL'));

Change it to:

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_FAQS, '', 'NONSSL'));

 

Now edit the copied file "catalog/includes/languages/your_language/faqs.php".

Find:

define('NAVBAR_TITLE', 'Shipping & Returns'); define('HEADING_TITLE', 'Shipping & Returns');

Change it to:

define('NAVBAR_TITLE', 'Faqs'); define('HEADING_TITLE', 'Faqs');

 

Then the instructions tell you to define the new page in the "catalog/includes/filenames.php" file. Add the following line of code:

define('FILENAME_FAQS', 'faqs.php');

 

You already did the edits to the sts_user_code.php file that created all of the useful STS Tags for linking to the faqs.php page. You can add your content in the faqs.php.html page or directly in the "catalog/includes/languages/your_language/faqs.php" page itself by editing the following line of code:

 

define('TEXT_INFORMATION', '<p><b><font size="4">T</font></b>his is our newpage template.</a></p>');

 

That should get you on track! :-


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

There is a big difference in the files and you need both (faqs.php pages). If you followed the instructions, you started out by making a copy of the following two files:

  1. "catalog/shipping.php". .
  2. "catalog/includes/languages/your_language/shipping.php".

The files both have the same name but are very different. The copy of "catalog/shipping.php" file will be named

"catalog/faqs.php" (Note: I am not telling you to get rid of your original shipping.php file, just to make a copy of it and name the copy "faqs.php"). The copy of "catalog/includes/languages/your_language/shipping.php" file will be named "catalog/includes/languages/your_language/faqs.php".

 

The instructions go on to tell you that you need to edit some code in the copied files. If you don't do this, you will basicially have a copy of two shipping content files which is kind of worthless. Here are the edits that you should have made:

 

Open your "catalog/faqs.php" file and locate the following code:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_SHIPPING);

Change it to:

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_FAQS);

Find:

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_SHIPPING, '', 'NONSSL'));

Change it to:

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_FAQS, '', 'NONSSL'));

 

Now edit the copied file "catalog/includes/languages/your_language/faqs.php".

Find:

define('NAVBAR_TITLE', 'Shipping & Returns'); define('HEADING_TITLE', 'Shipping & Returns');

Change it to:

define('NAVBAR_TITLE', 'Faqs'); define('HEADING_TITLE', 'Faqs');

 

Then the instructions tell you to define the new page in the "catalog/includes/filenames.php" file. Add the following line of code:

define('FILENAME_FAQS', 'faqs.php');

 

You already did the edits to the sts_user_code.php file that created all of the useful STS Tags for linking to the faqs.php page. You can add your content in the faqs.php.html page or directly in the "catalog/includes/languages/your_language/faqs.php" page itself by editing the following line of code:

 

define('TEXT_INFORMATION', '<p><b><font size="4">T</font></b>his is our newpage template.</a></p>');

 

That should get you on track! :-

Thanks Bill. I did not edit any shipping pages because remember I copied the files from the Contribution over to the web host server and then downloaded them to my PC from there. Of course I backed up the files I was replacing with the Contribution.

 

Everything looks good except that I now have a duplicate pages on my one faqs.php page. It shows my content with the design of the page BUT then right below the whole page duplicates but is just the empty template? UGH... I will sort through this. I was just trying to basically understand the difference between the two faqs.php files. Meaning which one do I place my content in. I went ahead and placed my content in the faqs.php under languages/english.

Edited by dcwebpixie

Share this post


Link to post
Share on other sites
Thanks Bill. I did not edit any shipping pages because remember I copied the files from the Contribution over to the web host server and then downloaded them to my PC from there. Of course I backed up the files I was replacing with the Contribution.

 

Everything looks good except that I now have a duplicate pages on my one faqs.php page. It shows my content with the design of the page BUT then right below the whole page duplicates but is just the empty template? UGH... I will sort through this. I was just trying to basically understand the difference between the two faqs.php files. Meaning which one do I place my content in. I went ahead and placed my content in the faqs.php under languages/english.

 

Okay I figured this mystery out. :lol: Under catalog/faqs.php I was putting the blank design/template here as well so it was duplicating the site twice on one page. So I removed the design and just left the appropriate code and all is good now. This is why I was confusing MYSELF with what the difference was between the two faqs.php files were. I get it now. Thanks.

Edited by dcwebpixie

Share this post


Link to post
Share on other sites
Okay I figured this mystery out. :lol: Under catalog/faqs.php I was putting the blank design/template here as well so it was duplicating the site twice on one page. So I removed the design and just left the appropriate code and all is good now. This is why I was confusing MYSELF with what the difference was between the two faqs.php files were. I get it now. Thanks.

 

I can see where one might get confused. It's sort of like the two different "includes" folders for osC, one on the admin side and the other on the catalog side. This one gets a lot of newbies. :lol: (not laughing at them...just the humor in it...."Who's on first" kind of thing)


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

One more snag...

 

When I am on a category page which uses sts_templates.html and then I click on the FAQs button it takes me to the correct faqs.php page. However, then when I click on the FAQs button from the actual faqs.php page, it goes to a 404 error page? I have the link for the FAQs button setup as $urlfaqs on all templates so I am confused.

 

When I hover over the FAQs button on a category page, the path (at the bottom of the browser) is catalog/faqs.php. However, when I am on the actual faqs.php page and I hover over the FAQs button the path now reads: catalog/$urlfaqs.

 

Any ideas on this? Also, before my buttons at the top went back to the home page (index.php_0.html) if I did not have any links set up. Now when I hover over those buttons it says catalog/faqs.php#

 

Thanks!

Share this post


Link to post
Share on other sites
One more snag...

 

When I am on a category page which uses sts_templates.html and then I click on the FAQs button it takes me to the correct faqs.php page. However, then when I click on the FAQs button from the actual faqs.php page, it goes to a 404 error page? I have the link for the FAQs button setup as $urlfaqs on all templates so I am confused.

 

When I hover over the FAQs button on a category page, the path (at the bottom of the browser) is catalog/faqs.php. However, when I am on the actual faqs.php page and I hover over the FAQs button the path now reads: catalog/$urlfaqs.

 

Any ideas on this? Also, before my buttons at the top went back to the home page (index.php_0.html) if I did not have any links set up. Now when I hover over those buttons it says catalog/faqs.php#

 

Thanks!

 

Some more observations.

 

1. On my category page template called sts_template.html I put the following link for the FAQs button $urlfaqs. As I mentioned if I am on a category page, it links to the faqs.php page great.

 

2. Trying to resolve this issue, I changed the link on the faqs.php page (filed under languages/english) to simply faqs.php and now it links fine. So, my question is, should I just be using faqs.php for my navigation button link instead of $urlfaqs?

 

3. Also, after some experimenting, it appears that the faqs.php page is actually pulling from the languages/english/faqs.php page. If I take out the content from this page and then put the content on the faqs.php.html page filed under sts_templates/test, then the page just shows up blank with only the design and no content.

 

One other thing I am thinking about is this...

 

My template for the faqs.php page is filed under sts_template/test/faqs.php.html (no content or anything just the template design)

I have my actual content on the faqs.php page filed under languages/english/faqs.php

 

Should I have just content on the page for languages/english/faqs.php? Meaning that right now I have the whole design template on the faqs.php page filed here. If so should I add $content to the faqs.php.html template? I did also have the actual template design under catalog but I removed it and just kept the PHP code that needed to be there.

 

Thanks

Edited by dcwebpixie

Share this post


Link to post
Share on other sites
Alan,

I wrote a short step by step for adding a quanity box to the product info page. You can view it here:

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

 

Hope this helped,

 

Bill

 

Thank you - yes I had seen that and had used it to retrieve Product Quantity.

 

However, I needed to use the value in a PHP if...else expression and that was what I was struggling with.

 

As an interim solution, I created a Global in sts_inc/product_info.php to hold the value and access that in my expression.

 

However, I'm sure there is a more elegant solution than that???

Share this post


Link to post
Share on other sites

Hi,

I really do need some help with this I have been looking at the code for days and have yet to resolve this dilemma. I am wondering why there have been no replies when I see so many others getting such excellent help.

Is there more information that I should post? Was this covered in depth else where? If so please tell me where. I have tried looking through this forum. 192 pages is too much for me to read all of it.

Thanks

 

Hello Everyone,

I am writing because I having a problem with how the info boxes column displays when navigating a category with nested sub-categories. For some reason the content drops below the main content rather than displaying along side it. You can see the problem here verses what it should look like here

When I check the html the difference that accounts for this first the error case.

<!-- start Default Content //-->

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading">Our K Catalog</td>
	  </tr>
	</table></td>
  </tr>
  <tr>

	<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
  </tr>
	  <tr>
		<td><!-- new_release //-->

 

Next the code where it displays correctly

<!-- start Default Content //-->

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td><!-- new_release //-->

 

What is confusing me is I can't see where the </table> is being suppressed. Is it the php call or the STS template. Also the code that creates the error looks right while the code that doesn't does not look right. The only thing I can figure is that the master table that all the others are being nested in is being terminated too soon.

Any help or suggestions are much appreciated.

Thanks


On your last day only you will have to approve or disaprove of how your life has been.

Share this post


Link to post
Share on other sites
Hi,

I really do need some help with this I have been looking at the code for days and have yet to resolve this dilemma. I am wondering why there have been no replies when I see so many others getting such excellent help.

Is there more information that I should post? Was this covered in depth else where? If so please tell me where. I have tried looking through this forum. 192 pages is too much for me to read all of it.

Thanks

Hi Christian,

 

I am also a newbie to STS and osCommerce. The only thing that I can recommend is to do a Google Search on your problem. When I tried doing specific searches through the search function in osCommerce Community, sometimes it would work and sometimes it would not. Also, sometimes I would have to read through lots and lots of postings before finding an answer. However, the posts in the forum are indexed by Google so I found a lot of solutions by just using Google's search.

 

As far as STS goes, Bill has helped out a great deal with that. I am not sure who else on the forum helps with STS.

 

Sorry that I could not have been more help.

 

Lori

Share this post


Link to post
Share on other sites
Hi Christian,

 

I am also a newbie to STS and osCommerce. The only thing that I can recommend is to do a Google Search on your problem. When I tried doing specific searches through the search function in osCommerce Community, sometimes it would work and sometimes it would not. Also, sometimes I would have to read through lots and lots of postings before finding an answer. However, the posts in the forum are indexed by Google so I found a lot of solutions by just using Google's search.

 

As far as STS goes, Bill has helped out a great deal with that. I am not sure who else on the forum helps with STS.

 

Sorry that I could not have been more help.

 

Lori

I would just like to add the point that the STS User Manual gives a tip on how to search this thread for answers using Google. :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
Hello Everyone,

I am writing because I having a problem with how the info boxes column displays when navigating a category with nested sub-categories. For some reason the content drops below the main content rather than displaying along side it. You can see the problem here verses what it should look like here

When I check the html the difference that accounts for this first the error case.

<!-- start Default Content //-->

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading">Our K Catalog</td>
	  </tr>
	</table></td>
  </tr>
  <tr>

	<td><img src="images/pixel_trans.gif" border="0" alt="" width="100%" height="10"></td>
  </tr>
	  <tr>
		<td><!-- new_release //-->

 

Next the code where it displays correctly

<!-- start Default Content //-->

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td><!-- new_release //-->

 

What is confusing me is I can't see where the </table> is being suppressed. Is it the php call or the STS template. Also the code that creates the error looks right while the code that doesn't does not look right. The only thing I can figure is that the master table that all the others are being nested in is being terminated too soon.

Any help or suggestions are much appreciated.

Thanks

Christian,

I usually do not take the time to asnwer HTML or CSS related questions as I think that is what you are dealing with here. If you tried any of the sample STS templates, you would see that STS does not terminate any code from the infoxes that would cause them to be alligned vertically versus horizontally.

 

:thumbsup: Microsoft has an excellent tool (free download) to assist you in troubleshooting these types of issues. It plugs into Interent Explorer and works from the browser. I suggest that you use this tool to diagnose the various CSS styles that are tied to the particular tables/divs/columns, etc.

 

Here is the link:

https://www.microsoft.com/downloads/details...;displaylang=en

 

BTW: I looked at your site using both IE and Firefox which had the same results in both.

 

I used the tool to observe that your main body table is 700px but the content table (inside the main body table) is also 700px. This leaves no room for your right infobox table which is 254px. I think this is your problem. Remove the table size from the content table (or use a percentage instead) and your right column should fall into place.

 

I only casually observed the above so it is possible that you have other underlying issues as well.

 

Hope this helped 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
Some more observations.

 

1. On my category page template called sts_template.html I put the following link for the FAQs button $urlfaqs. As I mentioned if I am on a category page, it links to the faqs.php page great.

 

2. Trying to resolve this issue, I changed the link on the faqs.php page (filed under languages/english) to simply faqs.php and now it links fine. So, my question is, should I just be using faqs.php for my navigation button link instead of $urlfaqs?

 

3. Also, after some experimenting, it appears that the faqs.php page is actually pulling from the languages/english/faqs.php page. If I take out the content from this page and then put the content on the faqs.php.html page filed under sts_templates/test, then the page just shows up blank with only the design and no content.

 

One other thing I am thinking about is this...

 

My template for the faqs.php page is filed under sts_template/test/faqs.php.html (no content or anything just the template design)

I have my actual content on the faqs.php page filed under languages/english/faqs.php

 

Should I have just content on the page for languages/english/faqs.php? Meaning that right now I have the whole design template on the faqs.php page filed here. If so should I add $content to the faqs.php.html template? I did also have the actual template design under catalog but I removed it and just kept the PHP code that needed to be there.

 

Thanks

Hey Bill,

 

I know my last few posts were really long. I find that if I just use faqs.php for the link on my custom graphic navigation buttons, it works much better. Are there any cons on doing it this way? As I mentioned in my very long post, when I put the link $urlfaqs for the FAQs button, it works fine from the category pages but when on the actual FAQs page, the link $urlfaqs does not work - it goes to a 404 error page. If I just use faqs.php it works from all templates. I am still not entirely sure how everything synchs up but it seems to work using faqs.php for the link. I do know that it is pulling the content from faqs.php under languages/english.

 

I tried the search function and also navigation to the category pages from the FAQs page and everything seems to work fine. So, at this point I am just wondering if you see any drawbacks to using the page name faqs.php versus the tag $urlfaqs.

 

Thanks Bill!!! :D

Share this post


Link to post
Share on other sites
Hey Bill,

 

I know my last few posts were really long. I find that if I just use faqs.php for the link on my custom graphic navigation buttons, it works much better. Are there any cons on doing it this way? As I mentioned in my very long post, when I put the link $urlfaqs for the FAQs button, it works fine from the category pages but when on the actual FAQs page, the link $urlfaqs does not work - it goes to a 404 error page. If I just use faqs.php it works from all templates. I am still not entirely sure how everything synchs up but it seems to work using faqs.php for the link. I do know that it is pulling the content from faqs.php under languages/english.

 

I tried the search function and also navigation to the category pages from the FAQs page and everything seems to work fine. So, at this point I am just wondering if you see any drawbacks to using the page name faqs.php versus the tag $urlfaqs.

 

Thanks Bill!!! :D

One drawback would be Session ID loss. My instructions created a STS tag that retained the customer's Session ID so that the cart would not be emptied when the user clicked on the link for the faqs.php page.

 

The instructions for using Add New Pages Using STS creates two new STS tags for you to use to link to your pages. One is a text link and the other is a URL link for graphic buttons:

 

/*New Page Template link below. Change "newpage" to whatever your actual new page name is. Also change 'urlmynewpage' and 'newpage' to whatever you want your STS tag to be for your new page. */

$sts->template['urlmynewpage'] = tep_href_link(FILENAME_NEWPAGE, '', 'SSL');

$sts->template['newpage'] = '<a href=' . tep_href_link(FILENAME_NEWPAGE, '', 'SSL') . ' class="headerNavigation">' . 'New Page' . '</a>';

 

So, your STS tags would be $urlfaqs and $faqs.

 

By placing the $faqs tag on your template page, it returns the text link following:

<a href="http://www.yourdomain.com/catalog/newpage.php">New Page</a>

The text "New Page" will appear on your template and then link to http://www.yourdomain.com/catalog/newpage.php.

 

By placing the $urlfaqs tag as the link reference for an image, your HTML will look something like the following:

<a href="$urlfaqs">

<img border="0" src="images/faqsbutton.gif"></a>

 

The above graphic link will return the following:

<a href="faqs.php">

 

I hope this helps. If it still does not work then you may still have some of the code missing or incorrect. :huh:


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
One drawback would be Session ID loss. My instructions created a STS tag that retained the customer's Session ID so that the cart would not be emptied when the user clicked on the link for the faqs.php page.

 

The instructions for using Add New Pages Using STS creates two new STS tags for you to use to link to your pages. One is a text link and the other is a URL link for graphic buttons:

 

/*New Page Template link below. Change "newpage" to whatever your actual new page name is. Also change 'urlmynewpage' and 'newpage' to whatever you want your STS tag to be for your new page. */

$sts->template['urlmynewpage'] = tep_href_link(FILENAME_NEWPAGE, '', 'SSL');

$sts->template['newpage'] = '<a href=' . tep_href_link(FILENAME_NEWPAGE, '', 'SSL') . ' class="headerNavigation">' . 'New Page' . '</a>';

 

So, your STS tags would be $urlfaqs and $faqs.

 

By placing the $faqs tag on your template page, it returns the text link following:

<a href="http://www.yourdomain.com/catalog/newpage.php">New Page</a>

The text "New Page" will appear on your template and then link to http://www.yourdomain.com/catalog/newpage.php.

 

By placing the $urlfaqs tag as the link reference for an image, your HTML will look something like the following:

<a href="$urlfaqs">

<img border="0" src="images/faqsbutton.gif"></a>

 

The above graphic link will return the following:

<a href="faqs.php">

 

I hope this helps. If it still does not work then you may still have some of the code missing or incorrect. :huh:

 

Hmm... well I am not sure what the issue could be then. As for the session ID, I do not know a lot about this but this site will be strictly business to business and will not have any commerce. The client does not want the site indexed by the search engines. They will not be tracking visitors.

 

Here is what I have - gosh I am such a pain in the rear!! :lol:

 

1. I have my template filed under sts_templates/test/faqs.php.html. This is my custom design for the site. Includes no content for the actual faqs.php page. There is NO New Page code on it except for when I added the link $urlfaqs to the FAQs button

 

2. Next, I have the same exact page (which is basically the same template that is filed under sts_templates/test) and this is filed as languages/english/faqs.php. This page has ALL of my content on it. Again, I added the $urlfaqs link to the FAQs button. There is the following code on this page:

 

define('NAVBAR_TITLE', 'Faqs');

define('HEADING_TITLE', 'Faqs');

 

define('TEXT_INFORMATION', '<p><b><font size="4">T</font></b>his is our newpage template.</a></p>');

 

3. Then, I have another faqs.php page filed under /catalog. This has the following code on the page. CODE ONLY. No design and no content.

 

require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_FAQS);

 

$breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_FAQS));

 

4. For the sts_user_code page I have the following code:

 

$sts->template['urlfaqs'] = tep_href_link(FILENAME_FAQS, '', 'SSL');

$sts->template['faqs'] = '<a href=' . tep_href_link(FILENAME_FAQS, '', 'SSL') . ' class="headerNavigation">' . 'Sitemap' . '</a>';

 

5. For the filenames.php code I have the following code:

 

define('FILENAME_FAQS', 'faqs.php');

 

As I mentioned, when I add $urlfaqs to my category template which is sts_template.html, it links perfectly to the actual faqs.php page. However, once I am on the faqs.php page and I click on the FAQs button, it goes to a 404 error page. :blink: Thanks.

Share this post


Link to post
Share on other sites

Hi Bill,

 

You probably have not had time to look at my last post. Unfortunately, the database server has gone down again with the hosting company. That's twice now in one week. Very frustrating. So right now I have no access to the site.

 

Anyhoo, I am now wondering this...

 

As I mentioned in my last post, I have my design template called faqs.php.html and it is filed under sts_templates/test. This is basically just the design/layout. There is a blank area (table) where the content should go for each page.

 

I also have the same design WITH content named faqs.php filed under languages/english. So basically it is the same page as the template but has content on it along with some code.

 

My question is should I have the actual design on the faqs.php page? Or am I supposed to just have the actual content? Should I be putting the tag $content in the blank table on the actual template named faqs.php.html?

 

I am just wondering of my issue with using $urlfaqs is happening because I have the design in both places (faqs.php and faqs.php.html)

Share this post


Link to post
Share on other sites
Hi Bill,

 

You probably have not had time to look at my last post. Unfortunately, the database server has gone down again with the hosting company. That's twice now in one week. Very frustrating. So right now I have no access to the site.

 

Anyhoo, I am now wondering this...

 

As I mentioned in my last post, I have my design template called faqs.php.html and it is filed under sts_templates/test. This is basically just the design/layout. There is a blank area (table) where the content should go for each page.

 

I also have the same design WITH content named faqs.php filed under languages/english. So basically it is the same page as the template but has content on it along with some code.

 

My question is should I have the actual design on the faqs.php page? Or am I supposed to just have the actual content? Should I be putting the tag $content in the blank table on the actual template named faqs.php.html?

 

I am just wondering of my issue with using $urlfaqs is happening because I have the design in both places (faqs.php and faqs.php.html)

Lori,

 

You are missing the point of using STS to create the new page to begin with. :lol:

No, you wouldn't want to add the design to the faqs.php page. If you did this, you would have to hard code your design every time you needed to make a change and it would not be controlled by STS at all. This is what STS is for. You do this in the template. Think of the faqs.php page as a blank PHP page that gets filled in by your template. You have the option of adding content into the PHP page and then using the $content tag in your template to pull in that content or you could simply add the content directly to your template page. This would depend of course what kind of content you need to have. If it is dynamic content, then you need to add your PHP script to the faqs.php page and rely on the $content tag in your template to pull in that information.

 

For example, if you have the Featured Products contribution installed and this happened to be a part of your faqs.php page (maybe an include or something), then you would need the $content tag in your template to bring that data in.


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

 

You are missing the point of using STS to create the new page to begin with. :lol:

No, you wouldn't want to add the design to the faqs.php page. If you did this, you would have to hard code your design every time you needed to make a change and it would not be controlled by STS at all. This is what STS is for. You do this in the template. Think of the faqs.php page as a blank PHP page that gets filled in by your template. You have the option of adding content into the PHP page and then using the $content tag in your template to pull in that content or you could simply add the content directly to your template page. This would depend of course what kind of content you need to have. If it is dynamic content, then you need to add your PHP script to the faqs.php page and rely on the $content tag in your template to pull in that information.

 

For example, if you have the Featured Products contribution installed and this happened to be a part of your faqs.php page (maybe an include or something), then you would need the $content tag in your template to bring that data in.

yeah yeah. laugh it up! Just kidding! :rolleyes:

 

Yeah, this just occurred to me because my category template works with the $content tag. I was thinking wait a minute... why the heck am I using the design in both places - kinda defeats the purpose! :lol: Oh goodness, my brain is just not what it used to be.

 

Now if the darn database server would come back online I can go in and fix this! I read through a search that this particular web host has a separate database server which supposedly can cause issues. I am not an IT person so I have no idea how these servers are usually setup. All they told me is that it is a widespread problem and their admins are working on it.

 

Thanks again Bill!

Edited by dcwebpixie

Share this post


Link to post
Share on other sites

Okay - the database server is back online. So, I put ONLY the content on the faqs.php page (filed under languages/english) and this is now the only PHP code for this page.

 

<?php

/*

$Id: shipping.php,v 1.4 2002/11/19 01:48:08 dgw_ Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2002 osCommerce

 

Released under the GNU General Public License

 

Use this page as a template for any new pages that you want for your store.

 

In the code below, substitute 'Newpage Template' for the actual name of your new page.

*/

 

define('NAVBAR_TITLE', 'Faqs');

define('HEADING_TITLE', 'Faqs');

 

define('TEXT_INFORMATION', '<p><b><font size="4">T</font></b>his is our newpage template.</a></p>');

?>

 

As I look at the code above it says to use this page as my template so this is probably why it pulls from this particular page? My actual template is faqs.php.html filed under sts_templates/test

 

I put the $content tag on the template called faqs.php.html.

 

However, when going to the live page it is NOT showing the template design?? It is just a blank page with the content which is what the faqs.php page has. Do I need to add more PHP code to the faqs.php page?

 

I also tried JUST adding the content to the template faqs.php.html and it just refers back to the faqs.php page under languages/english which is blank with no template design and no content (because I took it out and move to the template).

 

It just seems no matter what I do, the live page faqs.php pulls directly from the languages/english/faqs.php page.

 

This is just basic content so I would not consider it dynamic?

 

Any ideas?

Edited by dcwebpixie

Share this post


Link to post
Share on other sites

I am looking into changing the design of my info boxes and am in nheed of some help!

 

I have designed a basic box in photoshop and sliced it up into three images, top, middle and bottom. When I go to dreamweaver and make a table of 150 width with a three rows and the top in the top row, the bottom in the bottom row and the middle set as a background so that it tiles and expands down. When I test this in my browser it works great but when I upload it to my site and test it the middle image is missing and so does not tile!

 

Can anyone tell me what I am missing or doing wrong?

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

×