Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

Got it sorted, a contribution had fully overwritten my catalog/index.php file had to just restore this file from backup and add the HTC code again.

 

let it be a lession to everyone backup, backup and then backup again.

Share this post


Link to post
Share on other sites

Thanks Bill, was just posting up fix when I seen your post, which is exactly what I was in the process of doing, you are the main man.

Share this post


Link to post
Share on other sites

I am using STS 4.5 in conjunction with the standard authorize.net payment module included with Oscommerce (not AIM). Credit card validation within Oscommerce is working fine and error messages are displayed (they do display with html break tags, but that's a minor problem at this point).

 

If there is an error from authorize net during checkout, no message is displayed, and the customer is returned to the checkout confirmation page, but the url is for the authorize.net gateway. Any idea what is going on?

Share this post


Link to post
Share on other sites
I am using STS 4.5 in conjunction with the standard authorize.net payment module included with Oscommerce (not AIM). Credit card validation within Oscommerce is working fine and error messages are displayed (they do display with html break tags, but that's a minor problem at this point).

 

If there is an error from authorize net during checkout, no message is displayed, and the customer is returned to the checkout confirmation page, but the url is for the authorize.net gateway. Any idea what is going on?

Troy,

Are you using the latest STSv4.5.8 version?

 

Also, you may want to check over at the Auhorize.net forum (forums.oscommerce.com) since I know they had some bad code in that contribution that was causing these issues that were non-sts related (with the newest STSv4.5.8 release anyway).


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

Are you using the latest STSv4.5.8 version?

 

Also, you may want to check over at the Auhorize.net forum (forums.oscommerce.com) since I know they had some bad code in that contribution that was causing these issues that were non-sts related (with the newest STSv4.5.8 release anyway).

 

Thanks for the response, Bill. No, I'm on 4.5 straight up, so first step is to upgrade. Do you think that might help with this problem?

 

I found the payment module forum under contributions and add-ons. That has some discussion, mostly about AIM though. Is there a forum specific to Authorize.net? I can't seem to find it.

Share this post


Link to post
Share on other sites
Thanks for the response, Bill. No, I'm on 4.5 straight up, so first step is to upgrade. Do you think that might help with this problem?

 

I found the payment module forum under contributions and add-ons. That has some discussion, mostly about AIM though. Is there a forum specific to Authorize.net? I can't seem to find it.

 

Troy,

It would be best for you to upgrade your STS since changes were made since your version of STS (includes/classes/sts.php) to correct issues with displaying error messages in the URL.

 

You may find the following post interesting:

http://forums.oscommerce.com/index.php?showtopic=261590

 

As far as the Authorize.net support thread:

http://forums.oscommerce.com/index.php?showtopic=199381

 

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

Does anyone know if I can turn off STS for just one page? I have a "print order" popup and STS is not causing it to work right - and the $content variable does not have anything in it. It would be easier to just add a global variable at the top of my print_order.php page to turn off STS. I looked through the documentation and couldn't find anything relevant. Any ideas?

 

Thanks.

Share this post


Link to post
Share on other sites
Does anyone know if I can turn off STS for just one page? I have a "print order" popup and STS is not causing it to work right - and the $content variable does not have anything in it. It would be easier to just add a global variable at the top of my print_order.php page to turn off STS. I looked through the documentation and couldn't find anything relevant. Any ideas?

 

Thanks.

 

How to exclude a page from being templated in STSv4.5.x:

 

In the sts_default.php file, find the following code:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

Add your php file that you want STS to exclude and it will not template that file. Note: Add the script name as follows:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "your_script_here")|| strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

That should do the trick for you.

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
How to exclude a page from being templated in STSv4.5.x:

 

In the sts_default.php file, find the following code:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

Add your php file that you want STS to exclude and it will not template that file. Note: Add the script name as follows:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "your_script_here")|| strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

That should do the trick for you.

Hope this helped,

 

Bill,

 

That worked great. Sorry about my ignorance.

 

Thank You.

Mike

Share this post


Link to post
Share on other sites

Ok.. I just about have a working STS Template but I just cant seem to figure out how to change these last 2 infoboxes.

 

http://pro-formancecycle.procommerce.ca/

 

As you can see that most of the infoboxes have been replaced except for Categories and Manufacturers... but when you cick the Accessories category the infoboxes are correct? Click the parts category and it changes to specials? HENH? I am a bit confused. None of the code has been modified.

 

Is there some other place I need to modify these 2 boxes to stop this strange behavior?

 

Please HELP!

Share this post


Link to post
Share on other sites
Ok.. I just about have a working STS Template but I just cant seem to figure out how to change these last 2 infoboxes.

 

http://pro-formancecycle.procommerce.ca/

 

As you can see that most of the infoboxes have been replaced except for Categories and Manufacturers... but when you cick the Accessories category the infoboxes are correct? Click the parts category and it changes to specials? HENH? I am a bit confused. None of the code has been modified.

 

