Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

ok but then to include it in the template... how would i make a tag to display it. cause even if i installed it the reviews wouldnt be on the STS template.

 

thanks for help so far very much though your the best mate, i respect your effots.

 

Bob, take a look at the following post that details how STS interacts with other contributions:

http://forums.oscommerce.com/index.php?s=&...t&p=1252270

 

Hope this helps,


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

Ok I tryed and basicly the edits that i did for the product_info.php wont work in the sts_inc one cause they are totaly different.

 

Here is what it says...

 

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

 

Step 4:

OPEN catalog/product_info.php

 

Please Note:

Since there are so many contributions and changes to the product_info.php file, I have included a copy of my file for you to view and compare which is highly modified. To see what my file will do, go to my site and check it out.

 

LOOK for:

<td class="main"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?></td>
			<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>

 

Change to:

<?php
// BEGIN PopTheTop Product Info Reviews
?>
				 <TD ALIGN="left" VALIGN="middle" CLASS="main">
<?php
 if (MAX_REVIEWS_IN_PRODUCT_INFO == '0') {
   echo tep_draw_separator('pixel_trans.gif', '100', '2') . '<br><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>	';
 }

if (tep_session_is_registered('customer_id')) {
  $product_notification_query = tep_db_query("select count(*) as count from " . TABLE_PRODUCTS_NOTIFICATIONS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and customers_id = '" . (int)$customer_id . "'");
  $check = tep_db_fetch_array($product_notification_query);

  $notification_exists = (($check['count'] > 0) ? true : false);
} else {
  $notification_exists = false;
}

if ($notification_exists == true) {
  echo '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify_remove', $request_type) . '">' . tep_image_button('button_remove_notifications.gif', IMAGE_BUTTON_REMOVE_NOTIFICATIONS) . '</a>';
} else {
  echo '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('action')) . 'action=notify', $request_type) . '">' . tep_image_button('button_notifications.gif', IMAGE_BUTTON_NOTIFICATIONS) . '</a>';
}
?>
</TD>
			<TD ALIGN="right" VALIGN="middle" CLASS="main"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART, 'width="120" height="22"'); ?></TD>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>





<?php
	  $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
	  $reviews = tep_db_fetch_array($reviews_query);
	  $reviews_query_average = tep_db_query("select (avg(reviews_rating)) as average_rating from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
	  $reviews_average = tep_db_fetch_array($reviews_query_average);
	  $reveiws_stars = $reviews_average['average_rating'];
	  $reveiws_rating = number_format($reveiws_stars,0);
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '45'); ?></td>
  </tr>
