Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

If you have SSL image problems, and happen to have STS installed, the easy solution is to blame STS.

 

to be clear, I had no SSL problems until I added STS, and I have no problems with images or links that are in the content from the original pages...just had a problem with images and links on the sts template page

Link to comment
Share on other sites

to be clear, I had no SSL problems until I added STS, and I have no problems with images or links that are in the content from the original pages...just had a problem with images and links on the sts template page

Ryan, my comments sounded a little rough but they were not meant to be. :blush:

I was just pointing out that image links are usually the culprit when it comes to SSL problems, not any code changes that are implemented by installing STS.

 

I do think that while designing your template, it is probably easier to use absolute links so that you can preview your template. However, these should always be changed over to relative links before uploading to your store. :thumbsup:

 

When someone mentions that they did not have any issues until STS then it implies that STS has some errant code and is to blame. STS, as a osCommerce add-on, has no control of how a user goes about using/abusing the contribution. STS assumes that it is being installed upon solid osCommerce core code and not upon any other add-ons that were not created with other contributions in mind. STS works great with the "properly coded" add-ons available.

 

With that said, I suggest that anyone who has SSL issues, to first look at the code of thier shop. It is most likely due to image or external links which could so happen to be in the STS template that they created.

 

STS out of the box does not have any SSL issues.

 

Hope that helps anyone in the future who may be dealing with SSL issues. :-

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Hi Bill, I have two quick questions for you, just to make sure I am doing things properly.

 

1) If I set any files for use for templates "Files for normal template" and I add myfile.php should I also add a copy of that file in the includes/modules/sts_inc/ folder correct?

 

2) If I make any changes to the general.php file located in includes/functions/ folder should I also make the same changes in the general.php file located in includes/modules/sts_inc/?

 

Yes to #1.

 

No to #2. The sts_inc/general.php file creates tags to be used in your template for "general" or all purpose osCommerce functions like banners, file names, etc.

 

:thumbsup: If you make any modifications to your product_info.php file, you should make the same changes in the sts_inc/product_info.php file as well.

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

Link to comment
Share on other sites

Ive got strange problem i cant figure out

 

for some reason with a STSv4.5.8 install on RC2a only the default sts_template.html is loading and product_info.php.html wont load

 

I have the products_info module in the admin enabled:

am i missing something here?

 

i have a products_info.php .html file in the template folder

on product_info.php/cPath/2_20/products_id/23?sts_debug=debug

 

i have the debug switched on and it reports that its using the default template

 

anyone have any ideas im getting desperate

 

This worked fine under STS4.1 and all ive done is apply the RC2a patches and updated STS to the latest version

Link to comment
Share on other sites

 

Alba, it works with osC RC2a. Take a look in the contribution under the "doc" folder. Follow the directions listed in the file named: module_product_info.html

  1. Basically you must enable the Product Info module in the admin.
  2. You must follow the naming syntax for your template names
  3. If it is a content template, then it must be uploaded to the catalog/includes/sts_templates/*your-template-folder*/content

I just tested this out on a new RC2a install to be sure it worked. :thumbsup:

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Alba, it works with osC RC2a. Take a look in the contribution under the "doc" folder. Follow the directions listed in the file named: module_product_info.html
  1. Basically you must enable the Product Info module in the admin.
  2. You must follow the naming syntax for your template names
  3. If it is a content template, then it must be uploaded to the catalog/includes/sts_templates/*your-template-folder*/content

I just tested this out on a new RC2a install to be sure it worked. :thumbsup:

 

I have it installed no problems at all, do i need to have product_info.html files in a subfolder /content?

 

ive always had them directly in the template folder

 

settings for the products module are:

 

product info templates and content templates (v1.0.6)

 

Use template for product info page

true

 

Enable STS3 compatibility mode

true

 

Files for normal template

sts_user_code.php;headertags.php

 

Files for content template

sts_user_code.php;product_info.php;headertags.php

 

ive double checked the files using beyond compare and i just cant figure out why its not working

Link to comment
Share on other sites

I have it installed no problems at all, do i need to have product_info.html files in a subfolder /content?

 

ive always had them directly in the template folder

 

settings for the products module are:

 

 

 

ive double checked the files using beyond compare and i just cant figure out why its not working

Change the STSv3 compatibility to FALSE.

Did you take a look at the HTML file in the doc folder that I suggested earlier? It explains it really well on how STS will look for your specific product template.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

I'm sorry if this has already been answered, I've been searching all day but I couldn't find it. If it has, can anyone point me in the right direction of the location of the answer?

 

Is there a way to make the Stock Display contribution work wit STS 4.5.8 ?

 

