Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Mark, You had mentioned,

 

This is addressed in section 5.5 of the STSv4.2 User Manual. :thumbsup:

 

Thanks Bill, found it now. Also managed to track down a lot of entries defining images sizes :D

 

I need to add the drop down size availibility box to the main product page but I'm not sure if this is within the scope of sts?

 

I'm still working on that list of contributions that need adding by the way but it getting a bit long :o I'll whittle it down a bit and get back to you.

Link to comment
Share on other sites

I need to add the drop down size availibility box to the main product page but I'm not sure if this is within the scope of sts?

 

Yes, first you need to enable the product_info module in the admin; then use the sts tag $optionchoices in your any or all of product templates. Keep in mind, this sts tag is what I call a smart-tag, meaning it will not show up unless your product actually has options (product attributes)...how cool is that? Very dynamic, very PHP! Very COOL!

 

I hope this answered your question.

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

Funny, I am actually working on such a beast but seem to never have the time to really focus on it. If anyone else already "invented the wheel" then by all means..."Please stand up!" :D

Well...how about a faster wheel. It'll mean total control over the appearacne, if that's done...

 

I'll do it, if it's jsp, but it's not :(

 

Oh well... For some reason php just seems so...messy to me. I haven't really read the manual, but it's generally very good and easy language to understand.

Link to comment
Share on other sites

This error doesn't make sense to me. I have Simple Templates running on 3 sites now, and I've never seen this one before. As far as I know, the file it claims it can't open isn't supposed to exist.

 

Warning: main(includes/modules/sts_inc/index.php): failed to open stream: No such file or directory in /hsphere/local/home/netkraft/mohawkmovies.com/catalog/includes/modules/sts_inc/sts_display_output.php on line 21

Warning: main(includes/modules/sts_inc/index.php): failed to open stream: No such file or directory in /hsphere/local/home/netkraft/mohawkmovies.com/catalog/includes/modules/sts_inc/sts_display_output.php on line 21

Warning: main(): Failed opening 'includes/modules/sts_inc/index.php' for inclusion (include_path='.:/usr/local/lib/php:/usr/local/lib/php/PEAR:/usr/local/share/pear') in /hsphere/local/home/netkraft/mohawkmovies.com/catalog/includes/modules/sts_inc/sts_display_output.php on line 21

 

Can someone give me a clue? Or am I wrong that there should be an includes/modules/sts_inc/index.php. It doesn't exist in any other site.

 

By the way. This is a fresh install in a new store and except for STS, I haven't touched any other code or used any other contributions.... yet.

Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!!

 

Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience.

 

The quickest way to learn is to forget to BACKUP!

Link to comment
Share on other sites

I found my mistake.

 

I added index.php to the list of files under default in admin/sts/default

 

Thank you to all who looked and tried to help!!

 

:D

Just between us, remember there are only 10 kinds of people in the world; those who understand binary and those who don't!!

 

Remember, learning is a "do-it-yourself" experience; although, not necessarily a "do-it-BY-yourself" experience.

 

The quickest way to learn is to forget to BACKUP!

Link to comment
Share on other sites

I am trying to find what file to edit to find THIS: <!-- start cartbox //-->

I need to edit the actual code inside of these variables:

$cartbox

$content

 

Which file do I need to get to to edit the html around the content of the variables?

 

Thanks

This seems easy but no one has any feedback?

Link to comment
Share on other sites

This seems easy but no one has any feedback?
What you are probably looking for is in includes/boxes/shopping_cart.php.

 

The carbox variable is in includes/modules/sts_inc/sts_column_left.php.

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 trying to use the sts contribution for the first time. I have built a couple oscommerce sites before, but was hoping the template system would make it easier. I am pretty new to all this, I do not know PHP, but I do know html very well and css fairly well.

 

My problem is, it seems that the sts_template.html cannot see my stylesheet.css. I have the html file and the css file uploaded to the test folder, but the html does not respond to the css. When I preview the html in my browser, it works properly, but not when uploaded to the test folder.

 

