Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

Hi Bill,

 

I saw that you create a specific contribution for osocmmerce online merchant rc1. I installed this version of oscommerce, but installed the STS 4.5.2 before to know about the STS 4.5.3. Anyway to update only the modifications or I need to change all the pages again. Thanks.

 

Renato, DO NOT UPGRADE TO 4.5.3! If you already have 4.5.2 installed then you do not need to.

 

4.5.3 was created to make the installation easier for new Online Merchant RC1 store owners. It is the exact code and functionality as 4.5.2 but has all of the included files updated for the Online Merchant RC1 release.

 

For example: The application_top.php file has the same STS code as version 4.5.2 but also includes all of the Online Merchant RC1 updates as well. So if a new store owner wanted to just copy over the application_top.php file from the contribution without making the manual edits, he could do so and still maintain the most current osCommerce version of that file. Without STS4.5.3, that new store owner would have reverted his application_top.php file to the previous osCommerce 060817 release and would have caused problems with his Online Merchant RC1 version. The same goes for all of the other files included with STSv4.5.3.

Edited by bkellum

Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
David, STS will allow you to template the "content" of the product_info.php page only. Take a look at the sample template in the full/content/ folder. This content template will allow you to rearrange the layout of the product info page.

 

On all other pages, such as the one you mentioned, STS currently only allows your to modify the layout of the entire page, minus what is pulled in by the $content variable.

 

OK...now regarding what STS looks at regarding the $content variable. The $content is taken from the php script you are running. For example, the $content for index.php is the piece of code you find in index.php, between the call of column_left and the call of column_right. If you want to modify it, you have to modify the script itself.

 

Take a look at that area and see if it would be too daunting for you. Otherwise, I strongly suggest installing other contributions to make these modifications. For example: If you are wanting to change the content of the way the products are listed, say, make them in multible columns verses just separate rows, I would install the Products Listings in Columns contribution (http://www.oscommerce.com/community/contri...g+Column+Format).

 

The above contribution would actually be making changes to the same area that the STS $content tag represents for the listing of products.

 

I hope the above makes sense to you. It really is a solid way of modifying your osCommerce store to give it that custom look that you need.

 

I have a question regarding the $content.

 

I'm trying to add some extra information directly in shopping_cart.php, but nothing shows up on the page.

The $content only shows everything between <form> and </form>, and not from column left to column right. If I put the extra information before the last </form> it shows, otherwise not.

 

Is there an easy way to get STS to add the information after the </form> tag but before column_right.php?

Share this post


Link to post
Share on other sites

Yes there is..

You can create a file i.e. shopping_cart.php.html and put it in your sts-template-folder/content/

That template will replace all $content of the main template.

Share this post


Link to post
Share on other sites

Someone must know this.

In the STS content template, is there any way to replace the variable $optionchoices$ with the good old osCommerce default product options listing drop down box ?

Thanks in advance!

Amy

Share this post


Link to post
Share on other sites

I don't know if any one has had this problem, but I am trying to go into the template and set a background-repeat on the header, but it does not work I try to apple it to the table, and does not work, I have my logo setting on the left in the header, but when i try to set the background for it it does not work?

 

I'm starting to wonder if I'd be better editing the template from hand into the code by editing the files :)

Share this post


Link to post
Share on other sites

Which product_info.php file(s) are used by the templates in the content directory?

The one in the catalog directory or the one in the sts_templates directory?

Happily accepting any answers.

Share this post


Link to post
Share on other sites
Which product_info.php file(s) are used by the templates in the content directory?

The one in the catalog directory or the one in the sts_templates directory?

Happily accepting any answers.

 

 

Nevermind. I think the copy of product_info.php in my sts_templates dir is there by mistake.

Thanks.

Share this post


Link to post
Share on other sites
I don't know if any one has had this problem, but I am trying to go into the template and set a background-repeat on the header, but it does not work I try to apple it to the table, and does not work, I have my logo setting on the left in the header, but when i try to set the background for it it does not work?

 

I'm starting to wonder if I'd be better editing the template from hand into the code by editing the files :)

Try making the changes in the stylesheet regarding getting the background to repeat.

Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites
Try making the changes in the stylesheet regarding getting the background to repeat.

 

 

Ok, I'm sure I can figure it out, but I want to make sure I take the best route into doing this. I'm wanting to change the background

http://caraudiouniverse.net/