<?php
if (MAX_REVIEWS_IN_PRODUCT_INFO > 0) {
 $reviews_query = tep_db_query("select r.reviews_id, rd.reviews_text, r.reviews_rating, r.date_added, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . $HTTP_GET_VARS['products_id'] . "' and rd.reviews_id = r.reviews_id and rd.languages_id = '" . $languages_id . "' order by r.reviews_id DESC");
 $num_rows = tep_db_num_rows($reviews_query);
?>
  <tr>
	<td>
	  <table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageReviewHeading" valign="top"><?php echo BOX_HEADING_REVIEWS; ?></td>
	  </tr>
	</table>
	  </td>
  </tr>
<?php
 if ($num_rows > 0) {
$row = 0;
while (($reviews_values = tep_db_fetch_array($reviews_query)) && ($row < MAX_REVIEWS_IN_PRODUCT_INFO)) {
  $row++;
  $date_added = tep_date_short($reviews_values['date_added']);
	// Write product reviews
?>
<?php
// END PopTheTop Product Info Reviews
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	  <td>
		<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
			<tr class="infoBoxContents">
				<td>
				<table border="0" width="100%" cellspacing="0" cellpadding="2">
					<tr>
						<td valign="top" class="main"><?php echo '<FONT COLOR="#006699"><b>Submited By:</b> ' . $reviews_values['customers_name'] . ' on <span class="smallText">' . $date_added . '</span></font><br>' . tep_break_string(nl2br(tep_output_string_protected($reviews_values['reviews_text'])), 60, '-<br>') . '<br><br>' . sprintf(tep_image(DIR_WS_IMAGES . 'stars_' . $reviews_values['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $reviews_values['reviews_rating']))) ?></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
  </tr>
<?php
} // END while (($reviews_values...
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '15'); ?></td>
  </tr>
  <tr>
	<td>
	<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
		<tr class="infoBoxContents">
				<td>
				<table border="0" width="100%" cellspacing="0" cellpadding="2">
					<tr>
						<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
						<TD ALIGN="left" VALIGN="middle" CLASS="main">
<?php
if ($num_rows > MAX_REVIEWS_IN_PRODUCT_INFO) {
	echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, substr(tep_get_all_get_params(), 0, -1)) . '">' . tep_image_button('button_more_reviews.gif', IMAGE_BUTTON_MORE_REVIEWS) . '</a></td>';
	echo '							<TD ALIGN="right" VALIGN="middle" CLASS="main"><a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, substr(tep_get_all_get_params(), 0, -1)) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a></td>';
	echo '							<td width="10">' . tep_draw_separator('pixel_trans.gif', '10', '1') . '</td>';
 } else {
	echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, substr(tep_get_all_get_params(), 0, -1)) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a></td>';
 }
?>
					</tr>
				</table>
				</td>
		</tr>
	</table>
	  </td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></td>
  </tr>
<?php
   if ($reviews['count'] > 0) {
?>
  <tr>
	  <td class="smallText">
	  <table width="100%">
			<tr>
				<td align="left" class="smallText"><FONT COLOR="#006699"><?php echo TEXT_REVIEW_AVERAGE . ': ' . tep_image(DIR_WS_IMAGES . 'stars_' . $reveiws_rating . '.gif', '', 60, 12, 'align=absmiddle') . '</a>'; ?></font></td>
				<td align="right" class="smallText"><FONT COLOR="#006699"><?php echo sprintf(TEXT_DISPLAY_NUMBER_OF_REVIEWS_PRODUCT_INFO, $row, $num_rows); ?></font></td>
			</tr>
		</table>
		</td>
	</tr>
<?php
   } else {
?>
  <tr>
	<td class="smallText"><FONT COLOR="#006699"><?php echo sprintf(TEXT_DISPLAY_NUMBER_OF_REVIEWS_PRODUCT_INFO, $row, $num_rows); ?></font></td>
  </tr>
<?php
   }
?>

<?php
} else { // if ($num_rows < 0)...
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '5'); ?></td>
  </tr>
  <tr>
	  <td>
		<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
			<tr class="infoBoxContents">
				<td>
				<table border="0" width="100%" cellspacing="0" cellpadding="2">
					<tr>
						<td valign="top" class="main"><?php echo TEXT_NO_REVIEWS . '<br><br>	 <a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, substr(tep_get_all_get_params(), 0, -1)) . '">' . tep_image_button('button_write_review.gif', IMAGE_BUTTON_WRITE_REVIEW) . '</a>'; ?></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
  </tr>
<?php
 }
}
// END PopTheTop Product Info Reviews
?>

 

Could you tell me how to implament that into sts please. Also the rest of the installation was only abit of database and language files so thats it really.

Share this post


Link to post
Share on other sites
Ok I tryed and basicly the edits that i did for the product_info.php wont work in the sts_inc one cause they are totaly different.

 

Here is what it says...

 

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

 

Step 4:

OPEN catalog/product_info.php

 

Please Note:

Since there are so many contributions and changes to the product_info.php file, I have included a copy of my file for you to view and compare which is highly modified. To see what my file will do, go to my site and check it out.

 

......

 

Could you tell me how to implament that into sts please. Also the rest of the installation was only abit of database and language files so thats it really.

Bob,

You only need to edit the sts_inc/product_info.php file if you are using content templates. If you are NOT using content templates, then STS should pick up the edits in the stock product_info.php file automatically with the $content tag. If it isn't, then you may not have installed the other contribution correctly. Another issue could be if the contribution needs some JavaScript to be inserted into your template to make it work. Look into that area.


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

Thanks, I do use the content template. But what i'm saying is in the content template it wont show the reviews from the CONTRIBUTION cause there is no tag to refer to them within STS.

Share this post


Link to post
Share on other sites

Hello Bill,

I am having a problem with virtual products and STS Product_info templates.

 