It works wthout STS, but I don't know how to change the STS files in the modules/sts and modules/sts_inc folders. I'm really not good with PHP...

Link to comment
Share on other sites

I'm sorry if this has already been answered, I've been searching all day but I couldn't find it. If it has, can anyone point me in the right direction of the location of the answer?

 

Is there a way to make the Stock Display contribution work wit STS 4.5.8 ?

 

It works wthout STS, but I don't know how to change the STS files in the modules/sts and modules/sts_inc folders. I'm really not good with PHP...

You would not need to make any edits in the sts_inc/product_info.php file as long as you do not plan to make any product "content" templates (meaning you intended to make a template for the stuff that is brought in with the $content tag).

 

:thumbsup: STS would pick up the edits that were made to the stock product_info.php file (modified by the contribution you listed) without any extra coding required.

 

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

Link to comment
Share on other sites

Hey Bill!

 

A quick (and hopefully easy) question: How do I name the special template file for a logged in customer? On my index.php_0.html I have (amongst other things) two buttons - Register & Login.

When a customer has logged in I don´t want the buttons to be visible and some different text shown as well.

 

I did try index.php_00.html and index.php_01.html but failed.

 

So a certain index.php_x.html for the logged in customers is what I am after... Any ideas?

 

Thanks!

Link to comment
Share on other sites

Bill, Thank you for helping me in a different thread. I have been rattling through here but I am obviously a step or two behind...

You wrote before

To make an STS template out of a purchased osCommerce template,

 

