Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

finally figured this out..somehow the .htaccess file got this added to it in the wholesalecatalog directory:

 

<IfModule mod_setenvif.c>

<IfDefine SSL>

SetEnvIf User-Agent ".*MSIE.*" \

nokeepalive ssl-unclean-shutdown \

downgrade-1.0 force-response-1.0

</IfDefine>

</IfModule>

 

don't know where it came from (sts?) but I commented it out and now the SSL links work okay...

 

so just posting this for anyone who has SSL problems using sts...something to check out...

bopp out

Ryan, STS does not add any .htaccess files. Your host must have added that file in there. So again, I have to say that STS was not the issue of your SSL problems.

 

Glad you finally got it working though! :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

Hello,

 

I just installed STS on a new OSC site because I'm comfortable with HTML, but don't really know anything about PHP.

 

I wanted to remove the icons from the header (references to header_account.gif, header_cart.gif, header_checkout.gif), but after editing out those lines from sts_template.html nothing happens?

 

I'm obviously missing something here, so could somebody point me in the right direction of what else I need to do?

 

Thanks.

Steve, after uploading all of the files, did you enable the STS Modules in the admin that you will be using? For a one template scenario, you would need to at least enable the STS Default Module. Read over the files in the docs folder that came with the contribution for more details.

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

Steve, after uploading all of the files, did you enable the STS Modules in the admin that you will be using? For a one template scenario, you would need to at least enable the STS Default Module. Read over the files in the docs folder that came with the contribution for more details.

Thanks for the quick reply.

 

Okay, it appears that CoreFTP chose not to write some files when I did it the first time. After rewriting them the admin page went away, so I've just had to reinstall the whole site. :lol:

 

It's working now if I use the test/sts_template.html, but if I remove the same code within full/sts_template.html and switch the admin STS to use that then it doesn't work. The buttons are still there. I take it that I must edit something else when switching to the "full" template?

 

The code I've been removing is:

 

<table border="0" width="100%" cellspacing="0" cellpadding="10">
   <tr class="header">
       <td valign="middle">
           <img border="0" src="images/store_logo.png"></td>
       <td align=right>
           <a href="$urlmyaccount">
           <img border="0" src="images/header_account.gif"></a>
           <a href="$urlcartcontents">
           <img border="0" src="images/header_cart.gif"></a>
           <a href="$urlcheckout">
           <img border="0" src="images/header_checkout.gif"></a>
       </td>
   </tr>
</table>

Link to comment
Share on other sites

You need to make a separate header template. Tip: If you do not want a header at all for a specific infobox, you could create a blank header template. :thumbsup:

 

Header templates need to be named "infobox_scriptname_header.php.html". So, in your case, the template would be called infobox_manufacturers_header.php.html for the header template and infobox_manufacturers.php.html for the content template.

 

See chapter 6 of the STS User Manual for more details on infobox templates.

 

Thanks !

Sorry - did not recognise that it`s possible to give ......_header.php.html - I´ll try that and hope it works with my system :rolleyes:

 

Categroy Box Problem:

I´m just using the ul_categories box for my buggy categories (included ul_categories.php in sts_inc config file) and that`s better than the standard category box.

OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Link to comment
Share on other sites

Hi all,

 

A weird question about STS. I've got it up and running on my first web store and it works perfectly - almost! The template is working on every page except the shopping cart. If the cart is empty, then things work fine, but as soon as I put anything into the cart, the template stops working and the first code that appears in the HTML source is:

 

<!-- left_navigation_eof //-->

</table></td>

<!-- body_text //-->

 

Any idea why this might be happening? I also have DownloadsController installed, if that offers any help...

Link to comment
Share on other sites

Hi all,

 

A weird question about STS. I've got it up and running on my first web store and it works perfectly - almost! The template is working on every page except the shopping cart. If the cart is empty, then things work fine, but as soon as I put anything into the cart, the template stops working and the first code that appears in the HTML source is:

 

 

</table></td>

 

 

Any idea why this might be happening? I also have DownloadsController installed, if that offers any help...

Take a look at my post in the following link that describes special infoboxes such as the shoppingcart.php file.

 

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

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 there

 

ive just installed sts 4.5.8 but im having trouble.

 

