Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

I am in the process of changing the look of my store from a two column to a three column using css.

 

When I use STS to change over templates things look as they should and work great when viewed using firefox, however, when viewed using internet explorer instead of the products on the entry page appearing at the top as in firefox they appear way down so that you have to scroll to find them, this also happens on the contact us and may account page?

 

Does anybody know why this is just happening in internet explorer and how to fix it?

 

I have looked for the maximum numbers in admin to display only 2 rows across instead of 3 as I have now but cant find that so I am stuck as to how to correct this simple problem?

 

Cheers.

Share this post


Link to post
Share on other sites

Hi Bill, :D

 

I downloaded your New Pages Contribution and I am really confused and am wondering if you can give me some guidance. I went through the instructions but here is what I do not understand.

 

For the following:

 

Now add the following line to your “includes/modules/sts_inc/sts_user_code.php” file:

 

/*New Page Template link below. Change "newpage" to whatever your actual new page name is */

$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>';

 

QUESTION: For the section that says urlmynewpage let's say I have a Contact Page, Press Release Page, etc. Do I put an "absolute" URL here? Such as http://www.domainname.com/catalog/includes...st/contact.html?

 

Also, I am confused about what I am supposed to name my pages for Contact, FAQs, Press Releases, etc.

 

QUESTION: Can I just copy my sts_template that I used for my product pages and then rename that newpage.php and upload to catalog/includes/languages/your_language/ since it is the same layout and design?

 

QUESTION: When adding the link to the graphical navigation button, do I then use the absolute URL such as http://www.domainname.com/catalog/includes...st/contact.html?

 

QUESTION: How do I add multiple pages then in the urlnewpage ares? Do I add the actual files names in the filesnames.php code?

 

Thanks so much!!!!!! :thumbsup:

Share this post


Link to post
Share on other sites

Do you have the TD set with valign="top" ?

 

 

I am in the process of changing the look of my store from a two column to a three column using css.

 

When I use STS to change over templates things look as they should and work great when viewed using firefox, however, when viewed using internet explorer instead of the products on the entry page appearing at the top as in firefox they appear way down so that you have to scroll to find them, this also happens on the contact us and may account page?

 

Does anybody know why this is just happening in internet explorer and how to fix it?

 

I have looked for the maximum numbers in admin to display only 2 rows across instead of 3 as I have now but cant find that so I am stuck as to how to correct this simple problem?

 

Cheers.


~Tracy
 

Share this post


Link to post
Share on other sites

Hey Bill,

 

Was wondering if this can be done with STS -

 

My boss wants to not have the extra click from the category page to the product page before having the ability to "add to cart" or "buy now".

 

Is it possible, using an STS template, to put placeholders for the product information onto the category template?

 

So lets say we have a category of "Morning Sickness" and we have 3 different Master Products available, with slaves for each.

 

So we would have our template of:

Category name

Category description text ($content)

 

and then we would have - in place of just listing the "Products in this Category"

 

Master product name

Slave product - buy now

Slave product - buy now

Master Product Description

 

Master Product name

Slave product - buy now

Slave product - buy now

Master Product Description

 

etc.... - repeated for each Master product listed under this category.

 

We would need the Master Product Name, Master Product Description, Slave Product Name, Slave Product Description, Slave Product Price and buy now button to be their own STS placeholders so I could arrange the contents in a new format that they would like to see it in.

 

Is this impossible, majorly difficult or slightly difficult? I'm a bit at a loss as to how else to do this :S


~Tracy
 

Share this post


Link to post
Share on other sites
Hi Bill, :D

 

I downloaded your New Pages Contribution and I am really confused and am wondering if you can give me some guidance. I went through the instructions but here is what I do not understand.

 

For the following:

 

Now add the following line to your “includes/modules/sts_inc/sts_user_code.php” file:

 

/*New Page Template link below. Change "newpage" to whatever your actual new page name is */

$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>';

 