1. Install the store in a test directory (meaning, follow all of the installation instructions that came with your purchased template, but be sure to do this in a test osCommerce scenario. You will use these files in your final "live" osCommerce store. DONE

2. Open the store in your browser DONE

3. View the Source Code and Save the html code to your computer DONE

4. Use this html code as your default template (sts_template.html) and start replacing the different elements with their corresponding STS Tags.

 

I made the sts_template.html and copied this to the includes/sts_templates folder. I have not yet done any STS Tags. I am not sure what else to copy from the TEST environment to the live environment without breaking something.

 

5. Use the boxes class (includes/classes/boxes.php) from the template you bought

I have put boxes.php from the template in includes/classes/boxes.php

 

6. Modify the external stylesheet from the purchased template to your needs (if needed)

Not yet done this.

 

Have you before or is there a different reply/thread that says what else I need to move from the test environment to my live environment?

or do I just need to do the STS Tags?

 

Thank you

Link to comment
Share on other sites

Bill, Thank you for helping me in a different thread. I have been rattling through here but I am obviously a step or two behind...

You wrote before

To make an STS template out of a purchased osCommerce template,

 

1. Install the store in a test directory (meaning, follow all of the installation instructions that came with your purchased template, but be sure to do this in a test osCommerce scenario. You will use these files in your final "live" osCommerce store. DONE

2. Open the store in your browser DONE

3. View the Source Code and Save the html code to your computer DONE

4. Use this html code as your default template (sts_template.html) and start replacing the different elements with their corresponding STS Tags.

 

I made the sts_template.html and copied this to the includes/sts_templates folder. I have not yet done any STS Tags. I am not sure what else to copy from the TEST environment to the live environment without breaking something.

 

5. Use the boxes class (includes/classes/boxes.php) from the template you bought

I have put boxes.php from the template in includes/classes/boxes.php

 

6. Modify the external stylesheet from the purchased template to your needs (if needed)

Not yet done this.

 

Have you before or is there a different reply/thread that says what else I need to move from the test environment to my live environment?

or do I just need to do the STS Tags?

 

Thank you

OK, you are almost there...I am assuming that you have two separate stores at the moment, your test store (the purchased template) and your final store (store that will be using STS).
  1. Install STS on the final store if you haven't already done so.
  2. Configure STS in the admin menu and set the template folder to "full" (use this one just to get you started...you can change the template folder later.
  3. Upload your custom template (the test store source code for the main page) to the catalog/includes/sts_templates/full folder and name it sts_templates.html (this will be your default template)
  4. Add the $content tag to the area of your template that has the main content (this is usually the middle column in a stock osC store)
  5. Add other tags to your template to replace static content. For example, the source code in the template may have a "My Account" image. Add a link from this image that would point to the appropriate tag. Look at the STS User Manual for the list/definitions of the "out of the box" tags available.
  6. Make sure you have the followin at the top of your template so that STS will function correctly:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html $htmlparams>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <!--$headcontent-->
     <link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css">
    </head>


    The above code assumes that your stylesheet.css file is in your templates folder. In my example above, that would be: catalog/includes/sts_templates/full/stylesheet.css

  7. That's it.

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

Link to comment
Share on other sites

OK, you are almost there...I am assuming that you have two separate stores at the moment, your test store (the purchased template) and your final store (store that will be using STS).
  1. Install STS on the final store if you haven't already done so.
  2. Configure STS in the admin menu and set the template folder to "full" (use this one just to get you started...you can change the template folder later.
  3. Upload your custom template (the test store source code for the main page) to the catalog/includes/sts_templates/full folder and name it sts_templates.html (this will be your default template)
  4. Add the $content tag to the area of your template that has the main content (this is usually the middle column in a stock osC store)
  5. Add other tags to your template to replace static content. For example, the source code in the template may have a "My Account" image. Add a link from this image that would point to the appropriate tag. Look at the STS User Manual for the list/definitions of the "out of the box" tags available.
  6. Make sure you have the followin at the top of your template so that STS will function correctly:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html $htmlparams>
    <head>
    <meta http-equiv="Content-Language" content="en-us">
    <!--$headcontent-->
     <link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css">
    </head>


    The above code assumes that your stylesheet.css file is in your templates folder. In my example above, that would be: catalog/includes/sts_templates/full/stylesheet.css

  7. That's it.

Hope that helps,

Thanks Bill,

I am getting there.

 

I have the 2 stores, 1my live store with STS now and the 2 Test store from template people

 

Do I need to copy any other files or directories like images/* from the Test store to my live store?

Link to comment
Share on other sites

Thanks Bill,

I am getting there.

 

I have the 2 stores, 1my live store with STS now and the 2 Test store from template people

 

Do I need to copy any other files or directories like images/* from the Test store to my live store?

Yes, and you may need more, depending upon the template variables and such so keep it handy until you have drained it of its resources. :thumbsup:

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Hi Bill, as a non coder I need a wysiwyg editor, how does this work with STS v4.5.8 and how do I hook it up, as I need it, LOL.

 

Also how do I place a banner add on my site (every page at the bottom).

 

many thanks

Neil

 

You can open your sts_template.html in a wysiwyg editor, but that doesnt help with the $content-bit, I guess... I have a test-website set up on the internet to test various things and most people have a test-setup on their local computer. You can check out xampp for that purpose. If I want to do some nice stuff in the products description, I use MS frontpage 2003 to make what I want, than I go to the tab "code" and copy and paste the bit I need into the product description.

 

I hope that gets you in the right direction...

 

Kind regards,

Gina

Edited by Jan Zonjee
Link to comment
Share on other sites

Yes, and you may need more, depending upon the template variables and such so keep it handy until you have drained it of its resources. :thumbsup:

 

I have not been getting too far. The front page said I needed to edit the index.php.html so I copied the sts_template.html to index.php.html and I am modifying this file.

 

Is this the wrong thing to do?

Link to comment
Share on other sites

Hi Bill,

 

A quick question for you. I want to have my logo across the entire top of the shop - I have set my template to be 80% of the window, but I can't get my image to fill the entire top section, my code looks like this:

 

</style></head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<table border="0" width="100%" cellspacing="0" align="center" cellpadding="0">
<tr class="header">
	<td valign="middle">
		<div align="center"><img border="0" src="images/headerlogo.jpg">
			<a href="$urlmyaccount"></a>
			<a href="$urlcartcontents"></a>
		  <a href="$urlcheckout"></a> </div></td>
</tr>
</table>

 

I have tried changing the width for this from 80% to 100% but no change.

 

Thanks

Link to comment
Share on other sites

Thats whats making me pull out my hair right now. Everything I need assigned to a class is assigned to a class, and sometimes it displays right, sometimes it doesn't.

 

I've checked the source code thru firefox and cleaned up where I can, but its still not formatting right...

and to add to the confusion, I've just found that my Mac has no problems displaying it at all.

 

Thanks for the suggestion, tho.

 

Ok - is there any logic to when it does vs when it does not display properly? Like, it always works on the index page, but never works on a product page for example? If there is a logic to it - then the problem is most likely either in the php page or the template for that section of your site.

 

If there is NO logic whatsoever to when it decides to display properly or not, then my guess would be that there are two different classes in CSS that are both trying to regulate the same text area. Most of the site is already setup on CSS for fonts just off the basic osC installation - so you will find references to classes in the php for each page or each infobox and even in the includes/classes/boxes.php file.

 

I know when I was first setting up my first osC site with STS, I was creating classes to govern certain text areas or certain div's and then learned later that the area I was trying to control with my classes was also being controlled through an osC class ;)

 

Hopefully the tools mentioned will help you to determine where the discrepancy is :thumbsup:

~Tracy
 

Link to comment
Share on other sites

Thanks CharlieSummers,

 

I won't use Windows for the hosting server either, but it is the OS I use on the computers I design and develop websites on. So when I am working on the website I am in a Windows environment (with an apache server setup for localhost testing) and then when I upload the site to the server it is on a *nix box.

 

I've not yet found a way to search through the entire osC site files for a specific tag or reference, etc... so thought the grep-r sounded useful ;)

 

 

I wouldn't use Windows for a server, prefering a stable operating system. But if I did, I'd go here.

~Tracy
 

Link to comment
Share on other sites

In order to sort this by category, you need to get the category_id from the database.

 

The TABLE_PRODUCTS_TO_CATEGORIES gives the ability to pull the categories_id for each products_id

 

I have not tested this code - but a start would be something like this:

 

$new_products_query = tep_db_query("select p.products_id, p2c.categories_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c using(products_id) " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id order by p2c.categories_id, p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

 

As I said, I've not tested the SQL in the above, but it is roughly what you would need to do in order to sort the new products by category id. If you don't care about sorting also by date added then you can remove the comma and the p.products_date_added from the end of the query. It usually takes me a couple tries to type up a working left join so if it you try it and get errors and don't know how to fix it let me know and I'll dig into my code and see what I did wrong :thumbsup:

 

 

Hi iam modifying the new_products.php Module to sort the products by categories. And i get stuck here.

 

$new_products_query = tep_db_query("select p.products_id, p.products_image, p.products_tax_class_id, p.products_price, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and pd.language_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id order by p.products_date_added desc limit " . MAX_DISPLAY_NEW_PRODUCTS);

 

i have tried to modify the order by but i dont get the results right. Any clue?

Edited by TracyS

~Tracy
 

Link to comment
Share on other sites

How to add new section in oscommerce-----------

 

i need help........i am new commer in oscommerce......i installed oscommece and add STS 4.5.8 and (rc2).now am intrested..its realy fantastic.

so i have a template .in that i need to list news and event at at right side and when clicked on each news its display on(news wil add admin side ).how can i put this..........

is ther any body have any idea then plz share with me.......

 

 

My needs

1) Adding 3 or more news thru admin

2) want to list that in user side (right side (its ok))

3) when clicked on specific news on the right side that wil display on

 

 

if u don't mine plz explain with step by step instruction..........plz.. am new commer in oscomerce and php

Meenu

Link to comment
Share on other sites

So when I am working on the website I am in a Windows environment (with an apache server setup for localhost testing) and then when I upload the site to the server it is on a *nix box.

 

Your shared hosting company should allow you shell access (SSH, not telnet) to your server area; if it doesn't, you should find another hosting partner. (I routinely edit directly on the server with Crimson Editor - other editors also allow editing files via FTP, eliminating Windows...er...anomalies.)

 

(If you have many websites you manage, you should consider a colo and root the box; I cannot tell you how many times managing my own machine has saved me from someone else's knuckleheaded mistakes...of course, I then have to deal with my own knuckleheaded mistakes...)

 

As a general question about the STS system (not targeted to TracyS), can I assume there is no direct answer to my earlier question on acquiring direct access to the InFoBox object's data and methods through the template? (While I am currently trying to find the frelling title of the frelling infobox, having access to the entire object would eliminate future issues...)

Edited by CharlieSummers
Link to comment
Share on other sites

Hi Bill,

 

A quick question for you. I want to have my logo across the entire top of the shop - I have set my template to be 80% of the window, but I can't get my image to fill the entire top section, my code looks like this:

 

</style></head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">

<table border="0" width="100%" cellspacing="0" align="center" cellpadding="0">
<tr class="header">
	<td valign="middle">
		<div align="center"><img border="0" src="images/headerlogo.jpg">
			<a href="$urlmyaccount"></a>
			<a href="$urlcartcontents"></a>
		  <a href="$urlcheckout"></a> </div></td>
</tr>
</table>

 

I have tried changing the width for this from 80% to 100% but no change.

 

Thanks

Lotti,

I'm assuming you are using a header include template and possibly a footer template as well? If so, then either your main template (your middle template) or the footer template could be throwing it all off. Everything needs to line up.

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Morning. I am using sts (wonderful system - I'm liking it) and things are going well except for one thing...

 

I have "Use template for infoboxes" set to true in the modules and that does, indeed, seem to be working - I change boxes/infobox.php.html and all the infoboxes change - excellent. However, it also changes the box where the list of products show when you click on the category. I have modified boxes/infobox_product_listing.php.html but it doesn't seem to effect anything - it's almost as if STS doesn't believe the file is there.

 

So...does anybody have any suggestions as to what I can do to be able to modify the box that lists the products?

 

Thanks

 

M.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...