see where it says Categories, Whats new, New products for july I have images going to replace that, do I need to go directly the page that contains all the code because I think I'm going to have to remove the

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="11" height="14"></td>

corner_left.gif :)

Share this post


Link to post
Share on other sites

Never mind I got it, but theres another problem I didn't know the sts had a full thing to it :).

 

The problem I'm having now is that on the $headertext is that it putting a thickblue behind it, check this out at

http://caraudiouniverse.net/

Share this post


Link to post
Share on other sites

hey I am trying to figure out how to get lightbox to work and nothing is happning. I am doing all of the steps and it seems like nothing changes. Is there anything I need to know other than what the install.txt says?

Share this post


Link to post
Share on other sites

I redid everything on the site and tried again and it didn't work. I have 'More Pics' installed so I could't find the block of code that the install text asks for in the catalog/product_info.php, though all of the other files changed easily. Do I need to modify something other than just the install code? This may be pretty newbie of me but at the bottom of the install.txt it says 'As you can see it's the $template_pinfo['product_popup'] that has to be changed.' What has to be changed? :thumbsup:

 

Thanks again!

Edited by narghilenights

Share this post


Link to post
Share on other sites

Ok. The code for the popupwindow in catalog/product_info.php should look something like this (for More Pics 6)

 

document.write('<a href="java script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.(MOPICS_GROUP_WITH_PARENT=='true'?$mo_item:($mo_item+1))).'\')">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_width), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_height), 'hspace="5" vspace="5"') . '<br>'. tep_image(DIR_WS_IMAGES .'zoom.gif', TEXT_CLICK_TO_ENLARGE).TEXT_CLICK_TO_ENLARGE.'</a>');

 

I'm not extremely familiar with More Pics but try changing to:

/*
document.write('<a href="java script:popupWindow(\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id'].'&invis='.(MOPICS_GROUP_WITH_PARENT=='true'?$mo_item:($mo_item+1))).'\')">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_width), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_height), 'hspace="5" vspace="5"') . '<br>'. tep_image(DIR_WS_IMAGES .'zoom.gif', TEXT_CLICK_TO_ENLARGE).TEXT_CLICK_TO_ENLARGE.'</a>');
*/

document.write('<a rel="lightbox" href="'.tep_href_link(DIR_WS_IMAGES.$mopics_images[$mo_item].'&invis='.(MOPICS_GROUP_WITH_PARENT=='true'?$mo_item:($mo_item+1))).'" title="'. $product_info['products_name'] .' - '. $manufacturer['manufacturers_name'] .'">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_width), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_height), 'hspace="5" vspace="5"') . '<br>'. tep_image(DIR_WS_IMAGES .'zoom.gif', TEXT_CLICK_TO_ENLARGE).TEXT_CLICK_TO_ENLARGE.'</a>');

Share this post


Link to post
Share on other sites
Ok, I'm sure I can figure it out, but I want to make sure I take the best route into doing this. I'm wanting to change the background

http://caraudiouniverse.net/

see where it says Categories, Whats new, New products for july I have images going to replace that, do I need to go directly the page that contains all the code because I think I'm going to have to remove the

<td height="14" class="infoBoxHeading"><img src="images/infobox/corner_left.gif" border="0" alt="" width="11" height="14"></td>

corner_left.gif :)

 

It's looking pretty good. You might want to get rid of the language info box if your not gonna use it. Didn't see exactly what you were talking about though in the message ^.


Kenneth L. Argabright

www.BargainGiftsStore.com

KennethArgabright@bargaingiftsstore.com

 

- E-mail me for special savings for osCommerce users!

Share this post


Link to post
Share on other sites

Sorry..my mistake. I thought the script was needed for more pics.

 

In product_info.php.

 

Change

 

<script language="javascript"><!--
...code...
</script>
<noscript>
...code...
</noscript>

 

to:

<?php
echo '<a rel="lightbox" href="'.tep_href_link(DIR_WS_IMAGES.$mopics_images[$mo_item].'&invis='.(MOPICS_GROUP_WITH_PARENT=='true'?$mo_item:($mo_item+1))).'" title="'. $product_info['products_name'] .' - '. $manufacturer['manufacturers_name'] .'">' . tep_image(DIR_WS_IMAGES . $mopics_images[$mo_item], addslashes($product_info['products_name']), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_width), (MOPICS_RESTRICT_PARENT=='false'&&$mo_item==0&&MOPICS_GROUP_WITH_PARENT=='true'?'':$mopics_image_height), 'hspace="5" vspace="5"') . '<br>'. tep_image(DIR_WS_IMAGES .'zoom.gif', TEXT_CLICK_TO_ENLARGE).TEXT_CLICK_TO_ENLARGE.'</a>';
?>