QUESTION: For the section that says urlmynewpage let's say I have a Contact Page, Press Release Page, etc. Do I put an "absolute" URL here? Such as http://www.domainname.com/catalog/includes...st/contact.html?

 

Lori, this code creates a new STS tag for the new page that you just created. It can be anything that you want to call it. I like $urlmynewpage since the tag is the URL of the new page with the session ID so the cart contents remain in tact. So, you can call your tag $urlfaq or $urlpress_release.

The

tep_href_link(FILENAME_NEWPAGE, '', 'SSL');<BR>

code has to be more specific. You should replace the 'NEWPAGE' with the exact name of the new page. For example; if your new page is named 'faq.php', then the code would need to look like this:

tep_href_link(FILENAME_FAQ, '', 'SSL');<BR>

.

 

Also, I am confused about what I am supposed to name my pages for Contact, FAQs, Press Releases, etc.

 

QUESTION: Can I just copy my sts_template that I used for my product pages and then rename that newpage.php and upload to catalog/includes/languages/your_language/ since it is the same layout and design?

 

No, you can not. The purpose of the Add New Page contribution is to assist you in making PHP script pages in the osCommerce fashion and have the ability to template the new page using STS. So, let's say you followed my step by step in that contribution and copied one of the original PHP script pages, say, shipping.php. You renamed the copied shipping.php to faq.php. You then uploaded this faq.php to the same location as the original shipping.php file. You then followed all of the other instructions such as adding code to the filenames.php file. Now, in STS, you can copy any of your existing template pages or create a new one and name it faq.php.html and started adding your STS tags to the page. You can now use the $urlfaq STS tag to link to your new page from your other templates.

 

QUESTION: When adding the link to the graphical navigation button, do I then use the absolute URL such as http://www.domainname.com/catalog/includes...st/contact.html?

 

Again, No, you would not. You would use the STS tag that you created for the URL. It is better to do it this way so that the shop remains dynamic (in case you change template folders, change domains, etc.) as well as it keeps the cart contents in tact by not screwing up the session ID.

 

By the way, osCommerce already has a contact_us.php script. If you wanted to template it, all you would do is create a template called contact_us.php.html and be sure you add the $content tag to the template to bring in the contact form from the script. :thumbsup:

 

QUESTION: How do I add multiple pages then in the urlnewpage ares? Do I add the actual files names in the filesnames.php code?

 

Thanks so much!!!!!! :thumbsup:

I beleive I have answered this by clearing up how to create pages in osCommerce.

Here is a tutorial on creating pages on a stock non-STS osCommerce shop: http://www.oscommerce.info/kb/osCommerce/C...g_Area/Boxes/49

 

Look that over and it should help you understand how my Add New Pages contribution makes your life a lot easier. :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
Hey Bill,

 

Was wondering if this can be done with STS -

 

My boss wants to not have the extra click from the category page to the product page before having the ability to "add to cart" or "buy now".

 

Is it possible, using an STS template, to put placeholders for the product information onto the category template?

 

So lets say we have a category of "Morning Sickness" and we have 3 different Master Products available, with slaves for each.

 

So we would have our template of:

Category name

Category description text ($content)

 

and then we would have - in place of just listing the "Products in this Category"

 

Master product name

Slave product - buy now

Slave product - buy now

Master Product Description

 

Master Product name

Slave product - buy now

Slave product - buy now

Master Product Description

 

etc.... - repeated for each Master product listed under this category.

 

We would need the Master Product Name, Master Product Description, Slave Product Name, Slave Product Description, Slave Product Price and buy now button to be their own STS placeholders so I could arrange the contents in a new format that they would like to see it in.

 

Is this impossible, majorly difficult or slightly difficult? I'm a bit at a loss as to how else to do this :S

 

Tracy,

 

This may help you out (I have used it in the past and it worked well):

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

 