I'm sure it is something basic, but it is beyond my knowledge. One thing to note, I do not install contribs myself, so I do not have access to the manual. I think I'm doing something wrong. Any ideas?

 

Thanks,

Dawn

Link to comment
Share on other sites

Hello,

 

I am trying to use the sts contribution for the first time. I have built a couple oscommerce sites before, but was hoping the template system would make it easier. I am pretty new to all this, I do not know PHP, but I do know html very well and css fairly well.

 

My problem is, it seems that the sts_template.html cannot see my stylesheet.css. I have the html file and the css file uploaded to the test folder, but the html does not respond to the css. When I preview the html in my browser, it works properly, but not when uploaded to the test folder.

 

I'm sure it is something basic, but it is beyond my knowledge. One thing to note, I do not install contribs myself, so I do not have access to the manual. I think I'm doing something wrong. Any ideas?

 

Thanks,

Dawn

 

Nevermind. I figured out that the CSS goes in the catalogue directory. Thanks anyway.

Link to comment
Share on other sites

Well, Im trying to add new variables. The STS Manual has so little info on it, maybe it says enough... but im no php programmer... so its kinda complicated, I would really appreciate if someone could do the "dumbass" explaining :D.

 

Thanks in Advance

Link to comment
Share on other sites

Well, Im trying to add new variables. The STS Manual has so little info on it, maybe it says enough... but im no php programmer... so its kinda complicated, I would really appreciate if someone could do the "dumbass" explaining :D .

 

Thanks in Advance

Maybe this will help:

 

 

 

:D How to create a STS tag to link to a PHP file (STSv4.2):

 

Look for the PHP code that links to the PHP file (or infobox, or whatever) that you want to make a tag for:

In this example, we want to make a tag for ?account.php?. In the stock osc store, there is a ?My Account? graphic that when it is clicked, it will open the ?account.php? file. Well, we only want the URL since we will either make a text link or use our own graphic to match our template.

 

The stock graphic link is defined in the

includes/header.php file:

 

<?php echo '<a href="' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . '">' .  
tep_image(DIR_WS_IMAGES . 'header_account.gif', HEADER_TITLE_MY_ACCOUNT) .

 

 

In the above, a graphic file "header_account.gif" is used for the link. Looking a little closer, we see the actual URL link to account.php would be:

 

tep_href_link(FILENAME_ACCOUNT, '', 'SSL')

 

So, you create the tag for the URL link to account.php as so:

$sts->template['urlmyaccountlogo'] = tep_href_link(FILENAME_ACCOUNT, '', 'SSL');

 

The tag is defined as: $urlmyaccountlogo

 

:blink: We could have called it anything we wanted such as $stupidlink, $acdc or $whatever.

We now need to save the code that we have created either in the ?includes/modules/sts_inc/sts_user_code.php? file.

 

:thumbsup: Once we have done this, the tag will be ready for use in our template.

 

 

 

Here are some tips on where to look for code in your osc store:

The header is called from the file ?includes/header.php.

The left column is the file ?includes/column_left.php.?

The right column is the file ?includes/column_right.php?.

The footer is the file ?includes/footer.php?.

 

 

 

I hope this mini-tutorial was helpful.

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

Yes, first you need to enable the product_info module in the admin; then use the sts tag $optionchoices in your any or all of product templates. Keep in mind, this sts tag is what I call a smart-tag, meaning it will not show up unless your product actually has options (product attributes)...how cool is that? Very dynamic, very PHP! Very COOL!

 

I hope this answered your question.

 

 

 

Hi Bill, just had a couple of days off this...my head was starting to hurt :) but, now I'm on it again. I had already added the tag $optionchoices to content/product_info.php.html and this is great as you say.

 

However i really want this code on the page that appears before this page, the product_listing page that displays the products available in a catagory. I don't think this page is covered by STS though, I hope I'm wrong...am I?

 

If not, how can I add the $optionchoices tag to the product listing page?

 

 

Thanks,

 

Mark

Link to comment
Share on other sites

I am sorry for the annoyance that is me but I am going nuts. I cant find what I need to to edit this layout correctly.

 

Please visit:

http://www.lpill.com