Share this post


Link to post
Share on other sites

Hi,

 

I'm trying to integrate Google analytics with my commerce site, which has STS. I have found this contribution:

 

http://www.oscommerce.com/community/contri...oogle+analytics

 

But am unclear as to which version to use. The version that looks promising is the 5 Nov 2006 by chris web; however, on the very first step it says: to open "catalog/includes/sts_displap_output.php". I don't have an sts_displap_output.php in this directory. The newer contributions don't make sense to me at all because they are just one bit of code with no instructions.

 

Any direction would be greatly appreciated!

Share this post


Link to post
Share on other sites

I just added a combination of osCommerce Google Analytics module v.1.2.2 and google analytics with sts4 from this contribution http://www.oscommerce.com/community/contri...oogle+analytics. I wont know for sure if this is working for 24 hours but I think I have installed the checkout_success.php code wrong because it displays some information that is not supposed to be displayed. Here is an example of what is displayed to the user on the last page of the checkout process, that shouldn't be displayed: UTM:T|27||32.15||8.45|Springdale|Utah|United States UTM:I|27|161|Bumbleberry Jams 8oz (6 ct)|Bumbleberry Jam|23.70|1

 

 

Where did I go wrong?

 

Here are the instructions I fallowed for checkout_success.php:

 

3. Edit checkout_success.php  -	 

ADD right ABOVE the </body>  tag   (the bottom of the page)





<?php 
// osCoders.biz - Analystics - start 
	include(DIR_WS_MODULES . 'analytics/analytics.php'); 
// osCoders.biz - Analistics - end
?>

 

and in the GOOGLE ANALYTICS E-COMMERCE WITH STS4 I did the fallowing to checkout_success.php:

1 - install the google analytics files from the package as discribed.
2 - in checkou_success.php add just before : 

<?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?>
</table></form></td>
<!-- body_text_eof //-->

this code: 
<?php
//google analytics
  require(DIR_WS_MODULES . 'analytics/analytics.php')
?>

 

Thank you for any help.

Edited by pulp2

Share this post


Link to post
Share on other sites
I just added a combination of osCommerce Google Analytics module v.1.2.2 and google analytics with sts4 from this contribution http://www.oscommerce.com/community/contri...oogle+analytics. I wont know for sure if this is working for 24 hours but I think I have installed the checkout_success.php code wrong because it displays some information that is not supposed to be displayed. Here is an example of what is displayed to the user on the last page of the checkout process, that shouldn't be displayed: UTM:T|27||32.15||8.45|Springdale|Utah|United States UTM:I|27|161|Bumbleberry Jams 8oz (6 ct)|Bumbleberry Jam|23.70|1

 

 

Where did I go wrong?

 

Here are the instructions I fallowed for checkout_success.php:

 

3. Edit checkout_success.php  -	 

ADD right ABOVE the </body>  tag   (the bottom of the page)





<?php 
// osCoders.biz - Analystics - start 
	include(DIR_WS_MODULES . 'analytics/analytics.php'); 
// osCoders.biz - Analistics - end
?>

 

and in the GOOGLE ANALYTICS E-COMMERCE WITH STS4 I did the fallowing to checkout_success.php:

1 - install the google analytics files from the package as discribed.
2 - in checkou_success.php add just before : 

<?php if (DOWNLOAD_ENABLED == 'true') include(DIR_WS_MODULES . 'downloads.php'); ?>
</table></form></td>
<!-- body_text_eof //-->

this code: 
<?php
//google analytics
  require(DIR_WS_MODULES . 'analytics/analytics.php')
?>

 

Thank you for any help.

Just a shot in the dark (I don't use these contributions)...

Make the edit

require(DIR_WS_MODULES . 'analytics/analytics.php')

INSTEAD of the

include(DIR_WS_MODULES . 'analytics/analytics.php');

modification.

You may also need to add this to the files to include in your STS modules in the admin.


Bill Kellum

 

Sounds Good Productions

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

Share this post


Link to post
Share on other sites

Update: vertical + horizontal dynamenus now working under sts. contrib package expected this evening 21stJuly07 british summer time.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×