It takes the user directly to the product page if the category has only one product. You may be able to modify it to your needs. Otherwise, have you tried changing the Admin settings for the Product Listing page to show the Buy Now button? That will take the user to the cart contents page and skip the Products Page altogether.


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, this code creates a new STS tag for the new page that you just created. It can be anything that you want to call it. I like $urlmynewpage since the tag is the URL of the new page with the session ID so the cart contents remain in tact. So, you can call your tag $urlfaq or $urlpress_release.

The

tep_href_link(FILENAME_NEWPAGE, '', 'SSL');<BR>

code has to be more specific. You should replace the 'NEWPAGE' with the exact name of the new page. For example; if your new page is named 'faq.php', then the code would need to look like this:

tep_href_link(FILENAME_FAQ, '', 'SSL');<BR>

.

No, you can not. The purpose of the Add New Page contribution is to assist you in making PHP script pages in the osCommerce fashion and have the ability to template the new page using STS. So, let's say you followed my step by step in that contribution and copied one of the original PHP script pages, say, shipping.php. You renamed the copied shipping.php to faq.php. You then uploaded this faq.php to the same location as the original shipping.php file. You then followed all of the other instructions such as adding code to the filenames.php file. Now, in STS, you can copy any of your existing template pages or create a new one and name it faq.php.html and started adding your STS tags to the page. You can now use the $urlfaq STS tag to link to your new page from your other templates.

Again, No, you would not. You would use the STS tag that you created for the URL. It is better to do it this way so that the shop remains dynamic (in case you change template folders, change domains, etc.) as well as it keeps the cart contents in tact by not screwing up the session ID.

 

By the way, osCommerce already has a contact_us.php script. If you wanted to template it, all you would do is create a template called contact_us.php.html and be sure you add the $content tag to the template to bring in the contact form from the script. :thumbsup:

 

I beleive I have answered this by clearing up how to create pages in osCommerce.

Here is a tutorial on creating pages on a stock non-STS osCommerce shop: http://www.oscommerce.info/kb/osCommerce/C...g_Area/Boxes/49

Thank you Bill! This really helped to explain it to me. :thumbsup:

 

Look that over and it should help you understand how my Add New Pages contribution makes your life a lot easier. :thumbsup:

Share this post


Link to post
Share on other sites

Thanks Bill - the Admin Setting to skip the Products Page altogether - am I in the right spot:

Admin->Configuration->Product Listing ? Here it asks "Display Buy Now Column" and the answer has to be a number. It is currently 6.

 

If this is the correct spot - then I will need to review various changes that were made to the product listing table as the code to show this may have been removed or commented out.

 

Thank you VERY VERY VERY MUCH though - as I think you found exactly what I need! :thumbsup:

 

 

Tracy,

 

This may help you out (I have used it in the past and it worked well):

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

 

It takes the user directly to the product page if the category has only one product. You may be able to modify it to your needs. Otherwise, have you tried changing the Admin settings for the Product Listing page to show the Buy Now button? That will take the user to the cart contents page and skip the Products Page altogether.


~Tracy
 

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

Edited by christiansees

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

I am trying to make box templates for the infoboxes but am pretty stuck! I have searched all around about how to make boxes but cant seem to find anything.

 

If I look at the information header box in dreamweaver it gives me three boxes in which to make the header, now what ever way I do it I cannot make the box stretch and have a nice round corner on the left an the right. I have tried background for the middle image and set it to 100% and 99% but they just seem to stack on top of each other instead of making one long header.

 

Does anyone know of any tutorials about how to make my boxes using tables?

Share this post


Link to post
Share on other sites
I am trying to make box templates for the infoboxes but am pretty stuck! I have searched all around about how to make boxes but cant seem to find anything.

 

If I look at the information header box in dreamweaver it gives me three boxes in which to make the header, now what ever way I do it I cannot make the box stretch and have a nice round corner on the left an the right. I have tried background for the middle image and set it to 100% and 99% but they just seem to stack on top of each other instead of making one long header.

 