Is there some other place I need to modify these 2 boxes to stop this strange behavior?

 

Please HELP!

I clicked on Accessories and went to cPath 19 and clicked on Parts and went to cPath 18, in other words, your links seem OK to me.

 

One note though: If you set "Use Search Engine Friendly URLS" to True in your admin, you should change it to "False". This will casue all kinds of weird events in your store.


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 clicked on Accessories and went to cPath 19 and clicked on Parts and went to cPath 18, in other words, your links seem OK to me.

 

One note though: If you set "Use Search Engine Friendly URLS" to True in your admin, you should change it to "False". This will casue all kinds of weird events in your store.

 

 

Thanks Bill. I had read ALOT about you prior to this post. Thanks again for this fantastic contrib and the HUGE amount of time spent supporting it.

 

I turned off the Search Engine Friendly URLS and the strange stuff seemed to stop. However, my manufactors box and my categories box still remain unchanged? I have created infobox_manufacturers.php.html and infobox_categories.php.html but they dont seem to work?

 

Any ideas? Is it suppose to be just that simple?

Share this post


Link to post
Share on other sites
Thanks Bill. I had read ALOT about you prior to this post. Thanks again for this fantastic contrib and the HUGE amount of time spent supporting it.

 

I turned off the Search Engine Friendly URLS and the strange stuff seemed to stop. However, my manufactors box and my categories box still remain unchanged? I have created infobox_manufacturers.php.html and infobox_categories.php.html but they dont seem to work?

 

Any ideas? Is it suppose to be just that simple?

Dave, just so we are comparing apples with apples...

  • I am assuming you are using the latest version of STS (STSv4.5.8).
  • I am assuming you are saving the infobox templates in the catalog/includes/sts_templates/*your template directory*/boxes/
  • I am assuming you do not have some custom css for these boxes that may be keeping the modifications at bay

:thumbsup: Earlier versions of STS had some issues with templating the category and manufacturer infoboxes. STSv4.5.8 will work just fine.


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
Guest

I am having a problem getting the "Credit Card payment logo infobox" working. http://addons.oscommerce.com/info/5413 with STS. I am assuming I need to add something to one of the STS files so I can call the infobox.... I am a rookie so try and bare with me. I have tried to find something on this post but it is way to big to search 200 pages and im in a hurry. Please Help

 

Thanks

Share this post


Link to post
Share on other sites
I am having a problem getting the "Credit Card payment logo infobox" working. http://addons.oscommerce.com/info/5413 with STS. I am assuming I need to add something to one of the STS files so I can call the infobox.... I am a rookie so try and bare with me. I have tried to find something on this post but it is way to big to search 200 pages and im in a hurry. Please Help

 

Thanks

See the following link:

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

 

:thumbsup: Search tip using Google:

site:forums.osCommerce.com [Contribution] sts v4 add infobox

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
Dave, just so we are comparing apples with apples...
  • I am assuming you are using the latest version of STS (STSv4.5.8).
  • I am assuming you are saving the infobox templates in the catalog/includes/sts_templates/*your template directory*/boxes/
  • I am assuming you do not have some custom css for these boxes that may be keeping the modifications at bay

:thumbsup: Earlier versions of STS had some issues with templating the category and manufacturer infoboxes. STSv4.5.8 will work just fine.

 

 

Ok, I updated to code to ensure that I am using 4.5.8 ... All i did was copy the files. I had a look throught the manual changes and it appears they were all done.

 

I have now deleted all the boxes and only have infobox.php.html in the /catalog/includes/sts_templates/mytemplatedir/boxes

 

I have added the word TEST to the box and deleted the CSS files so that nothing could override the infobox... as you can see now at http://pro-formancecycle.procommerce.ca everything shows the test infobox except categories and manufacturers, which still remain unchanged! ARG

Share this post


Link to post
Share on other sites

Hi there,

I have installed and sort of figured out how to do my own template with sts.

i have a simple but a major question, and if I get this right, i will probably be able to do anything with sts.

 

suppose i am putting $searchbox somewhere on mypage. as you know the output of the searchbox is a vertical table, where the heading, box and details are below one another.

i want to change the output of searchbox so that what i have is just the search field and a search button right next to each other.

the same with the informationbox, i want to change the output so that the contents of the information box are listed next to eachother but not under each other like this;

 

Shipping & Returns |Privacy Notice |Conditions of Use |Contact Us

 

but not

 

Shipping & Returns

Privacy Notice

Conditions of Use

Contact Us

 

i'd be really happy if you could help.

 

regards,

alp

Edited by ozenalp

Share this post


Link to post
Share on other sites
Ok, I updated to code to ensure that I am using 4.5.8 ... All i did was copy the files. I had a look throught the manual changes and it appears they were all done.

 

