Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

You can look in includes/boxes folder for the different infoboxes name. In the case of the language box, you should create a template named infobox_languages.php.html

 

Infoboxes displayed in the central area are located in includes/modules and can be "templated" too.

 

- Rigadin

 

Hi Rigadin,

 

This seems very nice!

But in which way exactly i can template the boxes in the central area like

New Products, Featured Products and all the others?

Do i have to put a new place holder for them somewhere or so?

 

Thanks for your help,

Eric :D

Link to comment
Share on other sites

You only need to create a template with the right name, then your box will use it.

 

There is no placeholders for the content boxes, you have to modify the script, like index.php, to get rid of them or move them.

 

- Rigadin

Link to comment
Share on other sites

Service Pack 3 is out: 3 files to update to get GZip compression working.

New version is then 4.3.3 or 4.3 SP3

 

- Rigadin

Rigadin,

 

Thanks for working this out! Also, thanks for the help you have been giving in this forum. By the way, I can trust your code 99.9% of the time if not 100% of the time. :D

 

-Bill

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 know this isn't a shipping module board - but I'm hoping someone here might have an idea as to what to tell me to look for :)

 

For some reason my shipping info is not showing up during checkout (at all). So - I uploaded a brand spanking new fresh osC to my server in a new folder and had it connect to my existing database. Sure enough - when I go to checkout I get NO shipping info! :o So I'm thinking it has to be something to do with the database??

 

Any ideas on where I should look, or what I should look for?

 

TIA :D

~Tracy
 

Link to comment
Share on other sites

Since this board seems to get a lot of readers who understand PHP code I'm hoping one of them might be able to help me with tweaking this :blush:

 

I am trying to create a best sellers pull down menu (like the manufacturers one that comes with osC only for best sellers rather than manufacturers)

 

Here is what I have so far - but it doesn't work (it doesn't do anything at all - no errors and no menu)

 