Does anyone know of any tutorials about how to make my boxes using tables?

 

Gareth,

I sent you a PM


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 for the info and the link bill.

 

I have to ask tho to get the tutorials on how to make better info boxes do I need to purchase them from you?

Share this post


Link to post
Share on other sites
Thanks for the info and the link bill.

 

I have to ask tho to get the tutorials on how to make better info boxes do I need to purchase them from you?

 

No, you do not need to purchase anything from me (or anybody for that matter) to get support for the STSv4.5.8 contribution.

 

I sent you a link outside of this forum for an e-book that I thought would help you in your situation.

 

The STS User Manual that is included with the STSv4.5.8 contribution has a chapter on infobox templates.

 

:thumbsup: Here is a quick tip: Set the default infobox styles to have a transparent background and upload some transparent corner images to allow you to style your infoboxes exactly like you want. The rest will depend upon your skillset in HTML, CSS, etc.

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

Hey Bill, thanks for the help. I am still having some problems so I am going to try to go into a bit more detail.

 

1. I already have STS installed. The site looks great and I have all of category pages done using sts_template.html which I customized to match my design. This covers the category pages. For the index page I am using index.php_0.html since the main area where the content goes lays on top of a different colored background.

 

2. I installed the New Pages Contribution by what you call the Automatic Installation. I did backup my original files first though.

 

3. Next, I started with Step 5 since that is what your instructions said to do if you are using the newpage.php from the contribution.

 

4. First, I did this:

 

Download a copy of "catalog/includes/filenames.php" to your PC.

Add the following line of code:

define('FILENAME_NEW_PAGE', 'newpage.php');

There is already a line of code in the file that says:

 

/* Change the name 'FILENAME_NEWPAGE' and 'newpage.php'to whatever your new page name is. */

define('FILENAME_NEWPAGE', 'newpage.php');

So, this confused me a little bit.

 

So at the bottom of the page it now looks like this:

 

/* Change the name 'FILENAME_NEWPAGE' and 'newpage.php'to whatever your new page name is. */

define('FILENAME_NEWPAGE', 'newpage.php');

define('FILENAME_NEW_PAGE', 'newpage.php');

 

I am not sure what the difference is between what was already there and the line of code you said to put in? I see that one has an underscore with NEWPAGE and one does not?

 

So, for the line of code that I added... is this what I would put?

 

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

 

5. Next, I download a copy of "catalog/includes/modules/sts_inc/sts_user_code.php" from my store to my PC. Followed instructions below.

 

Now add the following line to your “includes/modules/sts_inc/sts_user_code.php” file:

/*New Page Template link below. Change "newpage" to whatever your actual new page name is */

$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>';

However, again there was already a line of code similar:

 

/*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, which code do I use? And what should it look like for a page called faqs.php?

 

Other questions:

 

1. How do I add multiple pages then? Do I just keep repeating this code?

 

2. In the STS template that I am using - should I just put $faqs on the Graphical Button then in order to link to the FAQs page?

 

3. For the newpage.php that is filed: catalog/includes/languages/your_language/newpage.php is this my actual template design? Do I need to do anything to this page?

 

4. My actual template for these pages will be under sts_templates/test and is the file named newpage.php.html? Is that correct? So, can I just copy and paste my code from my other template since it is the same design and layout?

 

Thanks!! :)

Share this post


Link to post
Share on other sites

Thanks bill.

 

What is confusing me about the link is when I click it, it shows me the page for 'sts tutorial for version 4', but when I scroll down it says the cost of the ebook is £16.99!!! I have had a look but cant see a free download link anywhere on the site!

 

Sorry for being slow but I have had a real good look but cant seem to find the link!

Share this post


Link to post
Share on other sites
Hey Bill, thanks for the help. I am still having some problems so I am going to try to go into a bit more detail.

 

1. I already have STS installed. The site looks great and I have all of category pages done using sts_template.html which I customized to match my design. This covers the category pages. For the index page I am using index.php_0.html since the main area where the content goes lays on top of a different colored background.

 

2. I installed the New Pages Contribution by what you call the Automatic Installation. I did backup my original files first though.

 

3. Next, I started with Step 5 since that is what your instructions said to do if you are using the newpage.php from the contribution.

 

4. First, I did this:

 

 

There is already a line of code in the file that says:

 

/* Change the name 'FILENAME_NEWPAGE' and 'newpage.php'to whatever your new page name is. */