I installed osCommerce rc2.2 uploaded all my virtual products and verified they were able to be purchased and downloaded, I then installed STS 4.5.8 created an index.php.html and a default.php.html template and it works with the downloadable products as well until I ask it to use templates for the product_info.php pages.

 

 

Once the use product_info templates option in the STS Module is activated I Can not download my products... It seems to treat them as if they were niot virtual products, it asks me for shipping information and never offers a download link once the purchase is complete.

 

I use a default template globally and I created a content template, named it product_info.php.html and placed it in sts_templates/[mytemplate]/content folder.

 

Thanks in Advance

Share this post


Link to post
Share on other sites

Hi Everyone! I'm hoping someone can help me.

 

I have installed the most recent STS, and the Free of Charge module... set up my own template - it turned out perfectly. Everything worked great, and then out of no where, my larger download files stopped working. :( I thought it was a DB issue or something so I began the reinstall process. It took an entire day of installing over and over to finally realize that if I just turn STS off, the downloads work. When I turn it on, they come up as not being there when you click the download link. I've picked apart this forum trying to find someone who had a similar problem but can't seem to find anything.

 

Considering everything started out fine, you would think it was something to do with my host, right? I just don't know where to begin to figure that out. I sent a support ticket in and they said it wasn't anything they could fix, and that the store wasn't installed properly. (Makes no sense to me considering the smaller downloads worked and the large ones originally worked)

 

I'm at a loss now. I love this contribution and how easy it is to use. Any help anyone can give would be GREATLY appreciated.

 

Thanks

Michelle

Edited by michelleherron

Share this post


Link to post
Share on other sites
Hi Everyone! I'm hoping someone can help me.

 

I have installed the most recent STS, and the Free of Charge module... set up my own template - it turned out perfectly. Everything worked great, and then out of no where, my larger download files stopped working. :( I thought it was a DB issue or something so I began the reinstall process. It took an entire day of installing over and over to finally realize that if I just turn STS off, the downloads work. When I turn it on, they come up as not being there when you click the download link. I've picked apart this forum trying to find someone who had a similar problem but can't seem to find anything.

 

Considering everything started out fine, you would think it was something to do with my host, right? I just don't know where to begin to figure that out. I sent a support ticket in and they said it wasn't anything they could fix, and that the store wasn't installed properly. (Makes no sense to me considering the smaller downloads worked and the large ones originally worked)

 

I'm at a loss now. I love this contribution and how easy it is to use. Any help anyone can give would be GREATLY appreciated.

 

Thanks

Michelle

 

I had a similar problem and I renamed all of my download folders, made sure the new name was reflected in the config file, made double sure that the two renamed folders , formerly pub and download were set to have read and write permission (777 on apache). I also renames all of my download files to a short one word file name like file1. ext file 2.ext. All of my downloads worked fine after that. They are all over 150 MB. Also, make sure whatever user you are using to test has an empty cart and no orders before each test.

 

I have posted a new problem above however that seems to be related to the product_info template, maybe Bill will be able to shed some additional light on this

Edited by jrd1mra

Share this post


Link to post
Share on other sites
Hello Bill,

I am having a problem with virtual products and STS Product_info templates.

 

I installed osCommerce rc2.2 uploaded all my virtual products and verified they were able to be purchased and downloaded, I then installed STS 4.5.8 created an index.php.html and a default.php.html template and it works with the downloadable products as well until I ask it to use templates for the product_info.php pages.

 

 

Once the use product_info templates option in the STS Module is activated I Can not download my products... It seems to treat them as if they were niot virtual products, it asks me for shipping information and never offers a download link once the purchase is complete.

 

I use a default template globally and I created a content template, named it product_info.php.html and placed it in sts_templates/[mytemplate]/content folder.

 

Thanks in Advance

Jared,

That's odd since STS doesn't care if the products are virtual or real. This would most likely be due to a misconfiguration of your product attributes in the admin. More importantly, the product_info template only applies to the product description page, not the checkout process or checkout success page.

 

The majority of my products are virtual and I do not have any issues at all. You may benefit from a forum thread that I began regarding the osCommerce Download Feature:

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

 

Hope that helped,


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
Hi Everyone! I'm hoping someone can help me.

 

I have installed the most recent STS, and the Free of Charge module... set up my own template - it turned out perfectly. Everything worked great, and then out of no where, my larger download files stopped working. :( I thought it was a DB issue or something so I began the reinstall process. It took an entire day of installing over and over to finally realize that if I just turn STS off, the downloads work. When I turn it on, they come up as not being there when you click the download link. I've picked apart this forum trying to find someone who had a similar problem but can't seem to find anything.

 

Considering everything started out fine, you would think it was something to do with my host, right? I just don't know where to begin to figure that out. I sent a support ticket in and they said it wasn't anything they could fix, and that the store wasn't installed properly. (Makes no sense to me considering the smaller downloads worked and the large ones originally worked)

 

I'm at a loss now. I love this contribution and how easy it is to use. Any help anyone can give would be GREATLY appreciated.

 

Thanks

Michelle

Again, the download feature has nothing to do with STS. Something has changed in your shop since the last time it was working properly and it wouldn't have anything to do with STS.

 

Has your host upgraded PHP or MySQL or changed any server configuration settings?

 

What other contributions do you have installed that may have non-friendly PHP5 or MySQL5 code or queries?

 

Also, if you are not using the latest version of osCommerce (RC2a), then you may need to upgrade.


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
Again, the download feature has nothing to do with STS. Something has changed in your shop since the last time it was working properly and it wouldn't have anything to do with STS.

 

Has your host upgraded PHP or MySQL or changed any server configuration settings?

 

What other contributions do you have installed that may have non-friendly PHP5 or MySQL5 code or queries?

 

Also, if you are not using the latest version of osCommerce (RC2a), then you may need to upgrade.

 

 

Thank you for responding. There haven't been any upgrades by my host according to them. (I actually asked that in my original support ticket) I was only running the free of charge contribution. Other than that & STS, it was a clean install of RC2a. :blink: Again, thank you for responding.

 

Michelle

Share this post


Link to post
Share on other sites
Jared,

That's odd since STS doesn't care if the products are virtual or real. This would most likely be due to a misconfiguration of your product attributes in the admin. More importantly, the product_info template only applies to the product description page, not the checkout process or checkout success page.

 

The majority of my products are virtual and I do not have any issues at all. You may benefit from a forum thread that I began regarding the osCommerce Download Feature:

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

 

Hope that helped,

 

I figured out the problem, I was not including $optionnames$ $optionchoices$ in my product_info Content template. I assumed since I only had one option, that would be windows/english that it was unnecessary. It turns out without it it would not provide the download link. Once I added them the problem was fixed.

 

Also your thread you suggested above about downloadable products should be included in the OScommerce user guide. That makes the set up of virtual products simple and easy. No where in that guide does it say that you need to select an option and option value in order for downloads to work properly.

 

Your product is great, I am now ready to go live!

Edited by jrd1mra

Share this post


Link to post
Share on other sites
I figured out the problem, I was not including $optionnames$ $optionchoices$ in my product_info Content template. I assumed since I only had one option, that would be windows/english that it was unnecessary. It turns out without it it would not provide the download link. Once I added them the problem was fixed.

 

Also your thread you suggested above about downloadable products should be included in the OScommerce user guide. That makes the set up of virtual products simple and easy. No where in that guide does it say that you need to select an option and option value in order for downloads to work properly.

 

Your product is great, I am now ready to go live!

I didn't know we were not troubleshooting the stock templates. Glad you figured it out.


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

Hello!

 

Im really curious.

 

Index.php(.html) is the home page, the first page. The product.php(.html) is the product page.

What is the name of the page in between? You know when you click on a category and the product line up on a list.

I would like to change the way it is structured.

Do I make sense?

 

Hope so..

 

All the best!

 

,

Tim

Share this post


Link to post
Share on other sites

Ok I have just installed product tabs addon. I am just wondering how I can make a tab for my product_info.php content template to display them.

Share this post


Link to post
Share on other sites
Hello!

 

Im really curious.

 

Index.php(.html) is the home page, the first page. The product.php(.html) is the product page.

What is the name of the page in between? You know when you click on a category and the product line up on a list.

I would like to change the way it is structured.

Do I make sense?

 

Hope so..

 

All the best!

 

,

Tim

See Post 3755 or read the documents in the 'doc' folder that came with the contribution:

 

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


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

bkellum I saw on the other STS thread you said its easy to implament product tabs addon with STS content page. Could you please post quickly how you managed it? Thanks.

Share this post


Link to post
Share on other sites

Managed to make the tag myself after looking at how you changed the code in another post..

 

$sts->start_capture();
print '<TABLE CELLPADDING="3" CELLSPACING="0" WIDTH="100%" STYLE="BORDER: 0PX SOLID #000000;background: #FFFFFF;">';
print '<tr>';
print '<td>';
  include(DIR_WS_MODULES . 'product_tabs.php');
print '</td></tr></table>';
$sts->stop_capture ('tabsbox'); // Get the result to the main array
$template_pinfo['tabsbox']= $sts->template['tabsbox']; // Put it in the product info

Share this post


Link to post
Share on other sites
Hello!

 

Im really curious.

 

Index.php(.html) is the home page, the first page. The product.php(.html) is the product page.

What is the name of the page in between? You know when you click on a category and the product line up on a list.

I would like to change the way it is structured.

Do I make sense?

 

Hope so..

 

All the best!

 

,

Tim

 

See Post 3755 or read the documents in the 'doc' folder that came with the contribution:

 

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

 

Hello there again!

 

Still this (these) question(s) I cant find an answer to. Hope there is one, or maby two answer(s).

 

In the Module config files I read

With this module you have the possibility to define a separate "content template" that will replace the $content of the main template.

But later all I find is $content for the product.php_ .html page.

 

I know how to create a page to change the $content in the product.php.html page. Name it product_info.php_(category id)_(product id).html and place it in the content folder.

Is it possible to create a content template with some other page? Like the index.php.html?

 

Is it possible to show the products a list of thumbnails 3 in a row with sts, on the category page?

 

Im glad for any answers, speceally good ones ;) or just point me in the right direction....

 

Sincerely,

Tim

Share this post


Link to post
Share on other sites
Hello there again!

 

Still this (these) question(s) I cant find an answer to. Hope there is one, or maby two answer(s).

 

In the Module config files I read

With this module you have the possibility to define a separate "content template" that will replace the $content of the main template.

But later all I find is $content for the product.php_ .html page.

 

I know how to create a page to change the $content in the product.php.html page. Name it product_info.php_(category id)_(product id).html and place it in the content folder.

Is it possible to create a content template with some other page? Like the index.php.html?

 

Is it possible to show the products a list of thumbnails 3 in a row with sts, on the category page?

 

Im glad for any answers, speceally good ones ;) or just point me in the right direction....

 

Sincerely,

Tim

 

The post, if you read it, answered a lot of your questions. For example, you asked about the template pages "in the middle" and that was answered in that post. You also made reference about using a template for the home page and that should be index.php_0.html as mentioned in previous posts in this thread.

 

To answer your content template question, yes, it can be done but you will have to do it yourself as it is not included in the current version.

 

Content template for new page

 

If you are using STS 4.5 or higher, and want to create a totally new page that for example displays some text, you can do it with only few lines of code.

  1. Create an empty new page in catalog, for example mypage.php
  2. As for all catalog pages, you have to first call application_top.php
    require('includes/application_top.php');


  3. As we have not created a STS module for this new page, STS will use the Default module. The Default module can handle content templates, you just have to tell it which one. In our example, we will use the content template mypage.php.html, located in the content folder of the actual template set.
    $sts->script->content_template_file = STS_TEMPLATE_DIR . "content/mypage.php.html";

    Note that STS has a predefined name for a default content template: $sts->default_content_template, so you can modify the logic above to use it if the mypage.php.html is not found on the server. The name of this default content template is sts_template.html (must be located in the content folder).

  4. Placeholders must now be created. Place them in the $template_content array. The example below defines the following placeholders:
    {$content}, {$image}, {$button_right}. 
    $template_content = array(); // Create the array
    
    $template_content['content'] = TEXT_DESCRIPTION_MYPAGE; // Define this text in language file
    
    $template_content['image'] = tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
    
    $template_content['buttonright'] = '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>';

    Note that if you have a lot of code to place here, you may want to put it in another file and just include it from here. Generally, extra files for STS are placed in catalog/includes/modules/sts_inc

  5. Placeholders have been created, we can now continue like a normal page, by calling the header, columns and footer. As we are using a content template, we don't need to process all the original osCommerce files:
      require(DIR_WS_INCLUDES . 'header.php'); // Get messages if any
     require(DIR_WS_MODULES . 'sts_inc/sts_column_left.php'); // Get infoboxes
     require(DIR_WS_INCLUDES . 'application_bottom.php'); // Finish, print everything


  6. That's it, you now have a new page using a content template. Be careful of one thing though; if several pages are using the same template, all these pages must create the same placeholders, empty if needed. Otherwise you will see the name of the placeholder when watching some of your pages!

Sorry, I do not have the time to go into detail on the above but posted what it would take in order for you to create a content template other than the one that was provided for the product_info.php file.


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

TIP

Here is a quick rundown of common template names:

 

  • sts_template.html
    • = Default template

    [*]index.php.html

    • = Default Category template (used for all category pages that do not have a specific template page created for it – if you didn’t have this template, STS would use sts_template.html).

    [*]index.php_0.html

    • = Home page template

    [*]index.php_x.html

    • = Specific category template where x = the category ID.

    [*]index.php_x_y.html

    • = Specific subcategory template where x = the category ID and y = the subcategory ID

    [*]product_info.php.html

    • = Default Product template (used for all products, in all categories, if no specific product template is found).

    [*]product_info.php_c23.html

    • = Product template for all products in a specific category (23 in this example – change to the category ID needed)

    [*]product_info.php_23.html

    • = CONTENT template for product ID 23. All content template should be saved in the SGP/content/ folder. Review the sample content template provided in the STS template “full/content” folder. The STS Module Product Info must be enabled in order to use this STS feature. This template is not recommended unless you really know what you are doing since you would need to make modifications to it if you ever added new osCommerce contributions to your shop.

    [*]popup_image.php.html

    • = Template for the product popup image.

    [*]index.php.mfr.html

    • = Default Manufacturer template page (used for all manufacturer pages that do not have a specific template page created for it - if you didn’t have this template, STS would use sts_template.html).

    [*]index.php.mfr_x.html

    • = Specific Manufacturer template where x = the manufacturer ID.


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
TIP

Here is a quick rundown of common template names:

 

  • sts_template.html
    • = Default template

    [*]index.php.html

    • = Default Category template (used for all category pages that do not have a specific template page created for it – if you didn’t have this template, STS would use sts_template.html).

    [*]index.php_0.html

    • = Home page template

    [*]index.php_x.html

    • = Specific category template where x = the category ID.

    [*]index.php_x_y.html

    • = Specific subcategory template where x = the category ID and y = the subcategory ID

    [*]product_info.php.html

    • = Default Product template (used for all products, in all categories, if no specific product template is found).

    [*]product_info.php_c23.html

    • = Product template for all products in a specific category (23 in this example – change to the category ID needed)

    [*]product_info.php_23.html

    • = CONTENT template for product ID 23. All content template should be saved in the SGP/content/ folder. Review the sample content template provided in the STS template “full/content” folder. The STS Module Product Info must be enabled in order to use this STS feature. This template is not recommended unless you really know what you are doing since you would need to make modifications to it if you ever added new osCommerce contributions to your shop.

    [*]popup_image.php.html

    • = Template for the product popup image.

    [*]index.php.mfr.html

    • = Default Manufacturer template page (used for all manufacturer pages that do not have a specific template page created for it - if you didn’t have this template, STS would use sts_template.html).

    [*]index.php.mfr_x.html

    • = Specific Manufacturer template where x = the manufacturer ID.

 

 

Thank you sir!

 

The last post made most sense to me..

I guess I need to read up on my php to implement the other info.

 

Thank you and have a nice day!

Sincerely,

Tim

Share this post


Link to post
Share on other sites

Hi,

I want to put a flash (swf) to be the logo of the store. I've just added it in sts_template.html in dreamweaver. It works when I check the HTML file seprately. But dosen't work in my store. It's just a blank space.... Why?

 

I'm not using the variables for logo in STS, just a swf seprately. Should I change the php files?

 

Thanx for all your helps.

 

 

sorry for trouble you....Its the position of the swf file....I founded. But I cannot delete this post, just by the way...

Edited by hoken

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

×