I have now deleted all the boxes and only have infobox.php.html in the /catalog/includes/sts_templates/mytemplatedir/boxes

 

I have added the word TEST to the box and deleted the CSS files so that nothing could override the infobox... as you can see now at http://pro-formancecycle.procommerce.ca everything shows the test infobox except categories and manufacturers, which still remain unchanged! ARG

I just visited your site and it appears you are able to template the two infoboxes.


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

I have installed and sort of figured out how to do my own template with sts.

i have a simple but a major question, and if I get this right, i will probably be able to do anything with sts.

 

suppose i am putting $searchbox somewhere on mypage. as you know the output of the searchbox is a vertical table, where the heading, box and details are below one another.

i want to change the output of searchbox so that what i have is just the search field and a search button right next to each other.

the same with the informationbox, i want to change the output so that the contents of the information box are listed next to eachother but not under each other like this;

 

Shipping & Returns |Privacy Notice |Conditions of Use |Contact Us

 

but not

 

Shipping & Returns

Privacy Notice

Conditions of Use

Contact Us

 

i'd be really happy if you could help.

 

regards,

alp

 

Your search scenario would be pretty simple. Actually, the knowledge base has an example you could use but here one as well:

 

<div align="right">
	  <table width="" cellspacing="0" cellpadding="0" border="0">
	   <tr><form name="advanced_search" action="./advanced_search_result.php" method="get">
		<td bgcolor="#bcbcbc">
		 <table width="100%" cellpadding="0" cellspacing="0" bgcolor="white">
		  <tr>
		   <td class="navigation"> </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="20" maxlength="30" class="searchForm" style="width: 95px"></td>
		   <td align="center"> <input type="image" src="$templatedir/images/english/buttons/button_search.gif" border="0" alt="Search" title=" Search " name="Search"></td>
		  </tr>
		 </table>
		</td>
	   </form></tr>
	  </table>
	 </div>

 

As far as the Information box, you could just leave out the $content tag altogether in your infobox_information.php.html template and insert your own links for each page within that infobox template.


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 just visited your site and it appears you are able to template the two infoboxes.

 

 

Hrmm.... Welll how come when I create infobox_categories.php.html in /%templatedir/boxes nothing changes? I have deleted all .css files and I still cant seem to modfify that box or the Manufacturers. All the other boxes no problems!

 

Am i missing something here? I have read teh manual many times and surfed most of this forum! THanks Bill.

Share this post


Link to post
Share on other sites

1st Thing, thanks to OsCommerce for the great application.

FYI, im super Noob & still newbie about e-commerce & php

 

Mmm.. im just install Standard OS application with Grey interface, but kinda no so nice the template.

I saw this thread but i dont know how to download this pack? Got *Zip file or what?

I go every where like this link http://www.oscommerce.com/community/contributions,1524

but dont know how to download.

 

How i can install this template?

Share this post


Link to post
Share on other sites
1st Thing, thanks to OsCommerce for the great application.

FYI, im super Noob & still newbie about e-commerce & php

 

Mmm.. im just install Standard OS application with Grey interface, but kinda no so nice the template.

I saw this thread but i dont know how to download this pack? Got *Zip file or what?

I go every where like this link http://www.oscommerce.com/community/contributions,1524

but dont know how to download.

 

How i can install this template?

Yes, that is the correct download site for STSv4.5.8. Once there, you should see a download link to the right (has a green downward arrow in it). Download the zip file to your computer, unzip, and then follow the instructions included in the HTML file included. You will basically FTP the files in the contribution over your existing files on your server.

 

Hope that helps,


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
Hrmm.... Welll how come when I create infobox_categories.php.html in /%templatedir/boxes nothing changes? I have deleted all .css files and I still cant seem to modfify that box or the Manufacturers. All the other boxes no problems!

 

Am i missing something here? I have read teh manual many times and surfed most of this forum! THanks Bill.

 

When I went to your site, I viewed text such as "test #1" in each of your category and manufacturer boxes so I assumed you were able to template them to a degree.


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
When I went to your site, I viewed text such as "test #1" in each of your category and manufacturer boxes so I assumed you were able to template them to a degree.

 

#@*(&)(#*$& arf! I just did a terminal to another console to confirm your findings and VOILA! My changes were there with "Test" in the box... Maybe my cache? I will clear it and do some more testing but it sure looks like you were right again. Cheers!

 

Fantastic contrib. Your assistance is very much appreciated.

Share this post


Link to post
Share on other sites
When I went to your site, I viewed text such as "test #1" in each of your category and manufacturer boxes so I assumed you were able to template them to a degree.

 

Ok.... Here we go.. The first time I hit the page it was fine... Hit it again or any other page... and it reverts back...Cleared the cache and temporary files and still no luck... Seems it is different for index and sts_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

×