Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

When I mouse over the Product Name to sort and look at the path at the bottom of the browser it says:

 

/catalog/categories.php?cPath=1_22&page=1&sort=2d (this is preceeded by the clients domain name but I cannot list it here)

 

For the Price sort when I mouse over it it says at the bottom browser:

 

/catalog/categories.php?cPath=1_22&page=1&sort=3a

 

Any ideas? My thinking at first was that there must be a categories.php page under /catalog. However, there isn't.

 

Thank you

Link to comment
Share on other sites

Thanks for the reply bkellum, glad to know I have found the correct sts thread at last!

 

Now forgive me for not being quick on the uptake regarding infoboxes but I am trying to get my head arouns how they work!

 

I had a look in admin and saw where you can make the infoboxes 'true' or 'false' and when I tested true nothing happened as expected but at least I know how to switch them on and off.

 

When it comes to making the boxes etc, I havent got a clue!! Do I just need to edit the html template files? What happens should I wish to design an infobox in say photoshop, can I make that an infobox and if so how!?

 

Also, what is the path to the infobox files so that I can change the html etc as I have had a good look but cannot find them!

 

I have had a read of the install instructions but they have not shed light on how to do it, well not to me anyway!

 

Cheers!

Link to comment
Share on other sites

 

Lori, it easier (for me anyway) to deal with one question at a time (isn't real life like that...yeah right :lol: ).

You should have all of your templates in your templates folder. STS comes with two sample template folders. You can have as many as you want but can only use one template folder at a time. Inside the template folder, you should have the following:

  • All of your sites template pages (sts_template.html, index.php.html, index.php_0.html, etc.)
  • A folder for infobox templates called "boxes" (if you plan to use infobox templates)
  • A folder for content templates called "content" (if you plan to use content templates)

The STS User Manual goes into detail on how to name your templates. Naming is critical since STS uses the name to know what template to use when a script is being called. For example, if you wanted to template the shipping.php page, you would name it shipping.php.html and place this template in your template folder. If you wanted to have a "home" page template that would be different than all other pages, then you would name it index.php_0.html and save it in your template folder.

 

STS template structure (in more detail):

 

It is best to save your default template file as sts_template.html inside whatever template folder you are using (full, test, my_templates, etc.). Then, you would stipulate this in the STS “Default” module in the admin panel. The “sts_template.html” file would be used for all pages in your shop that you have not created a custom template for.

 

Now, to answer your question about custom templates for specific pages: First you need to understand how STS “searches” to see if a custom template is available. I have created a flow chart in the STS User Manual to show how this works. As an overview of the process, it works like this:

  • If you wanted to create a template for Category 3, which is the “out of the box” osCommerce “Hardware” category, you would create a template and save it as “index.php_3.html”.
  • Now if you wanted to create a template for a sub-category within a category you would do the following (using the example above):

Create a template and save it as “index.php_3_9.html” to be used as a template for the “out of the box” category “Hardware” and sub-category “Mice”. Now this template will be used each time a visitor opens up the “mice” sub-category (sub-category 9) in your store. Keep in mind that the template for Category “Hardware” (Category 1) is totally independent of the template you just created for sub-category 9 "Mice". I hope by now you are seeing the pattern that STS uses to find templates.

 

So when a visitor opens a page in your store, such as a product page for product ID 26, STS will first see if there is a “index.php_1_9_26” template. If there is such a template, STS will use it. If not, STS will continue the search but this time look for the next higher up template which would be “index.php_1_9.html”. If there is such a template, STS will use it. If not, STS will continue the search but this time look for the next higher up template which would be “index.php_1.html”. If there is such a template, STS will use it. If not, STS will end it’s search and use the “default” template, which unless you have changed the default settings would be “sts_template.html”.

 

I hope this has helped you in understanding how the templating structure works with STS.

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

Thanks for the reply bkellum, glad to know I have found the correct sts thread at last!

 

Now forgive me for not being quick on the uptake regarding infoboxes but I am trying to get my head arouns how they work!

 

I had a look in admin and saw where you can make the infoboxes 'true' or 'false' and when I tested true nothing happened as expected but at least I know how to switch them on and off.

 

When it comes to making the boxes etc, I havent got a clue!! Do I just need to edit the html template files? What happens should I wish to design an infobox in say photoshop, can I make that an infobox and if so how!?

 

Also, what is the path to the infobox files so that I can change the html etc as I have had a good look but cannot find them!

 

I have had a read of the install instructions but they have not shed light on how to do it, well not to me anyway!

 

Cheers!

Gareth,

 

STS Infobox Templates:

Infobox templates should be located in your template folder (for example: Look in the sample "full" folder: catalog/includes/sts_templates/full/boxes).

 

In order to use infobox templates, you need to have at least one template called infobox.php.html, it's the default template that will be used for all other boxes that don't have a specific template.

 

Besides the default infobox template, you can create templates for specific boxes. Look in catalog/includes/boxes/ for the script filename of the box you want to create a template for.

 

For example: To create a template for information.php, you would create an infobox template and save it in catalog/includes/sts_templates/*your template folder*/boxes/infobox_information.php.html. This template would include both the header and the content of the information box.

 

Boxes that appear in the content part of the store, such as "also purchased" or "New for products for..." can also have their own template. Look at their filename in catalog/includes/modules to get the correct naming of the box.

 

Now, the boxes class is used in other places in the store and may cause a problem by using the default infobox template in places where it should not.

 

For example, view the shopping cart when there is no product listed. There is a box there, but it is not an infobox, the box is created directly from the catalog file catalog/shopping_cart.php . You can create a template for this box too.

These templates need a special naming structure since they are integrated into the catalog script pages. For these infoboxes such shopping_cart.php, you would call them catalog/includes/sts_templates/*your template folder*/boxes/catalog_shopping_cart.php.html .

 

Same problem if you go to product_info.php for an unexisting product, a box is displayed with some text inside. Make an infobox catalog/includes/sts_templates/*your template folder*/boxes/catalog_product_info.php.html.

 

 

That's a good start. If you look at the STS User Manual, you'll see that you can also create a different infobox header for each box, but this is optional. It helps when only the header changes between boxes, you can make one header template for each box and only one infobox.php.html for all.

 

:thumbsup: The boxes folder inside the STS template folder "full" will give you some examples.

 

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

Lori, it easier (for me anyway) to deal with one question at a time (isn't real life like that...yeah right :lol: ).

You should have all of your templates in your templates folder. STS comes with two sample template folders. You can have as many as you want but can only use one template folder at a time. Inside the template folder, you should have the following:

  • All of your sites template pages (sts_template.html, index.php.html, index.php_0.html, etc.)
  • A folder for infobox templates called "boxes" (if you plan to use infobox templates)
  • A folder for content templates called "content" (if you plan to use content templates)

The STS User Manual goes into detail on how to name your templates. Naming is critical since STS uses the name to know what template to use when a script is being called. For example, if you wanted to template the shipping.php page, you would name it shipping.php.html and place this template in your template folder. If you wanted to have a "home" page template that would be different than all other pages, then you would name it index.php_0.html and save it in your template folder.

 

STS template structure (in more detail):

 

It is best to save your default template file as sts_template.html inside whatever template folder you are using (full, test, my_templates, etc.). Then, you would stipulate this in the STS “Default” module in the admin panel. The “sts_template.html” file would be used for all pages in your shop that you have not created a custom template for.

 

Now, to answer your question about custom templates for specific pages: First you need to understand how STS “searches” to see if a custom template is available. I have created a flow chart in the STS User Manual to show how this works. As an overview of the process, it works like this:

  • If you wanted to create a template for Category 3, which is the “out of the box” osCommerce “Hardware” category, you would create a template and save it as “index.php_3.html”.
  • Now if you wanted to create a template for a sub-category within a category you would do the following (using the example above):

Create a template and save it as “index.php_3_9.html” to be used as a template for the “out of the box” category “Hardware” and sub-category “Mice”. Now this template will be used each time a visitor opens up the “mice” sub-category (sub-category 9) in your store. Keep in mind that the template for Category “Hardware” (Category 1) is totally independent of the template you just created for sub-category 9 "Mice". I hope by now you are seeing the pattern that STS uses to find templates.

 

So when a visitor opens a page in your store, such as a product page for product ID 26, STS will first see if there is a “index.php_1_9_26” template. If there is such a template, STS will use it. If not, STS will continue the search but this time look for the next higher up template which would be “index.php_1_9.html”. If there is such a template, STS will use it. If not, STS will continue the search but this time look for the next higher up template which would be “index.php_1.html”. If there is such a template, STS will use it. If not, STS will end it’s search and use the “default” template, which unless you have changed the default settings would be “sts_template.html”.

 

I hope this has helped you in understanding how the templating structure works with STS.

 

I am looking at this and now I am worried that I screwed up and may have to do a reinstall. Here comes the anxiety attack. :x I put in my categories as Music, DVD, and Best Sellers. Then under Music there are categories such as Rock, Pop, etc. That is where the actual products are. Same goes for DVD and Best Sellers. I deleted out the default Hardware, Software and DVD Movies. Was that wrong? How do I know which category is what number? Such as you mentioned Hardware is Categroy 3 index.php_3.html?

Edited by dcwebpixie
Link to comment
Share on other sites

I am looking at this and now I am worried that I screwed up and may have to do a reinstall. Here comes the anxiety attack. :x I put in my categories as Music, DVD, and Best Sellers. Then under Music there are categories such as Rock, Pop, etc. That is where the actual products are. Same goes for DVD and Best Sellers. I deleted out the default Hardware, Software and DVD Movies. Was that wrong? How do I know which category is what number? Such as you mentioned Hardware is Categroy 3 index.php_3.html?

 

Okay - so I am seeing in the browser how the IDs work and the Category numbers.

 

For instance under MUSIC - Country - the number is categories.php?cPath=1&cID=22 so that would be Category 1, ID 22, is that right? So, if I have a different template for the category I would use index.php_1_22.html?? I tried that using a different color table background just to experiment and it did not work so I guess I am doing it wrong.

 

I am now wondering if because I deleted the default categories Hardware, DVD movies, etc. this is why the Product and Price sort is not working.

 

Ah well... if I have to do a fresh install I guess it is not a huge deal. I had not entered in all of the product details so it is not a huge loss.

Edited by dcwebpixie
Link to comment
Share on other sites

Okay - so I am seeing in the browser how the IDs work and the Category numbers.

 

For instance under MUSIC - Country - the number is categories.php?cPath=1&cID=22 so that would be Category 1, ID 22, is that right? So, if I have a different template for the category I would use index.php_1_22.html?? I tried that using a different color table background just to experiment and it did not work so I guess I am doing it wrong.

 

I am now wondering if because I deleted the default categories Hardware, DVD movies, etc. this is why the Product and Price sort is not working.

Lori,

No, you can create and delete categories at will. Using your example, the category template would be index.php_1.html as the category ID is 1. If you wanted a different template for the subcategory "Country", then the template name would be index.php_1_22.html.

 

:thumbsup: You can easily click on any of your categories and products in the admin and you will see the ID in the URL.

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

Lori,

No, you can create and delete categories at will. Using your example, the category template would be index.php_1.html as the category ID is 1. If you wanted a different template for the subcategory "Country", then the template name would be index.php_1_22.html.

 

:thumbsup: You can easily click on any of your categories and products in the admin and you will see the ID in the URL.

 

Okay, so when I uploaded a template called index.php_1_22.html with a pink background in the table (just as a test), it worked but only on the individual product page. So, let's say you are on the Country products page. The page lists the various products under the Country category. This page did not change BUT the individual Product Details page did. So once you click on a product and go to that page it changed.

 

I was just trying to figure out a way to have a different header title for each category on the page. By default it says "Let's See What We Have Here." I just wanted to put Country on that page, Rock on that page, etc. So, I guess I would need to create templates for each category then in order to make that happen. I am still not sure why the Product Listings page does not show the new template but it shows on the Product Details page for the individual product.

 

I will be spending my evening reading up on the best way to template out the non-osCommerce pages for Contact, FAQs, etc. I am also dealing with the sort issue. I think I see some gray hairs coming in. :lol:

 

Thanks so much for ALL of your help!!!! :thumbsup:

Link to comment
Share on other sites

okay - so I am still working on this Product Name and Price sort issue. Here is what I have found out.

 

When I view the osCommerce demo site or any of the Live shops and I hover over the link that you click on to sort, I see that the path uses index.php.

 

Now on my site when I hover, it says categories.php. So something is screwed up. Does anyone know what file deals with the sorting? It seems like it should then be pulling from an index.php file and not a categories.php file??

 

So mine says catalog/categories.php?cPath=1_22&page=1&sort=2d

Link to comment
Share on other sites

Okay, so when I uploaded a template called index.php_1_22.html with a pink background in the table (just as a test), it worked but only on the individual product page. So, let's say you are on the Country products page. The page lists the various products under the Country category. This page did not change BUT the individual Product Details page did. So once you click on a product and go to that page it changed.

 

I was just trying to figure out a way to have a different header title for each category on the page. By default it says "Let's See What We Have Here." I just wanted to put Country on that page, Rock on that page, etc. So, I guess I would need to create templates for each category then in order to make that happen. I am still not sure why the Product Listings page does not show the new template but it shows on the Product Details page for the individual product.

 

I will be spending my evening reading up on the best way to template out the non-osCommerce pages for Contact, FAQs, etc. I am also dealing with the sort issue. I think I see some gray hairs coming in. :lol:

 

Thanks so much for ALL of your help!!!! :thumbsup:

Go up a couple of posts for the STS Infobox Templates information regarding your product listing template. Also, a few posts up describes how to template the othe pages such as contact_us.php and others.

 

:thumbsup: You may be interested in the contribution "Add New Pages Using STS" listed in the STSv4 Power Pack site (use link in my signature below).

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

Go up a couple of posts for the STS Infobox Templates information regarding your product listing template. Also, a few posts up describes how to template the othe pages such as contact_us.php and others.

 

:thumbsup: You may be interested in the contribution "Add New Pages Using STS" listed in the STSv4 Power Pack site (use link in my signature below).

 

Okay - thank you. Yeah, I am getting into the guts of it now.

Link to comment
Share on other sites

I was just trying to figure out a way to have a different header title for each category on the page. By default it says "Let's See What We Have Here." I just wanted to put Country on that page, Rock on that page, etc. So, I guess I would need to create templates for each category then in order to make that happen.

 

Look in the STS User Manual under section 5.3. It lists how to do this. :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

okay - so I am still working on this Product Name and Price sort issue. Here is what I have found out.

 

When I view the osCommerce demo site or any of the Live shops and I hover over the link that you click on to sort, I see that the path uses index.php.

 

Now on my site when I hover, it says categories.php. So something is screwed up. Does anyone know what file deals with the sorting? It seems like it should then be pulling from an index.php file and not a categories.php file??

 

So mine says catalog/categories.php?cPath=1_22&page=1&sort=2d

I have an osCommerce headache :(

 

This is driving me mad!! Mad I tell you! Mad! :wacko:

 

Okay - so I just tried a little experiment. Since when I click on the Product title link OR the Price title link to sort the products I get the 404 error page. So in the browser address I replaced categories.php WITH index.php and then the page reloads (the 404 page goes away) and it is sorted! Huh! I am trying to find out why the sort links are trying to pull from a categories.php page when it needs to be index.php???

Link to comment
Share on other sites

I have an osCommerce headache :(

 

This is driving me mad!! Mad I tell you! Mad! :wacko:

 

Okay - so I just tried a little experiment. Since when I click on the Product title link OR the Price title link to sort the products I get the 404 error page. So in the browser address I replaced categories.php WITH index.php and then the page reloads (the 404 page goes away) and it is sorted! Huh! I am trying to find out why the sort links are trying to pull from a categories.php page when it needs to be index.php???

 

Lori, Your issue is not related to STS but I'll try to help out anyway....

 

You must have modified the sort function of osCommerce that is now causing you grief. Look for the following code in the catalog/functions/general.php file:

 

 

// Return table heading with sorting capabilities
 function tep_create_sort_heading($sortby, $colnum, $heading) {
global $PHP_SELF;

$sort_prefix = '';
$sort_suffix = '';

if ($sortby) {
  $sort_prefix = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . tep_output_string(TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading) . '" class="productListing-heading">';
  $sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? '+' : '-') : '') . '</a>';
}

return $sort_prefix . $heading . $sort_suffix;
 }

Notice the

<a href="' . tep_href_link(basename($PHP_SELF)

code? If your code looks identical to the above, then it would appear you do not have your catalog/includes/configure.php file settings correct.

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

Lori, Your issue is not related to STS but I'll try to help out anyway....

 

You must have modified the sort function of osCommerce that is now causing you grief. Look for the following code in the catalog/functions/general.php file:

 

 

// Return table heading with sorting capabilities
 function tep_create_sort_heading($sortby, $colnum, $heading) {
global $PHP_SELF;

$sort_prefix = '';
$sort_suffix = '';

if ($sortby) {
  $sort_prefix = '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('page', 'info', 'sort')) . 'page=1&sort=' . $colnum . ($sortby == $colnum . 'a' ? 'd' : 'a')) . '" title="' . tep_output_string(TEXT_SORT_PRODUCTS . ($sortby == $colnum . 'd' || substr($sortby, 0, 1) != $colnum ? TEXT_ASCENDINGLY : TEXT_DESCENDINGLY) . TEXT_BY . $heading) . '" class="productListing-heading">';
  $sort_suffix = (substr($sortby, 0, 1) == $colnum ? (substr($sortby, 1, 1) == 'a' ? '+' : '-') : '') . '</a>';
}

return $sort_prefix . $heading . $sort_suffix;
 }

Notice the

<a href="' . tep_href_link(basename($PHP_SELF)

code? If your code looks identical to the above, then it would appear you do not have your catalog/includes/configure.php file settings correct.

 

Thank you. Sorry for posting here. I got carried away and frustrated I guess. My code is the same as above. I am looking in my configure file but I have no idea what settings to change. So, I guess I will need to research it and test different things. I had not changed anything in this file and when I installed everything went great so I am just not sure but I hope to eventually figure it out. I appreciate that at least you have sent me in the right direction.

 

I am thinking that I will need to start all over and reinstall. UGH..... I have been at this for days and just cannot solve it. I wonder if I could just delete the sort function all together. Ah well, it will all work out somehow. Thanks again for your help.

Edited by dcwebpixie
Link to comment
Share on other sites

Thank you. Sorry for posting here. I got carried away and frustrated I guess. My code is the same as above. I am looking in my configure file but I have no idea what settings to change. So, I guess I will need to research it and test different things. I had not changed anything in this file and when I installed everything went great so I am just not sure but I hope to eventually figure it out. I appreciate that at least you have sent me in the right direction.

 

I am thinking that I will need to start all over and reinstall. UGH..... I have been at this for days and just cannot solve it. I wonder if I could just delete the sort function all together. Ah well, it will all work out somehow. Thanks again for your help.

PROBLEM SOLVED!!! Of course I discovered this AFTER I did a reinstall which was not even needed. Hey, that is how you learn though, right? I was using the wrong URL to link to the category pages. The two pages looked identical BUT the sort only works on the correct path below.

 

WAS USING: /catalog/index.php/categories.php?cPath=1_23

 

CORRECT PATH: /catalog/index.php?cPath=1_23

 

And now my sanity returns..... :thumbsup:

Link to comment
Share on other sites

Hi there

 

I have a problem with the infobox template

that is

i made a template infobox.php.html and i upload it to the boxes folder in the sts_templates/default/

anyway

it hasen't changed anything somehow it's getting everything from the css file i renamed the file to infobox_information.php.html and still nothing somthing hapens only when i change the css file

i tryied to reenable the use on infobox template in admin>moduls>sts and still nothing

 

as i figured (i think) somthing is wrong with the sts instalation (but everything else is working fine) that its preventing the sts to get the graphics from the infobox template instead of the css

 

any suggestion about what is wrong????

 

i know that maybe someone can say why use sts and don't use the http://www.oscommerce.com/forums/index.php?sho...&hl=infobox solution

or change the css file

 

the answer to that is that i hate when something does not work the way i want and should thumbsup.gif

 

anyway thanks in advance for the help

Link to comment
Share on other sites

Thanks for the advice regarding infoboxes bkellum.

 

I am trying to get my head around them and how they work but am not sure how to change there appearance?

 

I had a look at template monster at there oxcommerce templates to see what type of boxes can be made etc, now the rough idea is to have the boxes like the boxes in this template : Template

 

As you can see from the template, the boxes have a small thin line that encloses the whole box and they also have a header to each box. Now my question is how can I accomplish that using sts? Do I have to make an image and set that using html in each of the infobox templates? Or does each of the infoboxes link to a css file?

 

I have had a read around all the posts but cannot find the answer so any help would be greatly appreciated!

Link to comment
Share on other sites

Hi there

 

I have a problem with the infobox template

that is

i made a template infobox.php.html and i upload it to the boxes folder in the sts_templates/default/

anyway

it hasen't changed anything somehow it's getting everything from the css file i renamed the file to infobox_information.php.html and still nothing somthing hapens only when i change the css file

i tryied to reenable the use on infobox template in admin>moduls>sts and still nothing

 

as i figured (i think) somthing is wrong with the sts instalation (but everything else is working fine) that its preventing the sts to get the graphics from the infobox template instead of the css

 

any suggestion about what is wrong????

 

i know that maybe someone can say why use sts and don't use the http://www.oscommerce.com/forums/index.php?sho...&hl=infobox solution

or change the css file

 

the answer to that is that i hate when something does not work the way i want and should thumbsup.gif

 

anyway thanks in advance for the help

Welcome to the STS v4 Support Thread (I totally understand how confusing a new forum can be :- )!

 

When using Infobox Templates in STS, check the following:

  1. Turn the infobox template system "on" in the STS Default Module
     
    Use template for infoboxes
    true
  2. Try out the sample infobox templates first. In the STS Default Module, set the Default Template folder to "full"
     
    Template folder
    full
     
    I suggest this since the sample template folder "full" has the correct folder structure in place. You should take note that this template folder has two subfolders: content & boxes. The "boxes" folder is where you store each of your infobox templates. If you do not have a "boxes" subfolder in your custom template folder, simply add this subfolder and upload your infobox templates into it.
  3. You need to have at least one (1) infobox template to act as the default template when no other specific infobox template is available. This default infobox template should be named "infobox.php.html". Here is an example of this template:
     
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
     <tr>
    <td class="infoBoxHeading" width="99%">$headertext</td>
    <td class="infoBoxHeading" width="1%">$right_arrow</td>
     </tr>
    </table>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="boxBorder">
     <tr>
    <td class="boxText">$content</td>
     </tr>
    </table>

    You should take note of the following tags:


    1. $headertext
      This tag simply brings the title of the box.
    2. $right_arrow
      This tag is the link to the boxes page such as the Reviews or Specials page.
    3. $content
      This is the main content of the infobox. You need this tag even if you do not use any of the other tags above.

    [*]TIP: You can separate the main content of the infobox from the title by simply creating two templates as so (using the information.php infobox as an example):

    1. infobox_information.php.html
      This will be used for the main content of the box. Here is a simple example:
       
      <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#00FF00" style="border-collapse: collapse" bordercolor="#111111">
       <tr>
      <td> </td>
      <td bgcolor="#DBF1FF">$content</td>
      <td> </td>
       </tr>
       <tr>
      <td width="30"> </td>
      <td width="100%"> </td>
      <td width="31"> </td>
       </tr>
      </table>


    2. infobox_information_header.php.html
      This will be used for the header of the infobox template:
      <table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#00FF00">
       <tr>
      <td width="11">
      *</td>
      <td background="images/infobox_03.gif" class="infoBoxHeading" width="1428">
      $headertext</td>
      <td width="103" style="background-repeat: norepeat">
      *</td>
       </tr>
      </table>


    3. Take note on how you can easily change the style of the box by stipulating the CSS class to be used. The sky is the limit here. Be creative and try out new things. If you have a backup, then just do it and see if it works. If you break everything, then just restore your backup template.

    [*]The samples above use Tables and cells but you can easily use divs and complete CSS to style your infoboxes.

    [*]Here is some more tips:

    1. Use your stylesheet to set the background to transparent to better match your customized template page

    2. Look for the following code in your stylesheet.css file:

     /*This is the INFOBOX Background Style, one shade darker than the Infobox Header color*/ 
    .infoBox { 
    background: #0000FF; 
    } 
    /*This is the INFOBOX Contents Style, one shade lighter than the Infobox Header color*/ 
    .infoBoxContents { 
    background: #FFFFFF; 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    }
    
    /*This is the INFOBOX Notice Style, a pale salmon color*/ 
    .infoBoxNotice { 
    background: #FF8E90; 
    }
    
    /*This is the INFOBOX Notice Contents Style, a very pale salmon color*/ 
    .infoBoxNoticeContents { 
    background: #FFFFFF; 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    }
    
    /*This is the INFOBOX Heading Style, SAME AS HEADER AND FOOTER GRAY BARS*/ 
    TD.infoBoxHeading { 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    font-weight: bold; 
    background: #FFFFFF; 
    color: #ABDA4E; 
    } 
    TD.infoBox, SPAN.infoBox { 
    font-family: Verdana, Arial, sans-serif; 
    font-size: 10px; 
    }

    3. Just by changing the above, you can make the borders, backgrounds and more completely dependent upon your design. In other words, it is now a lot easier to integrate STS into a store bought HTML template. You can also take advantage of newer CSS dynamic boxes. Have fun, be creative.

    4. The default tables show a gray background around each infobox. This can easily be removed by editing the table and cell within the infobox template. You may want to replace the corner images with transparent gifs. These images are located in catalog/images/infobox/.

    Hope this helped,


    1.  

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

Hello,

 

I am still trying to wrap my brain around something... :huh:

 

I have a few (4 total) non-product pages such as Contact Page, FAQs Page. The basic layout and design for these pages are the same as the Product Pages. However, obviously these non-product pages will all have different content. From what I have read it seems like I create a template for these non-product pages but I am just lost on how to do it.

 

I can also just create individual HTML pages for them. I am just trying to have it setup for the client so that in case they need to update the navigation they only have to do it on a few templates rather then several HTML pages. The home page is setup and looks great, the main template for the product pages looks good. Now I just need to get the other pages setup. I have read the STS Manual but I am still having a hard time understanding how to do this. Or maybe it is just easier if I just have individual HTML pages and do not use a template for those pages? It is only 4 pages so maybe I should just do that?

 

Thanks

Link to comment
Share on other sites

INFOBOX PROBLEM REPLAY

 

 

here is the code of the infobox.php.html file that i wrote named it and put it in the boxes folder in sts_templates/default/ (whitch is the one i use)

 

<table width="100%" border="0" cellspacing="0" cellpadding="0">
 <tr>
   <td width="9px" height="24px"><img src="images/infobox/top_left.gif" width="9px" height="24px"></td>
   <td height="24" background="images/infobox/top.gif"><span class="infoBoxHeading">$headertext</span></td>
   <td width="92" height="24" background="images/infobox/arrow_back.gif" >$right_arrow</td>
   <td width="9px" height="24px" align="left"><img src="images/infobox/top_right.gif" width="9" height="24"></td>
 </tr>
 <tr>
   <td style="background-image:url('images/infobox/left.gif'); background-position: bottom; background-repeat: repeat;"> </td>
   <td colspan="2" style="background-image:url('images/infobox/center.gif'); background-repeat:repeat; background-position: bottom;">$content</td>
   <td style="background-image:url('images/infobox/right.gif'); background-position: bottom; background-repeat: repeat;"> </td>
 </tr>
 <tr>
   <td><img src="images/infobox/bot_left.gif" width="9" height="30"></td>
   <td colspan="2" background="images/infobox/bottom.gif"> </td>
   <td><img src="images/infobox/bot_right.gif" width="9" height="30"></td>
 </tr>
</table>

 

nothing is hapening

 

this is the code i have in my stylesheet css

 

 $Id: stylesheet.css,v 1.56 2003/06/30 20:04:02 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

.boxText { font-family: Verdana, Arial, sans-serif; font-size: 10px; }
.errorBox { font-family : Verdana, Arial, sans-serif; font-size : 10px; background: #ffb3b5; font-weight: bold; }
.stockWarning { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #cc0033; }
.productsNotifications { background: transparent; }
.orderEdit { font-family : Verdana, Arial, sans-serif; font-size : 10px; color: #70d250; text-decoration: underline; }

BODY {
 background: transparent;
 color: #000000;
 margin: 0px;
}

A {
 color: #000000;
 text-decoration: none;
}

A:hover {
 color: #AABBDD;
 text-decoration: underline;
}

FORM {
display: inline;
}

TR.header {
 background: #ffffff;
}

TR.headerNavigation {

}

TD.headerNavigation {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 color: #000000;
 font-weight : bold;
}

A.headerNavigation { 
 color: #000000;
}

A.headerNavigation:hover {
 color: #ffffff;
}

TR.headerError {
 background: #ff0000;
}

TD.headerError {
 font-family: Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 background: #ff0000;
 color: #ffffff;
 font-weight : bold;
 text-align : center;
}

TR.headerInfo {
 background: transparent;
}

TD.headerInfo {
 font-family: Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 background: transparent;
 color: #000000;
 font-weight: bold;
 text-align: center;
}

TR.footer {

}

TD.footer {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 color: #000000;
 font-weight: bold;
}

.infoBox {
background: transparent;
}

.infoBoxContents {
 background: transparent;
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
}

.infoBoxNotice {
 background: transparent;
}

.infoBoxNoticeContents {
 background: transparent;
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
}

TD.infoBoxHeading {
 background: transparent;
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 font-weight: bold;
 background: #bbc3d3;
 color: #ffffff;
}

TD.infoBox, SPAN.infoBox {
 background: transparent;
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
}

TR.accountHistory-odd, TR.addressBook-odd, TR.alsoPurchased-odd, TR.payment-odd, TR.productListing-odd, TR.productReviews-odd, TR.upcomingProducts-odd, TR.shippingOptions-odd {
 background: #f8f8f9;
}

TR.accountHistory-even, TR.addressBook-even, TR.alsoPurchased-even, TR.payment-even, TR.productListing-even, TR.productReviews-even, TR.upcomingProducts-even, TR.shippingOptions-even {
 background: #f8f8f9;
}

TABLE.productListing {
 border: 1px;
 border-style: solid;
 border-color: #b6b7cb;
 border-spacing: 1px;
}

.productListing-heading {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 background: #b6b7cb;
 color: #FFFFFF;
 font-weight: bold;
}

TD.productListing-data {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
}

A.pageResults {
 color: #0000FF;
}

A.pageResults:hover {
 color: #0000FF;
 background: #FFFF33;
}

TD.pageHeading, DIV.pageHeading {
 font-family: Verdana, Arial, sans-serif;
 font-size: 20px;
 font-weight: bold;
 color: #9a9a9a;
}

TR.subBar {
 background: #f4f7fd;
}

TD.subBar {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 color: #000000;
}

TD.main, P.main {
 font-family: Verdana, Arial, sans-serif;
 font-size: 11px;
 line-height: 1.5;
}

TD.smallText, SPAN.smallText, P.smallText {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
}

TD.accountCategory {
 font-family: Verdana, Arial, sans-serif;
 font-size: 13px;
 color: #aabbdd;
}

TD.fieldKey {
 font-family: Verdana, Arial, sans-serif;
 font-size: 12px;
 font-weight: bold;
}

TD.fieldValue {
 font-family: Verdana, Arial, sans-serif;
 font-size: 12px;
}

TD.tableHeading {
 font-family: Verdana, Arial, sans-serif;
 font-size: 12px;
 font-weight: bold;
}

SPAN.newItemInCart {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 color: #ff0000;
}

CHECKBOX, INPUT, RADIO, SELECT {
 font-family: Verdana, Arial, sans-serif;
 font-size: 11px;
}

TEXTAREA {
 width: 100%;
 font-family: Verdana, Arial, sans-serif;
 font-size: 11px;
}

SPAN.greetUser {
 font-family: Verdana, Arial, sans-serif;
 font-size: 12px;
 color: #f0a480;
 font-weight: bold;
}

TABLE.formArea {
 background: #f1f9fe;
 border-color: #7b9ebd;
 border-style: solid;
 border-width: 1px;
}

TD.formAreaTitle {
 font-family: Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 font-weight: bold;
}

SPAN.markProductOutOfStock {
 font-family: Tahoma, Verdana, Arial, sans-serif;
 font-size: 12px;
 color: #c76170;
 font-weight: bold;
}

SPAN.productSpecialPrice {
 font-family: Verdana, Arial, sans-serif;
 font-size:14px;
 font-weight:bold;
 color: #ff0000;
}

SPAN.errorText {
 font-family: Verdana, Arial, sans-serif;
 color: #ff0000;
}

.moduleRow { }
.moduleRowOver { background-color: #D7E9F7; cursor: pointer; cursor: hand; }
.moduleRowSelected { background-color: #E9F4FC; }

.checkoutBarFrom, .checkoutBarTo { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #8c8c8c; }
.checkoutBarCurrent { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #000000; }

/* message box */

.messageBox { font-family: Verdana, Arial, sans-serif; font-size: 10px; }
.messageStackError, .messageStackWarning { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #ffb3b5; }
.messageStackSuccess { font-family: Verdana, Arial, sans-serif; font-size: 10px; background-color: #99ff00; }

/* input requirement */

.inputRequirement { font-family: Verdana, Arial, sans-serif; font-size: 10px; color: #ff0000; }

/* Individual Boxes - Graphical Borders for modules - Star */
.mws_boxTop_module    { background: url('images/infobox_module/top.gif');
                font-family: Tahoma;
                font-size: 11px;
                text-align : center;
                font-weight: bold;
                background-repeat:repeat-x;
                vertical-align: middle;
                white-space: nowrap; }
.mws_boxLeft_module   { background: url('images/infobox_module/left.gif'); }
.mws_boxRight_module  { background: url('images/infobox_module/right.gif'); }
.mws_boxBottom_module { background: url('images/infobox_module/bot.gif');
                font-family: Verdana, Arial, sans-serif;
                font-size: 11px;
                text-align : center;
                vertical-align: middle;
                white-space: nowrap; }
.mws_boxCenter_module { background: #ffffff; 
                font-family: Verdana, Arial, sans-serif;
                font-size: 10px;}
.mws_boxCenter_module2 { background: #ffffff; 
                font-family: Verdana, Arial, sans-serif;
                font-size: 10px;}
/* Individual Boxes - Graphical Borders for modules - Star */

TD.noborderbox {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
}
/* BOF Pageloading by BPAS (www.bpas.co.nz) */
#prepage {
display:none;	
}
#prepage_overlay {
position:fixed;
top:0px;
left:0px;
width:100%;
height:100%;
z-index:3;
text-align:center;
padding-top:30%;
padding-bottom:50%;
background:#ffffff;
opacity:.9;
filter:alpha(opacity = 50);
}



#prepage_content {
position:fixed;
top:0px;
left:0px;
z-index:3;
text-align:center;
margin-left:45%;
margin-top:30%;
margin-bottom:50%;
padding:5px;
background:#FAFAF3;
border:1px;
border-style:solid;
border-color:#D4D4D4;	
opacity:1;
filter:alpha(opacity = 100);
}

/* EOF Pageloading by BPAS (www.bpas.co.nz) */

 

 

Any ideas ???

 

the adress of the store i'm building is

 

http://www.hpbs.gr/index.php

 

as you can understand i want to have my infoboxes displayed like the individual boxes condribution i have installed :)

Edited by SpirtouliS
Link to comment
Share on other sites

Hello,

 

I am still trying to wrap my brain around something... :huh:

 

I have a few (4 total) non-product pages such as Contact Page, FAQs Page. The basic layout and design for these pages are the same as the Product Pages. However, obviously these non-product pages will all have different content. From what I have read it seems like I create a template for these non-product pages but I am just lost on how to do it.

 

I can also just create individual HTML pages for them. I am just trying to have it setup for the client so that in case they need to update the navigation they only have to do it on a few templates rather then several HTML pages. The home page is setup and looks great, the main template for the product pages looks good. Now I just need to get the other pages setup. I have read the STS Manual but I am still having a hard time understanding how to do this. Or maybe it is just easier if I just have individual HTML pages and do not use a template for those pages? It is only 4 pages so maybe I should just do that?

 

Thanks

Lori, there are about 4 different ways to create your non-osCommerce pages (extra pages). First, you need to think about how you will be using your shop. I will give advise on the default use of osCommerce even though I know you are creating a non-ecommece site (so that other STS users can take advantage of this although this procedure is a good choice for you as well).

 

For Non-STS users, there is only one way to create extra pages in your shop that will keep the session ID. The session ID is important so that the user does not lose the items in his shopping cart as well as remain logged in. This procedure is well documented in the knowledge base in this forum so I will not take the time to repeat it.

 

For STS users, you should take note of the session ID as well and create your pages and links with this in mind. I strongly suggest that you download my Add New Pages Using STS in the STSv4 Power Pack site. Go ahead and download the Dec 18 2007 version as it is identical to my version except that the bot marks have been removed (this is a good thing...thanks Microsoft!!! :angry: ).

 

The download above gives detailed step by step instructions on how to correctly add non-osCommerce pages into your shop that will keep the session Id intact as well as allow you to template the pages once you have added them. For example: You will add a newpage.php to your shop and then you will be able to create a newpage.php.html template for it giving it any layout and design that you want. If you do not create a template for it, STS will use the default template for the display of newpage.php.

 

:thumbsup: Now, if you are developing a site for a client who may not be all that web-savvy, you may want to consider adding a WYSIWYG type of backend editor such as TinyMCE and then add the code to these new pages so that your client could add text and images in the admin. This is beyond the scope of this STS thread but there is plenty of support for this type of procedure elsewhere in this forum.

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

INFOBOX PROBLEM REPLAY

 

Any ideas ???

 

the adress of the store i'm building is

 

http://www.hpbs.gr/index.php

 

as you can understand i want to have my infoboxes displayed like the individual boxes condribution i have installed :)

Michalis,

 

I looked at the source for the center infoboxes created by the individual boxes contribution and here it is:

 

**sorry, for some reason the forum is not working correctly tonight as I can't post the code of your individual boxes. Send me a PM through email and I will send it back to you.

 

By the way...I think you need to check to be sure that you have STS installed correctly if you already tried this and it failed.

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

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...