Then go to:

http://www.herbalsecure.com/

 

You will see how the layout is broken on herbalsecure.

 

I need to edit the content. The source has a note: <!-- start Default Content //-->

 

I need to edit in here to get rid of the table 100% spacing. I think that is what is breaking the layout and forcing the page out. I also really want to get rid of the page heading images like images/table_background_default.gif

 

Please help me out. I swear I have looked through all of the files in oscommerce and sts searching for this code and I can not find it anywhere. Tips greatly appreciated, and a reply... SO greatly appreciated.

Link to comment
Share on other sites

I'm having ONE small difficulty with this contrib...

I just finished a clean install of OScommerce, and added the 19 Aug 2006 version of STS 4.2 with headertags.

for some odd reason, the info boxes on the left hand side displays 'BOX_INFORMATION_CONDITIONS'

along with the regular shipping & returns, privacy and contact us pages.

I'm actually trying to get rid of the conditons of use link completely...

can someone shed some light on what I'm missing?

BTW, www.azelectron.com is the URL. the link in the left column appears on every page.

 

thanks in advance.

Link to comment
Share on other sites

I am sorry for the annoyance that is me but I am going nuts. I cant find what I need to to edit this layout correctly.

 

Please visit:

http://www.lpill.com

Then go to:

http://www.herbalsecure.com/

 

You will see how the layout is broken on herbalsecure.

 

I need to edit the content. The source has a note: <!-- start Default Content //-->

 

I need to edit in here to get rid of the table 100% spacing. I think that is what is breaking the layout and forcing the page out. I also really want to get rid of the page heading images like images/table_background_default.gif

 

Please help me out. I swear I have looked through all of the files in oscommerce and sts searching for this code and I can not find it anywhere. Tips greatly appreciated, and a reply... SO greatly appreciated.

The following table widths seem to be out of sinc with the rest of your table widths that are 500:

 

 

<td width="540" valign="top" background="<A href='https://www.herbalsecure.com/bg_70.gif">https://www.herbalsecure.com/bg_70.gif"><img src="<A href="https://www.herbalsecure.com/bighead.jpg">https://www.herbalsecure.com/bighead.jpg" />
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="520">

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

The following table widths seem to be out of sinc with the rest of your table widths that are 500:

 

 

<td width="540" valign="top" background="<A href='https://www.herbalsecure.com/bg_70.gif">https://www.herbalsecure.com/bg_70.gif"><img src="<A href="https://www.herbalsecure.com/bighead.jpg">https://www.herbalsecure.com/bighead.jpg" />
<div align="left">
<table border="0" cellpadding="0" cellspacing="0" width="520">

Try it now and view source ;)

 

It has nothing to do with those tables, it's the inside that is somehow breaking it. I just need the location of where to edit that content - that's it.

Link to comment
Share on other sites

I'm having ONE small difficulty with this contrib...

I just finished a clean install of OScommerce, and added the 19 Aug 2006 version of STS 4.2 with headertags.

for some odd reason, the info boxes on the left hand side displays 'BOX_INFORMATION_CONDITIONS'

along with the regular shipping & returns, privacy and contact us pages.

I'm actually trying to get rid of the conditons of use link completely...

can someone shed some light on what I'm missing?

BTW, www.azelectron.com is the URL. the link in the left column appears on every page.

 

thanks in advance.

I just went to the link and everything appeared OK. The 'BOX_INFORMATION_CONDITIONS' did not show up in my IE browser. :huh:

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

Example if I go here the page works fine (aside from the 100% spacing): http://herbalsecure.com/product_reviews.php?products_id=30

 

So I don't get it.

 

At all.

Brad, it's got to be a table or cell that you have resized incorrectly within the content portion. Have you modified the infobox "shopping_cart" to a different size? or the new products infobox?

 

 

 

Since you are using a STS template, check to make sure there is not a table in the content area or footer area that is larger than the sum of all the tables (766 in your case). For example, if you have two cells or two tables adjacent to each other in the footer area of your template and the left cell (or table) is 200 and the right cell (or table) is 586, then the total width for both would be 786, causing your header cells to spread out to make up the difference, such as is happening in your case.

 