when i go to modules in admin and try doing anything with Default, Index, Popup image or Product info it brings up the following error:

 

Warning: Cannot modify header information - headers already sent by (output started at /homepages/35/d239081891/htdocs/admin/includes/languages/english/modules.php:30) in /homepages/35/d239081891/htdocs/admin/includes/functions/general.php on line 22

 

 

any ideas and solutions? also it may be worth noting that i have moved oscommerce to my root folder so it doesnt include /catalog. Whilst i dont think that is what is causing this problem id be grateful if anyone could also inform me if there is anything in the coding that i need to adjust to prevent future problems

 

thanks in advance for your help as im excited about getting a chance to use STS! :'

Link to comment
Share on other sites

Take a look at my post in the following link that describes special infoboxes such as the shoppingcart.php file.

 

(SNIP)

 

Thanks, I took a look... not quite sure what the URL I should be using for the shopping_cart.php file should be, though? In my Modules -> STS settings, I have only "Default" enabled, set to sts_template.html - and this works for everything except the cart when there's something in it. Should I, therefore, have a separate file in the templates directory for the cart? I tried making a shopping_cart.html earlier on but it didn't seem to have any effect!

Link to comment
Share on other sites

hi there

 

ive just installed sts 4.5.8 but im having trouble.

 

when i go to modules in admin and try doing anything with Default, Index, Popup image or Product info it brings up the following error:

 

Warning: Cannot modify header information - headers already sent by (output started at /homepages/35/d239081891/htdocs/admin/includes/languages/english/modules.php:30) in /homepages/35/d239081891/htdocs/admin/includes/functions/general.php on line 22

 

 

any ideas and solutions? also it may be worth noting that i have moved oscommerce to my root folder so it doesnt include /catalog. Whilst i dont think that is what is causing this problem id be grateful if anyone could also inform me if there is anything in the coding that i need to adjust to prevent future problems

 

thanks in advance for your help as im excited about getting a chance to use STS! :'

Check the files involved:

A common cause to the problem is spaces ("whitespace") existing before the first <?php tag and/or after the last ?> tag with the files involved. By removing all spaces so that <?php is at the very start of the file and that ?> is at the very end of the file, no content would have been sent to the client and headers can be set safely.

 

Open the file in a text editor -> place your mouse cursor after the very last ?> tag at the very end of the file and press the 'delete' key on your computer keyboard. Make sure that whitespace does not exist before the opening <?php tag at the very beginning of the file - delete whitespace if present. Save and upload the file to your installation.

 

:thumbsup: An easy way to avoid this is to use a file comparison tool to make you modifications when adding contributions such as STS. A good utility is Beyond Compare or WinMerge. These utilities compare your code with the new contribuitons code and allows you to merge the differences so that you get the code exactly where it should be placed in the file.

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, I took a look... not quite sure what the URL I should be using for the shopping_cart.php file should be, though? In my Modules -> STS settings, I have only "Default" enabled, set to sts_template.html - and this works for everything except the cart when there's something in it. Should I, therefore, have a separate file in the templates directory for the cart? I tried making a shopping_cart.html earlier on but it didn't seem to have any effect!

Dave.

The post that I referred you to discussed how to make infobox templates. First you need to turn on this feature in the admin and then add a template named "catalog_shopping_cart.php.html"

 

Quote from Post:

 

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

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

Dave.

The post that I referred you to discussed how to make infobox templates. First you need to turn on this feature in the admin and then add a template named "catalog_shopping_cart.php.html"

 

Ah sorry, I understand now! Think I did it, but it seemed to confuse things even more. Here's what happened...

 

- When nothing was in the shopping cart, the script displayed the first half of the cart's page, got to the main <td>... and then included the template there, meaning all the content came above the header!

- When I added something to the cart, the same problem occurred again - ie it lost all templates and just started in the same way as before.

 

I'm getting confused, I know I must be doing something wrong...?!

Link to comment
Share on other sites

Check the files involved:

A common cause to the problem is spaces ("whitespace") existing before the first <?php tag and/or after the last ?> tag with the files involved. By removing all spaces so that <?php is at the very start of the file and that ?> is at the very end of the file, no content would have been sent to the client and headers can be set safely.

 