<?php
// Display a drop-down for Best Sellers
 if (isset($current_category_id) && ($current_category_id> 0)) {
$best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS. " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . "p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
} else {
$best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
 }

 if (tep_db_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) {

 $best_sellers_array = array();
  if (MAX_DISPLAY_BESTSELLERS < 2) {
	$best_sellers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);
  }

  while ($best_sellers = tep_db_fetch_array($best_sellers_query)) {
	$best_sellers_name = ((strlen($best_sellers['pd.products_name']) > MAX_DISPLAY_BESTSELLERS_NAME_LEN) ? substr($best_sellers['pd.products_name'], 0, MAX_DISPLAY_BESTSELLERS_NAME_LEN) . '..' : $best_sellers['pd.products_name']);
	$best_sellers_array[] = array('id' => $best_sellers['p.products_id'],
								   'text' => $best_sellers_name);
  }

  $info_box_contents = array();
  $info_box_contents[] = array('form' => tep_draw_form('best_sellers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get'),
							   'text' => tep_draw_pull_down_menu('p.products_id', $best_sellers_array, (isset($HTTP_GET_VARS['p.products_id']) ? $HTTP_GET_VARS['p.products_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_BESTSELLERS_LIST . '" style="width: 100%"') . tep_hide_session_id());
}
?>

 

If you happen to spot anything that jumps out at ya as incorrect it would be greatly appreciated :)

~Tracy
 

Link to comment
Share on other sites

After having a bumpy start to using STS and osC, I've finally gotten the hang of things and am about 80% done with my client's site.

 

There are two things which are not working the way I'm expecting (though my expectations may be misplaced.

 

The first is on all my html templates, I've put the variables: $myaccountlogoff, $cartcontents and $checkout. When they display, they read

 

HEADER_TITLE_MY_ACCOUNT | HEADER_TITLE_LOGOFF	HEADER_TITLE_CART_CONTENTS	HEADER_TITLE_CHECKOUT

 

There are other variables, such as the new user page where I'm getting a similar output. The gif's which these variable are supposed to refer to are not loading, whereas many other gif's which are in the same images folder are loading fine. At first I thought that it was because I wasn't using $content in my sts_template.html or product pages, but when going to the login/acct creation page, I still get the same behavior. How do I get the text to read something else / get images to display, or where should I start looking for an error, typo or otherwise broken piece of code?

 

2nd, when the custom template folder is set, the $addtocartbutton doesn't seem to add items to the cart. When I turn the template back to test, then the default button works. Again, I wonder if this has to do with the $content variable being absent.

 

I'd appreciate any advice towards these ends.

 

Thanks in advance,

Sam

Link to comment
Share on other sites

Since this board seems to get a lot of readers who understand PHP code I'm hoping one of them might be able to help me with tweaking this :blush:

 

I am trying to create a best sellers pull down menu (like the manufacturers one that comes with osC only for best sellers rather than manufacturers)

 

Hmm - what does it mean when using the STS Debug mode you can see the start and end tags for an infobox but there is no information in between them? Here is what I'm getting from STS Debug for my attempt at a dropdown bestsellers box:

 

$sts->template['bestsellersbox_only']

<!-- start bestsellersbox_only //-->

 

<!-- end bestsellersbox_only //-->

 

I am just at a complete loss as to how to debug when I don't get any errors - I am simply not getting anything at all :blink:

 

I did change the code for the box slightly:

 

//best sellers query
 if (isset($current_category_id) && ($current_category_id> 0)) {
$best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS. " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . "p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
} else {
$best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
 }

// Display a drop-down for Best Sellers
 if (tep_db_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) {

 $best_sellers_array = array();
  if (MAX_DISPLAY_BESTSELLERS < 2) {
	$best_sellers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);
  }

  while ($best_sellers = tep_db_fetch_array($best_sellers_query)) {
	$best_sellers_name = ((strlen($best_sellers['products_name']) > MAX_DISPLAY_BESTSELLERS_NAME_LEN) ? substr($best_sellers['products_name'], 0, MAX_DISPLAY_BESTSELLERS_NAME_LEN) . '..' : $best_sellers['products_name']);
	$best_sellers_array[] = array('id' => $best_sellers['products_id'],
								   'text' => $best_sellers_name);
  }

  $info_box_contents = array();
  $info_box_contents[] = array('form' => tep_draw_form('best_sellers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get'),
							   'text' => tep_draw_pull_down_menu('products_id', $best_sellers_array, (isset($HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_BESTSELLERS_LIST . '" style="width: 100%"') . tep_hide_session_id());
}

~Tracy
 

Link to comment
Share on other sites

Hi,

 

First, the good: STS is great, makes it easy to customize osCommerce. Thanks! Now, my problem:

 

I'm trying to get my STS-templated store to work with Paypal Express Checkout from the Web Payments Pro 0.1 contribution and I'm having a problem with (I think) STS trashing the session upon the user's return from paypal. If I turn off my templates, everything works fine, but with the templates active the user's session ID has changed after confirming their bill/ship to info on paypal.

 

Needless to say their shopping cart is now empty and the purchase can't go forward.

 

I'm guessing it has to do with the output buffering used by STS and the paypal module interfering with each other (both process.php, which happens before paypal, and return.php, after paypal, from the WPP contrib buffer their whole output).

 

The web payments pro part of the contrib works fine, I think because the user never leaves the store and so their session ID is preserved.

 

Anyone here have any insight? TIA.

 

Scott

Link to comment
Share on other sites

@Samuel:

The placeholders you are using ($myaccountlogoff, $cartcontents and $checkout) are text links, and you are probably missing some language files (constants name are displayed instead of their corresponding text). I guess you are not using english for your site, as these constants are standard. Check the STS doc chapter 4.1 to find placeholders for gifs instead of text.

 

@Tracy:

One way to create an STS variable is to do so in sts_user_code.php:

$sts->start_capture(); // Not needed if previous sts call is $sts->restart_capture(...);

include (myboxorwhateverfile.php);

$sts->stop_capture ('myvar'); // Use $myvar on your template. Use $sts->restart_capture ('myvar') if other variables are created after that.

 

If you create a variable for an infobox like in standard osc (which means there are some <tr><td> at the beginning and end of the infobox file), then you should use $sts->stop_capture ('myvar', 'box') or $sts->restart_capture ('myvar', 'box'). It seems that it's not your case, but just wanted to tell it.

 

@Scott:

I've seen WPP working with STS3 and I don't see how STS can interfere with sessions (basically STS does not care of session). Is there any JS involved in the WPP process? Maybe some JS code is missing when using STS?

 

- Rigadin

Link to comment
Share on other sites

@Tracy:

One way to create an STS variable is to do so in sts_user_code.php:

$sts->start_capture(); // Not needed if previous sts call is $sts->restart_capture(...);

include (myboxorwhateverfile.php);

$sts->stop_capture ('myvar'); // Use $myvar on your template. Use $sts->restart_capture ('myvar') if other variables are created after that.

 

If you create a variable for an infobox like in standard osc (which means there are some <tr><td> at the beginning and end of the infobox file), then you should use $sts->stop_capture ('myvar', 'box') or $sts->restart_capture ('myvar', 'box'). It seems that it's not your case, but just wanted to tell it.

- Rigadin

 

Thanks Rigadin - but I did try it via creating the variable, I then removed the variable I had created and went with the existing bestsellers_only variable (as I am simply replacing the code for the bestsellers.php infobox) and I still get the same result. STS is recognizing it is supposed to put the bestsellers infobox in (and has correct placement for it) but for some reason it is being left blank in between the start and end tags for where it goes :blink:

 

Any other thoughts on that one?

 

Got a new question too - when attempting to place the code (rather than an include) directly into sts_column_left and column_left.php files I get this error:

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/.lew/mmherbs/mountainmeadowherbs.com/includes/sts_templates/test/index.php.html on line 358

 

Any idea why this bit of code causes problems when it isn't used in an include:

<?php
mysql_free_result($Recordset1);
?>

 

It works as an include - but IE isn't rendering it properly as an include which is why I need to directly imbed the code into the page <_<

 

Thanks,

~Tracy
 

Link to comment
Share on other sites

@Samuel:

The placeholders you are using ($myaccountlogoff, $cartcontents and $checkout) are text links, and you are probably missing some language files (constants name are displayed instead of their corresponding text). I guess you are not using english for your site, as these constants are standard. Check the STS doc chapter 4.1 to find placeholders for gifs instead of text.

...

- Rigadin

 

First, thanks for your quick response.

 

I am using English as my default language (I think). Most of the other text fields populate just fine. In the case of the top navigation bar (accessing your account/logoff, cart contents, checkout), it does not. In the case of adding a new customer, the English titles for each field are properly displayed on the left side of the field, but on the right side, I see ENTRY_FIRST_NAME_TEXT, ENTRY_LAST_NAME_TEXT, etc. So it's not consistent, and moreover it's screwing up the formatting of the page.

 

That aside, I still can't seem to figure out why the 'add to cart' placeholder works on the default template but not my custom template. Do i have to have the cartbox loaded for that to work, is there a specific column or block which that function relies on? I'm not using the $content variable on my product pages, I'm just using the variables listed in the help file to present data in the appropriate place to match the original design given to me.

 

Thanks again for your response, and in advance for your or anyone else's future responses.

 

Sincerely,

Sam

Link to comment
Share on other sites

@Tracy:

There are some conditions to display the bestseller box, look carefully the code. Better use tep_ functions to access the database.

 

@Manuel:

Seems that your language files are corrupted. From admin you can see what languages are used in your store, with the folder where the corresponding files are located, try to find out where are your files and compare them with an original osC.

 

On you content template for product info, you should have $startform and $endform too. Look the default template delivered with the contribution, it has these 2 tags.

 

- Rigadin

Link to comment
Share on other sites

In my STS template I would like to add a couple of links to files that already exist in the osC system; "advanced_search.php" and "product_reviews.php" are a couple of examples.

 

I have no idea how to do this correctly because the shop uses multiple languages and using

<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>

hasn't worked.

 

Is this something that should be done in "sts_user_code.php"? I haven't figured out how.

 

I have checked through the forum and the "STSv4_2.doc". Maybe I'm missing something because of the terminology.

 

Please could somebody help me out here?

 

Best regards,

Link to comment
Share on other sites

@Scott:

I've seen WPP working with STS3 and I don't see how STS can interfere with sessions (basically STS does not care of session). Is there any JS involved in the WPP process? Maybe some JS code is missing when using STS?

 

- Rigadin

 

Hi Rigadin,

 

Thanks for the response. You're right, STS has nothing to do with my problem. After banging my head against the wall for hours, I finally figured out that I had moved the express checkout button from one page to another and that seemed to be the culprit. On the old page, the session ID seemed to pass properly, but not on the new one, so I wrote it explicity into the code.

 

I guess originally I was thinking there might have been problem with layered output buffering. The only mystery remaining is why it worked OK with STS turned off, but not with STS on, before my fix above. Since everything is now working, that is a mystery that shall remain unsolved.

 

Scott

Link to comment
Share on other sites

In my STS template I would like to add a couple of links to files that already exist in the osC system; "advanced_search.php" and "product_reviews.php" are a couple of examples.

 

I have no idea how to do this correctly because the shop uses multiple languages and using

<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>

hasn't worked.

 

Is this something that should be done in "sts_user_code.php"? I haven't figured out how.

 

I have checked through the forum and the "STSv4_2.doc". Maybe I'm missing something because of the terminology.

 

Please could somebody help me out here?

 

Best regards,

 

The right place to put the code is sts_user_code.php. You can do something like this:

$sts->template['searchlink'] = '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>'

and then use $searchlink on your template. This example will problably not work out of the box as I did not care of ' and " or \ in the string.

 

- Rigadin

Link to comment
Share on other sites

I entered the code as suggested

 

$sts->template['searchlink'] = '<a href="' . tep_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>';

(with a ";" at the end) into the top of "sts_user_code.php" and it worked perfectly.

 

Thank you so much.

Link to comment
Share on other sites

Hi all,

 

I hope this is the correct place for this...

 

I've tried updating from STS V4.0.7 to STS V4.2 with HTC2.5.9 (Bills pack).

 

I have made the file changes and also the database update - that worked OK.

 

It is in modules in admin and allows me to auto fill the tags although this occcurs so quickly I'm not sure it actually does.

None of my pages seem to display any tags. If I go to 'text control' i think the pages 'allprods', 'product_listing' etc are all in red and the text at the top says this is because they haven't got the correct code? What code?

 

If i go into page control and search for the pages not included none of these pages come up, if i try to include them again it says they already are....BUT they are in red in the other menu.

 

I did include headertags.php in the STS module settings.

 

Any ideas please?

 

Thanks

 

Becki

Link to comment
Share on other sites

@Tracy:

There are some conditions to display the bestseller box, look carefully the code. Better use tep_ functions to access the database.

 

- Rigadin

 

Hi Rigadin,

 

Here is what I have for code - does anything jump out at you as a big coding no no? :blush:

 

//best sellers query
 if (isset($current_category_id) && ($current_category_id > 0)) {
$best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c, " . TABLE_CATEGORIES . " c where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and p.products_id = p2c.products_id and p2c.categories_id = c.categories_id and '" . (int)$current_category_id . "' in (c.categories_id, c.parent_id) order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
 } else {
$best_sellers_query = tep_db_query("select distinct p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_ordered > 0 and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by p.products_ordered desc, pd.products_name limit " . MAX_DISPLAY_BESTSELLERS);
 }

// Display a drop-down for Best Sellers
 if (tep_db_num_rows($best_sellers_query) >= MIN_DISPLAY_BESTSELLERS) {

 $best_sellers_array = array();
  if (MAX_DISPLAY_BESTSELLERS < 2) {
	$best_sellers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);
  }

  while ($best_sellers = tep_db_fetch_array($best_sellers_query)) {
	$best_sellers_name = ((strlen($best_sellers['products_name']) > MAX_DISPLAY_BESTSELLERS_NAME) ? substr($best_sellers['products_name'], 0, MAX_DISPLAY_BESTSELLERS_NAME) . '..' : $best_sellers['products_name']);
	$best_sellers_array[] = array('id' => $best_sellers['products_id'],
								   'text' => $best_sellers_name);
  }

  $info_box_contents = array();
  $info_box_contents[] = array('form' => tep_draw_form('best_sellers', tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false), 'get'),
							   'text' => tep_draw_pull_down_menu('products_id', $best_sellers_array, (isset($HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : ''), 'onChange="this.form.submit();" size="' . MAX_BESTSELLERS_LIST . '" style="width: 100%"') . tep_hide_session_id());
}

~Tracy
 

Link to comment
Share on other sites

Got a new question too - when attempting to place the code (rather than an include) directly into sts_column_left and column_left.php files I get this error:

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/.lew/mmherbs/mountainmeadowherbs.com/includes/sts_templates/test/index.php.html on line 358

 

Any idea why this bit of code causes problems when it isn't used in an include:

<?php
mysql_free_result($Recordset1);
?>

 

It works as an include - but IE isn't rendering it properly as an include which is why I need to directly imbed the code into the page <_<

 

Thanks,

 

Ok - the code works when placed into sts_column_left.php - but if I place it into the index.html STS Template I get the mysql_free_result error ?? Any ideas why this bit of PHP causes an error when in the index.html file rather than the sts_column_left file?

~Tracy
 

Link to comment
Share on other sites

Please forgive me if this is one of those "answered many times" questions. I have been searching through the forums (using site:www.oscommerce.com/forums on Google) and scouring through my STSv4.2 User Manual and I just can't seem to find what I'm looking for :(

 

Is there a way that I can declare the $dmcategories so it isn't declared as an infobox?

 

ie... right now I have $sts->start_capture(); a long block of PHP and JavaScript code here and then $sts->restart_capture ('dmcategories', 'box'); at the end of it in my sts_column_left.php document.

 

Is there a way using something like $sts->template['dmcategories']; or $sts->block_code['dmcategories']; that I can somehow declare that $dmcategories in the template should call this long block of code that is a mix of PHP and JavaScript without considering it an infobox?

 

I'm sure many of you are now wondering "WHY???" LOL Because I need to have the Dynamenu contrib embedded into the page rather than being used as an include - AND I need to strip all of the table tags out of it. Being my template is setup via Layers and CSS, and Dynamenu runs as a Layer and is controlled through CSS as well, I don't need the table tags. However; having $dmcategories called as an infobox automatically puts it into the table tags. I've not been able to figure out how to remove the table tags for the boxes.php (in classes) so I'm now trying another route ;) The reason I need to do all of this is because IE6 doesn't render the menu properly when it is an include file and/or when it is inside of a table <_< The way I currently have it at least IE7 is rendering it properly - but it still has issues with IE6 which is why I'm now trying to find a new workaround for getting rid of the table tags :)

 

I know I've seen bits and pieces of info on $sts->template['variablename'] but I can't seem to find any that have info on putting more than HTML after that - nor how it should appropriately be ended.

 

TIA! Back to Google for more searching :D

~Tracy
 

Link to comment
Share on other sites

Hi all,

 

I hope this is the correct place for this...

 

I've tried updating from STS V4.0.7 to STS V4.2 with HTC2.5.9 (Bills pack).

 

I have made the file changes and also the database update - that worked OK.

 

It is in modules in admin and allows me to auto fill the tags although this occcurs so quickly I'm not sure it actually does.

None of my pages seem to display any tags. If I go to 'text control' i think the pages 'allprods', 'product_listing' etc are all in red and the text at the top says this is because they haven't got the correct code? What code?

 

If i go into page control and search for the pages not included none of these pages come up, if i try to include them again it says they already are....BUT they are in red in the other menu.

 

I did include headertags.php in the STS module settings.

 

Any ideas please?

 

Thanks

 

Becki

Becki, look at your specific page in question in a browser to see if the tags are working. For example, in IE, select "view" and then "source" and you should see the tag information regarding that page. Depending on the selections that you filled out in the "Fill Tags" options will depend upon what you see here. For example, if you chose to use the first 200 words in the product description, you should see this dynamically inserted into the HTML source code of that page.

 

If I go to 'text control' i think the pages 'allprods', 'product_listing' etc are all in red and the text at the top says this is because they haven't got the correct code? What code?
The code mentioned here would be what you would use if you did not have STS installed. That is one of the big benefits of using STS and HTC together, you do not have to manually enter the HTC code into every single page that you want to insert tag information. STS will do that for you as long as you did the "Fill Tags" option and inserted the proper variable into your STS template page (look at the sample blank template page for the required code and that is all you need for HTC to work with your STS template). If you want to manually add your own tag info for a particular page, which is something you will want to do for your home page, just select that page in the HTC admin panel and add your tag info. DO NOT ADD YOUR TAG INFO DIRECTLY ONTO YOUR TEMPLATE OR PHP PAGES. Always use the Fill Tags or the "text control" to do this.

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

Tracy,

 

Have you made some fake orders with your store? You should reach the value of MIN_DISPLAY_BESTSELLERS (admin configuration parameter) to display your bestsellers box. Without orders, there is not enough products to display.

 

mysql_free_result($Recordset1) inside a template does not work because the template is called from within the $sts class and this class does not know what is $Recordset1, so error. Try to add global $Recordset1 before calling the mysql stuff. But in my mind the template is not the right place to add sql queries!

 

About you menu box: it's not sts that put tables to your infoboxes. Calling $sts->restart_capture ('somename', 'box') only tells the function that some <tr><td> has to be removed from resulting code, before saving it into $sts->template['somename]. This is needed for all standard osC infoboxes. Most probably you don't need this second parameter for your menu box.

 

You can include a file instead of pasting all the code insode sts_column_left.php: if I write fast:

$sts->start_capture(); include(yourfile), $sts->stop_capture(yourtagname)

and better place the code in sts_user_code.php, then all the unofficial code is at the same place, it makes the things easier for you when upgrading to a next STS version.

 

- Rigadin

Link to comment
Share on other sites

Hi Bill,

 

Becki, look at your specific page in question in a browser to see if the tags are working. For example, in IE, select "view" and then "source" and you should see the tag information regarding that page. Depending on the selections that you filled out in the "Fill Tags" options will depend upon what you see here. For example, if you chose to use the first 200 words in the product description, you should see this dynamically inserted into the HTML source code of that page.

 

I think I did this and couldn't see any tag information...

 

 

STS will do that for you as long as you did the "Fill Tags" option and inserted the proper variable into your STS template page (look at the sample blank template page for the required code and that is all you need for HTC to work with your STS template).

 

I've looked at the sts_blank_template in your combined package but that just has some text to say 'this is a blank template' and also couldn't see anything in relation to HTC in 'sts_template'. What's this proper variable you've mentioned? I'm pretty sure I haven't added anything to my sts template while trying to install HTC?

 

Thanks

 

Becki

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