define('FILENAME_NEWPAGE', 'newpage.php');

So, this confused me a little bit.

 

So at the bottom of the page it now looks like this:

 

/* Change the name 'FILENAME_NEWPAGE' and 'newpage.php'to whatever your new page name is. */

define('FILENAME_NEWPAGE', 'newpage.php');

define('FILENAME_NEW_PAGE', 'newpage.php');

 

I am not sure what the difference is between what was already there and the line of code you said to put in? I see that one has an underscore with NEWPAGE and one does not?

 

So, for the line of code that I added... is this what I would put?

 

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

 

5. Next, I download a copy of "catalog/includes/modules/sts_inc/sts_user_code.php" from my store to my PC. Followed instructions below.

 

 

However, again there was already a line of code similar:

 

/*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, which code do I use? And what should it look like for a page called faqs.php?

 

Other questions:

 

1. How do I add multiple pages then? Do I just keep repeating this code?

 

2. In the STS template that I am using - should I just put $faqs on the Graphical Button then in order to link to the FAQs page?

 

3. For the newpage.php that is filed: catalog/includes/languages/your_language/newpage.php is this my actual template design? Do I need to do anything to this page?

 

4. My actual template for these pages will be under sts_templates/test and is the file named newpage.php.html? Is that correct? So, can I just copy and paste my code from my other template since it is the same design and layout?

 

Thanks!! :)

Lori,

 

First: You should always be cautious doing an "automatic" install onto an already modified osCommerce shop. You could easily overwrite files that you have already put a lot of time into. :thumbsup:

 

If you did the "automatic" install, then the code would have already been placed where it needed to be. That is why you found the code already there so there is no need to enter it twice. :thumbsup:

 

I added some "dummy" code that needs to be modified for EACH new page that you create using this method.

Dummy code in BOLD BLUE:

 

/* Change the name 'FILENAME_NEWPAGE' and 'newpage.php'to whatever your new page name is. */

define('FILENAME_NEWPAGE', 'newpage.php');

 

So, if you create a faqs page, you would replace each instance of the bold blue text above with "faqs" or "FAQS" whatever applies. For example:

 

/* Change the name 'FILENAME_FAQS' and 'faqs.php'to whatever your new page name is. */

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

 

Same thing goes for the other part that you had a question about.

 

/*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>';

 

:thumbsup: The sample STS tag being created above is $urlmynewpage and $newpage. All of the non-bold, non-blue code is real and should not be replaced. All of the bold blue code is there for an example in case you are not skilled in PHP. You can replace the bold blue code with anything that you want but keep the upper & lower case in tact.

 

Yes, you would repeat this code for any additional page that you create. By doing so, you would have conformed to the osC way of adding pages and insures that all of the osC functions will perform as expected.

 

I hope that made it clearer. :-

 

Answers to your other questions above:

2. If you created it like shown above, you would use $urlfaqs for your link to the faqs.php page.

3. This is the actual PHP script that really does not do anything until your create a template page for it. So, you would create a faqs.php.html and then add this template to your template folder with your other templates.

4. This was partially answered in #3. To keep the same layout as your other templates, simply copy a template page such as your default template and rename it faqs.php.html. Now you have a faqs template page that matches the rest of your shop. Edit the page to your heart's desire.


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,

 

First: You should always be cautious doing an "automatic" install onto an already modified osCommerce shop. You could easily overwrite files that you have already put a lot of time into. :thumbsup:

 

If you did the "automatic" install, then the code would have already been placed where it needed to be. That is why you found the code already there so there is no need to enter it twice. :thumbsup:

 

I added some "dummy" code that needs to be modified for EACH new page that you create using this method.

Dummy code in BOLD BLUE:

 

/* Change the name 'FILENAME_NEWPAGE' and 'newpage.php'to whatever your new page name is. */