Open the file in a text editor -> place your mouse cursor after the very last ?> tag at the very end of the file and press the 'delete' key on your computer keyboard. Make sure that whitespace does not exist before the opening <?php tag at the very beginning of the file - delete whitespace if present. Save and upload the file to your installation.

 

:thumbsup: An easy way to avoid this is to use a file comparison tool to make you modifications when adding contributions such as STS. A good utility is Beyond Compare or WinMerge. These utilities compare your code with the new contribuitons code and allows you to merge the differences so that you get the code exactly where it should be placed in the file.

 

 

Bill, you were absolutely spot on - two 'whitespaces' after the last php tag in one of the files caused the problem. I suppose it's a reminder about how precise and detailed i need to be when checking everything.

 

All i've got to do now is learn to uses STS!

 

Cheers for your quick and brilliant answer

Link to comment
Share on other sites

Bill, you were absolutely spot on - two 'whitespaces' after the last php tag in one of the files caused the problem. I suppose it's a reminder about how precise and detailed i need to be when checking everything.

 

All i've got to do now is learn to uses STS!

 

Cheers for your quick and brilliant answer

 

 

Sorry - one other question! - i am trying to center my site for all screen res and so there is a background all around. I have tried 3 very simple contributions but all have failed, i have found that some of the files that i have had to add some code too are ones which i had to add some sts code too as well - does the presence of the sts code overule the centre code?

 

if so are you aware of a way round it or a centre contribution i can use with sts? or better still can you point out my blatant stupid mistake and make me feel silly?!

 

cheers

Link to comment
Share on other sites

Sorry - one other question! - i am trying to center my site for all screen res and so there is a background all around. I have tried 3 very simple contributions but all have failed, i have found that some of the files that i have had to add some code too are ones which i had to add some sts code too as well - does the presence of the sts code overule the centre code?

 

if so are you aware of a way round it or a centre contribution i can use with sts? or better still can you point out my blatant stupid mistake and make me feel silly?!

 

cheers

Paul, you do not need a special contribution to center your shop when using STS. You need to add the HTML and CSS to your template just as you would any other web page.

 

Using CSS to center your page (one method anyway):

 

Using CSS, you would need something as shown below added to your stylesheet. It works by secifying the width of the central column of the page (in pixels or as a percentage) and by setting the margins of the column to an automatic value. In order to deal with the shortcomings of Internet Explorer, it is necessary to introduce a text-align: center; property to the body element. This, however, results in all of the text on the page also being centered, and so a text-align: left; is added to the CSS for the centered column.

 

 

body {
margin: 50px 0px;
padding: 0px;
text-align: center;
}

div#main {
width: 600px;
margin: 0px auto;
text-align: left;
padding: 15px;
border: 1px solid #000000;
background-color: #eeeeee;
}

In the above code, one division is used to contain the main text of the page and is given id="main" as an attribute.

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

I have STS 4.5.8 installed with the latest version of oscommerce. I was wondering if i could get some help with some modifications. What I would like to do is have a url link to all products with their product info and reviews on the same page instead of it going into the categories format with a link you click to view the product_info and then in the product_info page a reviews button to see the reviews page.

 

Similarly done here on this website (one of oscommerce live sites)

http://shop.wickedbakery.com/

 

But with the additional reviews at the bottom.

 

If it is possible could you please tell me how this is done and which files to modify? Or is there a contribution for this? I tried searching and looking through and still I havent really found my solution so someone please help.. :'(

 

I apologise if someone has already ask this question, if you could please point me to the correct thread that would be much appreciated. :lol:

Edited by potatocake
Link to comment
Share on other sites

Hi

I have STS 4.5.8 installed with the latest version of oscommerce. I was wondering if i could get some help with some modifications. What I would like to do is have a url link to all products with their product info and reviews on the same page instead of it going into the categories format with a link you click to view the product_info and then in the product_info page a reviews button to see the reviews page.

 

Similarly done here on this website (one of oscommerce live sites)

http://shop.wickedbakery.com/

 

But with the additional reviews at the bottom.

 

If it is possible could you please tell me how this is done and which files to modify? Or is there a contribution for this? I tried searching and looking through and still I havent really found my solution so someone please help.. :'(

 

I apologise if someone has already ask this question, if you could please point me to the correct thread that would be much appreciated. :lol:

Hello,

You can try the All Products contribution (there are others as well).

 

Try doing a Google search to show you what is available.

:thumbsup: Use the following search string: site:http://www.oscommerce.com/community/contributions all products

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

 

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

 

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

 

?>

<!-- search //-->

<tr>

<td align="left">

<?php

echo "SEARCH ";

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

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

?>

</td>

</tr>

<!-- search_eof //-->

 

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

 

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

 

Can anyone enlighten me on this.

 

Thank you.

Link to comment
Share on other sites

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

 

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

 

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

 

?>

 

<tr>

<td align="left">

<?php

echo "SEARCH ";

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

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

?>

</td>

</tr>

 

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

 

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

 

Can anyone enlighten me on this.

 

Thank you.

I posted a response in your duplicate post in the STSv4 Support Thread.

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

You need to make a separate header template. Tip: If you do not want a header at all for a specific infobox, you could create a blank header template. :thumbsup:

 

Header templates need to be named "infobox_scriptname_header.php.html". So, in your case, the template would be called infobox_manufacturers_header.php.html for the header template and infobox_manufacturers.php.html for the content template.

 

See chapter 6 of the STS User Manual for more details on infobox templates.

 

I created infobox_manaufacturers_header.php.html and infobox_manufacturers.php.html and called $manufacturerbox in my index.php file.

But content of header is still formated with a table around the text and filled with colour.....but I want only the text inside this box...without any formats in it.

There is no different to see if I put $headertext in the same file as $content or a separates header file....

Edited by runweb

OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Link to comment
Share on other sites

Another Question:

I inculded now the unordered list file "uo_categories.php" - all sub-categories are permanently listed now.

Is it possible to have the subcategories visible only when clicking main category (like in default OSC categories ?) with the uo_categories.php, too ?

OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Link to comment
Share on other sites

I have been trying to create a "content template" for shopping_cart.php"; the purpose is to edit the layout and style of the Shopping Cart page as easy as editing the Product Info page.

 

I am using STS 4.5.8 (updated by Bill Kellum)

According to the user manul "3.11 Create content templates for any page"

It is possible to create content template for shopping_cart.php page

 

I swear that i have tried to solve this problem myself; but for the last few hours, i have tried everything i can think about, but the shopping_cart.php page still shows as default.

 

Please give me some input, thank you!

Edited by mikewu
Link to comment
Share on other sites

Hi there,

 

Three pipe problem

After weeks of experimenting I got stuck in trying to get product ranking in the Admin side.

I want to rank products (books) in the admin panel without the use of the review module.

It is a ranking done by the administrator and it is fixed for each product. It seems simple

but I can't find where to do it and how.

 

How does it work?

As the administrator I want to rank a booktitle with 3 stars stars (out of 5) in the admin side (add product page).

When a customer finds the book in the webshop they see this ranking by the display of these three stars.

This ranking works independently from the review ranking (there is no link).

 

Can somebody please help me?

 

Kind regards,

 

Jeff

Link to comment
Share on other sites

Another Question:

I inculded now the unordered list file "uo_categories.php" - all sub-categories are permanently listed now.

Is it possible to have the subcategories visible only when clicking main category (like in default OSC categories ?) with the uo_categories.php, too ?

Yes, it is but you would need to post your question in that support thread. I can point you in the direction of the ul_categories.php file in your includes/boxes folder. There are settings (with instructions) on how to change the functions of the menu.

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 have been trying to create a "content template" for shopping_cart.php"; the purpose is to edit the layout and style of the Shopping Cart page as easy as editing the Product Info page.

 

I am using STS 4.5.8 (updated by Bill Kellum)

According to the user manul "3.11 Create content templates for any page"

It is possible to create content template for shopping_cart.php page

 

I swear that i have tried to solve this problem myself; but for the last few hours, i have tried everything i can think about, but the shopping_cart.php page still shows as default.

 

Please give me some input, thank you!

Mike,

What have you tried so far? Keep in mind there are two shopping_cart.php files. One is an infobox that you can template (see the following link for more details on this: http://www.oscommerce.com/forums/index.php?sho...p;#entry1227006

and the other a page that you can simple create a template for: shopping_cart.php.html.

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