I really can't tell for sure without seeing the entire template page but go over the above and that should cover it.

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

Example if I go here the page works fine (aside from the 100% spacing): http://herbalsecure.com/product_reviews.php?products_id=30

 

So I don't get it.

 

At all.

I just went to your site and see that you got this fixed. For the benefit of those following this post, what did it end up being?

 

Bill Kellum

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 a great module. I recently re-installed it after a failed first attempt. I thought I could get by without an easier template system, but I was wrong! Oscommerce is in bad need of something like STS integrated into the core.

 

Anyway, on second install, I had the same problem as I did in the first attempt. My categories box and manufacturers drop downs were the only blocks that wouldn't show properly. I spent hours trying to figure out what the problem was and then finally I realized I should delete my cache, since these are the only two blocks in column_left.php that use an if statement related to cache. Lo and behold, turning off the cache fixed the disply problem on these blocks.

 

Just a note in case someone else runs into this and spends hours dancing around the cache issue. The time was well spent though because I'm more familiar with STS - it's actually really SIMPLE as the name implies and my site is 1000 times nicer already.

 

Thanks again for a great module!

Edited by Vines

----------------------------------------------------

Link to comment
Share on other sites

Dynamic DHTML Menu with STS 4.1

 

I'm kind of tired of that menu box. Here it is.

 

Need STS 4.1 and Dynamic DHTML Menu

 

Step 1. Install STS 4.1

Step 2. Upload mymenu.php from DHTML to /catalog/includes/boxes/

Step 3. Open /catalog/includesmodules/sts_incsts_user_code.php, and add the following lines at the end before "?>"

 

Step 4. Add css contents from DHTML menu to stylesheet.css by cut and paste or open /catalog/stylesheet.css and add the following lines at the end:

5. Add $mymenu# to where ever you like on your template.

 

Ok - I am sooo lost here. I tried finding the code on the sts_user_code.php file to modify to get these two things to work together first - that code didn't exist anymore - so I came across this thread. I had already uploaded the Dynamic Menus (dhtmlcategories111.zip) to my catalog directory (which is simply my root - I'm not using /catalog/. So I went through and made the above changes except for step 2 - I do not have a "mymenu.php" file in the Dynamic DHTML file I downloaded :( Am I missing something? All I know is, ever since I uploaded the things in the dhtmlcategories111.zip to my server I cannot access it. I don't know if it's a problem with what I uploaded - or if it's a dns still populating thing (will find that out tomorrow morning I guess) - but in the meantime I need to know what it is I am supposed to do in order to get the two contributions to play nicely together :'(

 

Thank you in Advance for any assistance you can provide :D

 

Tracy

 

PS - I'm hoping I used the right name for the extension - it should turn my product categories menu into a vertical popup menu :)

Edited by TracyS

~Tracy
 

Link to comment
Share on other sites

Ok - I am sooo lost here. I tried finding the code on the sts_user_code.php file to modify to get these two things to work together first - that code didn't exist anymore - so I came across this thread. I had already uploaded the Dynamic Menus (dhtmlcategories111.zip) to my catalog directory (which is simply my root - I'm not using /catalog/. So I went through and made the above changes except for step 2 - I do not have a "mymenu.php" file in the Dynamic DHTML file I downloaded :( Am I missing something? All I know is, ever since I uploaded the things in the dhtmlcategories111.zip to my server I cannot access it. I don't know if it's a problem with what I uploaded - or if it's a dns still populating thing (will find that out tomorrow morning I guess) - but in the meantime I need to know what it is I am supposed to do in order to get the two contributions to play nicely together :'(

 

Thank you in Advance for any assistance you can provide :D

 

Tracy

 

PS - I'm hoping I used the right name for the extension - it should turn my product categories menu into a vertical popup menu :)

 

Just a quick note to make sure that everyone knows that there is a NEW THREAD for STS 4.x specifically. I believe the current one is for previous versions. For the latest thread and 4.x STS, go here:

 

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

----------------------------------------------------

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