define('FILENAME_NEWPAGE', 'newpage.php');

 

So, if you create a faqs page, you would replace each instance of the bold blue text above with "faqs" or "FAQS" whatever applies. For example:

 

/* Change the name 'FILENAME_FAQS' and 'faqs.php'to whatever your new page name is. */

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

 

Same thing goes for the other part that you had a question about.

 

/*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>';

 

:thumbsup: The sample STS tag being created above is $urlmynewpage and $newpage. All of the non-bold, non-blue code is real and should not be replaced. All of the bold blue code is there for an example in case you are not skilled in PHP. You can replace the bold blue code with anything that you want but keep the upper & lower case in tact.

 

Yes, you would repeat this code for any additional page that you create. By doing so, you would have conformed to the osC way of adding pages and insures that all of the osC functions will perform as expected.

 

I hope that made it clearer. :-

 

Answers to your other questions above:

2. If you created it like shown above, you would use $urlfaqs for your link to the faqs.php page.

3. This is the actual PHP script that really does not do anything until your create a template page for it. So, you would create a faqs.php.html and then add this template to your template folder with your other templates.

4. This was partially answered in #3. To keep the same layout as your other templates, simply copy a template page such as your default template and rename it faqs.php.html. Now you have a faqs template page that matches the rest of your shop. Edit the page to your heart's desire.

Thank you so much Bill!! I am going to try this again. As for the Automatic Install, I actually uploaded the files one by one but backed up the original files they were replacing first. I guess that is more manual because I did not just take the folder and upload it. I am really obsessive about making sure I do not overwrite any files. I know it can happen so easily.

 

Thanks again!! You are the BEST!! :thumbsup:

Share this post


Link to post
Share on other sites

Hi I desperately need some kind souls in this community to assist my problem.

 

I am currently using STS+QTPRO and everything looks good until I did some modification on catalog/includes/boxes/searchbox.php.

 

I changed it from default (with infobox) to following,

 

?>

<!-- search //-->

<tr>

<td align="left">

<?php

echo "SEARCH ";

echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');

echo tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>';

?>

</td>

</tr>

<!-- search_eof //-->

 

The purpose is to get boxlike layout for searchbox eliminated and I put $search at the top of the page. After this, the problems occur to "ADD TO CART" button in product info page. When I press that button, it brings me to Advanced Search page.

 

I believe the problem comes from the code above as if I pasted back the default php file (OSC 2.2RC2a), the button works properly.

 

Can anyone enlighten me on this?

 

Thank you.

Share this post


Link to post
Share on other sites
Lori,

 

First: You should always be cautious doing an "automatic" install onto an already modified osCommerce shop. You could easily overwrite files that you have already put a lot of time into. :thumbsup:

 

If you did the "automatic" install, then the code would have already been placed where it needed to be. That is why you found the code already there so there is no need to enter it twice. :thumbsup:

 

I added some "dummy" code that needs to be modified for EACH new page that you create using this method.

Dummy code in BOLD BLUE:

 

/* Change the name 'FILENAME_NEWPAGE' and 'newpage.php'to whatever your new page name is. */

define('FILENAME_NEWPAGE', 'newpage.php');

 

So, if you create a faqs page, you would replace each instance of the bold blue text above with "faqs" or "FAQS" whatever applies. For example:

 

/* Change the name 'FILENAME_FAQS' and 'faqs.php'to whatever your new page name is. */

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

 

Same thing goes for the other part that you had a question about.

 

/*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>';

 

:thumbsup: The sample STS tag being created above is $urlmynewpage and $newpage. All of the non-bold, non-blue code is real and should not be replaced. All of the bold blue code is there for an example in case you are not skilled in PHP. You can replace the bold blue code with anything that you want but keep the upper & lower case in tact.

 

Yes, you would repeat this code for any additional page that you create. By doing so, you would have conformed to the osC way of adding pages and insures that all of the osC functions will perform as expected.

 

I hope that made it clearer. :-

 

Answers to your other questions above:

2. If you created it like shown above, you would use $urlfaqs for your link to the faqs.php page.

3. This is the actual PHP script that really does not do anything until your create a template page for it. So, you would create a faqs.php.html and then add this template to your template folder with your other templates.

4. This was partially answered in #3. To keep the same layout as your other templates, simply copy a template page such as your default template and rename it faqs.php.html. Now you have a faqs template page that matches the rest of your shop. Edit the page to your heart's desire.

 

Hey Bill. Okay so here is what I have. This is based on a page called faqs.php.

 

For my filenames.php page:

 

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

 

For my sts_user_code.php page:

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

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

 

I have the "template" called faqs.php.html uploaded under sts_templates/test.

 

I put the following tag on the FAQs button $urlfaqs. However, it brings up an error page.

 

What did I screw up? This seems so simple and I do not know why I am being so dense about it.

 

Thanks!!

Share this post


Link to post
Share on other sites
Hey Bill. Okay so here is what I have. This is based on a page called faqs.php.

 

For my filenames.php page:

 

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

 

For my sts_user_code.php page:

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

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

 

I have the "template" called faqs.php.html uploaded under sts_templates/test.

 

I put the following tag on the FAQs button $urlfaqs. However, it brings up an error page.

 

What did I screw up? This seems so simple and I do not know why I am being so dense about it.

 

Thanks!!

 

One other question I have is am I supposed to do anything with the includes/languages/english/newpage.php page? It is uploaded from the contribution but I have not made any changes to it.

Share this post


Link to post
Share on other sites

Newbie question:

 

I've created a Placeholder $productquantity$ to be used in product_info.

 

I want to test this value in order to decide whether to show a BUY button or NOTIFY button.

 

Nothing seems to work and my brain has shut down!

Share this post


Link to post
Share on other sites
One other question I have is am I supposed to do anything with the includes/languages/english/newpage.php page? It is uploaded from the contribution but I have not made any changes to it.

 

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.


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
Newbie question:

 

I've created a Placeholder $productquantity$ to be used in product_info.

 

I want to test this value in order to decide whether to show a BUY button or NOTIFY button.

 

Nothing seems to work and my brain has shut down!

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 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 desperately need some kind souls in this community to assist my problem.

 

I am currently using STS+QTPRO and everything looks good until I did some modification on catalog/includes/boxes/searchbox.php.

 

I changed it from default (with infobox) to following,

 

?>

 

<tr>

<td align="left">

<?php

echo "SEARCH ";

echo tep_draw_form('quick_find', tep_href_link(FILENAME_ADVANCED_SEARCH_RESULT, '', 'NONSSL', false), 'get');

echo tep_draw_input_field('keywords', '', 'size="10" maxlength="30" style="width: ' . (BOX_WIDTH-30) . 'px"') . ' ' . tep_hide_session_id() . tep_image_submit('button_quick_find.gif', BOX_HEADING_SEARCH) . '<br>' . BOX_SEARCH_TEXT . '<br><a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>';

?>

</td>

</tr>

 

 

The purpose is to get boxlike layout for searchbox eliminated and I put $search at the top of the page. After this, the problems occur to "ADD TO CART" button in product info page. When I press that button, it brings me to Advanced Search page.

 

I believe the problem comes from the code above as if I pasted back the default php file (OSC 2.2RC2a), the button works properly.

 

Can anyone enlighten me on this?

 

Thank you.

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,


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

×