Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Hi, I'm sorry if this has already been answered but I couldn't find a previous post that would answer my question. Which is...

 

After installing STS on OCS2.2 rc2 I get "Template file does not exist: [includes/sts_template.html] " in the upper left corner of the page. ( Following that is the usual OSC page layout.) Did I miss something in the setup? I have turned on the module in the admin section and here are the settings:

 

Default template (v2.1.1)

 

Use Templates?

true

 

Code for debug output

debug

 

Files for normal template

sts_user_code.php

 

Base folder

includes/sts_templates/

 

Template folder

test

 

Default template file

sts_template.html

 

Use template for infoboxes

false

 

 

I guess the path info isn't being passed on to the right place but i don't know how to troubleshoot this. I've done the no-brainer stuff like reinstalled everything and checked it twice... Obviously I'm still missing something. Oh, and this was a new install with STS being the first thing I'm installing.

 

Any help would be greatly appreciated. Thanks!

 

'-Richard

Link to comment
Share on other sites

Hi, I'm sorry if this has already been answered but I couldn't find a previous post that would answer my question. Which is...

 

After installing STS on OCS2.2 rc2 I get "Template file does not exist: [includes/sts_template.html] " in the upper left corner of the page. ( Following that is the usual OSC page layout.) Did I miss something in the setup? I have turned on the module in the admin section and here are the settings:

 

Default template (v2.1.1)

 

Use Templates?

true

 

Code for debug output

debug

 

Files for normal template

sts_user_code.php

 

Base folder

includes/sts_templates/

 

Template folder

test

 

Default template file

sts_template.html

 

Use template for infoboxes

false

 

 

I guess the path info isn't being passed on to the right place but i don't know how to troubleshoot this. I've done the no-brainer stuff like reinstalled everything and checked it twice... Obviously I'm still missing something. Oh, and this was a new install with STS being the first thing I'm installing.

 

Any help would be greatly appreciated. Thanks!

 

'-Richard

Richard,

 

  1. Change the template folder name to "full" and let me know if the error message goes away. If not, please post the complete error message.
  2. Also, you didn't try to install an earlier version of STS such as STS 2 or 3 prior to this did you?
  3. If you can't get this to work, make sure you uploaded the STS files into the proper location on your server. Do a compare using a file comparison utility such as Beyond Compare or WinMerge.

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

Richard,

 

  1. Change the template folder name to "full" and let me know if the error message goes away. If not, please post the complete error message.
  2. Also, you didn't try to install an earlier version of STS such as STS 2 or 3 prior to this did you?
  3. If you can't get this to work, make sure you uploaded the STS files into the proper location on your server. Do a compare using a file comparison utility such as Beyond Compare or WinMerge.

 

Had the same issue when I first installed.... Restored my database, re-installed and all was fine after double checking all entries.

Link to comment
Share on other sites

I'm trying to add the imprint contribution my site. I have it installed, and if I use the below code that I put in includes/modules/sts_inc/product_info.php, the imprint box seems to show up on my product info page:

// Text Attributes
$text_attributes_query = tep_db_query("select pta.* from products_text_attributes as pta, products_text_attributes_enabled as ptae where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = " . tep_get_prid($HTTP_GET_VARS['products_id']));
while ($text_attributes = tep_db_fetch_array($text_attributes_query)) {
$template_pinfo['monogramtextbox'] .= '<tr><td class=main>' . $text_attributes['products_text_attributes_name'] . ': ' . tep_draw_input_field('products_text_attributes_' . $text_attributes['products_text_attributes_id'], '');
}
// Text Attributes

The problem with the above code, is that if I have a product that I have not entered with the imprint option, then I get this printed on my page:

 

$monogramtextbox$

 

How can I get this to only show up if the product has the imprint option checked? I have tried the below, which seems to take care of if the product does not have the imprint option (it doesn't display it), but then for items that do have the option, it prints $monogramtextbox$:

// Text Attributes
$text_attributes_query = tep_db_query("select pta.*, count(*) as total from products_text_attributes as pta, products_text_attributes_enabled as ptae where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = " . tep_get_prid($HTTP_GET_VARS['products_id']));

$text_attributes = tep_db_fetch_array($text_attributes_query);
//print_r($text_attributes);

if ($text_attributes['total'] > 0) {
//echo "monogram";
while ($text_attributes = tep_db_fetch_array($text_attributes_query)) {
$template_pinfo['monogramtextbox'] .= $text_attributes['products_text_attributes_name'] . ': ' . tep_draw_input_field('products_text_attributes_' . $text_attributes['products_text_attributes_id'], '');
} 
} else {
//echo "no monogram";
$template_pinfo['monogramtextbox'] = '';
}	
// Text Attributes

Thanks.

 

I'm also having issues showing the $alsopurchased$ information on my product info page.

Link to comment
Share on other sites

Richard,

 

  1. Change the template folder name to "full" and let me know if the error message goes away. If not, please post the complete error message.
  2. Also, you didn't try to install an earlier version of STS such as STS 2 or 3 prior to this did you?
  3. If you can't get this to work, make sure you uploaded the STS files into the proper location on your server. Do a compare using a file comparison utility such as Beyond Compare or WinMerge.

 

Thanks for the help.. i tried changing the template folder to full from test but that didn't work. The complete error I get is "Template file does not exist: [includes/sts_template.html] " here is the URL for my site so you can see what I mean:

 

http://www.us-inmigracion-explicado.com/in...onDVD/index.php

 

This was from a new install of OSC 2.2 rc2 with STS 4.5.8. I've reinstalled the files about three times now. (manually once as well) should I create a new DB and install again? I've tried to figure out what makes that call but I haven't figured it out yet. Again, thanks for your help!

Link to comment
Share on other sites

Thanks for the help.. i tried changing the template folder to full from test but that didn't work. The complete error I get is "Template file does not exist: [includes/sts_template.html] " here is the URL for my site so you can see what I mean:

 

http://www.us-inmigracion-explicado.com/in...onDVD/index.php

 

This was from a new install of OSC 2.2 rc2 with STS 4.5.8. I've reinstalled the files about three times now. (manually once as well) should I create a new DB and install again? I've tried to figure out what makes that call but I haven't figured it out yet. Again, thanks for your help!

 

I did a whole new db and install and it worked.... yeah!! but huh??

Link to comment
Share on other sites

I did a whole new db and install and it worked.... yeah!! but huh??

 

If this ever happens again, simply disable each STS module in your admin, log out, and then log back into your admin and re-enable the STS Default module. Sometimes the modules of osCommerce get stuck in a "loop" and need to be shut down and restarted to clear the cache.

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'm trying to add the imprint contribution my site. I have it installed, and if I use the below code that I put in includes/modules/sts_inc/product_info.php, the imprint box seems to show up on my product info page:

// Text Attributes
$text_attributes_query = tep_db_query("select pta.* from products_text_attributes as pta, products_text_attributes_enabled as ptae where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = " . tep_get_prid($HTTP_GET_VARS['products_id']));
while ($text_attributes = tep_db_fetch_array($text_attributes_query)) {
$template_pinfo['monogramtextbox'] .= '<tr><td class=main>' . $text_attributes['products_text_attributes_name'] . ': ' . tep_draw_input_field('products_text_attributes_' . $text_attributes['products_text_attributes_id'], '');
}
// Text Attributes

The problem with the above code, is that if I have a product that I have not entered with the imprint option, then I get this printed on my page:

 

$monogramtextbox$

 

How can I get this to only show up if the product has the imprint option checked? I have tried the below, which seems to take care of if the product does not have the imprint option (it doesn't display it), but then for items that do have the option, it prints $monogramtextbox$:

// Text Attributes
$text_attributes_query = tep_db_query("select pta.*, count(*) as total from products_text_attributes as pta, products_text_attributes_enabled as ptae where ptae.products_text_attributes_id = pta.products_text_attributes_id and ptae.products_id = " . tep_get_prid($HTTP_GET_VARS['products_id']));

$text_attributes = tep_db_fetch_array($text_attributes_query);
//print_r($text_attributes);

if ($text_attributes['total'] > 0) {
//echo "monogram";
while ($text_attributes = tep_db_fetch_array($text_attributes_query)) {
$template_pinfo['monogramtextbox'] .= $text_attributes['products_text_attributes_name'] . ': ' . tep_draw_input_field('products_text_attributes_' . $text_attributes['products_text_attributes_id'], '');
} 
} else {
//echo "no monogram";
$template_pinfo['monogramtextbox'] = '';
}	
// Text Attributes

Thanks.

 

I'm also having issues showing the $alsopurchased$ information on my product info page.

Can anyone help me with this?

 

Thanks!!

Link to comment
Share on other sites

http://de-maritime.com/store/contact_us.php

 

Got the forms to work with the fix that bkellum suggested. But now the header isn't showing right, and since I'm only really working on this site every other day or so, I can't for the life of me remember where and what I changed in the header to show the logo and such. Shows up fine on the storefront & catalog, but not contact, privacy, shipping and such. Any suggestions?

Link to comment
Share on other sites

http://de-maritime.com/store/contact_us.php

 

Got the forms to work with the fix that bkellum suggested. But now the header isn't showing right, and since I'm only really working on this site every other day or so, I can't for the life of me remember where and what I changed in the header to show the logo and such. Shows up fine on the storefront & catalog, but not contact, privacy, shipping and such. Any suggestions?

 

 

The contact_us page is using the http://de-maritime.com/store/images/oscommerce.gif and the other pages that work are using http://de-maritime.com/store/images/store_logo.png

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 tag lines "This is the default template." are there only to demonstrate that STS is picking that template for that particular page. It is there to assist you in "learning" how STS works. You should remove that tag line if you are going to use the sample templates for your live store.

 

As for the bottome tag line "STS v4.5.3", don't worry about it as it never got changed with the newer STS v4.5.8 version. Again, I don't think you want that tag line in your live store anyway so simply remove it as well if you plan to use the sample templates.

Thank you, Bill.

I need to have the URLs display in a format like this: ...catalog/e-books/birth-of-a-river.html (short path, hyphens between keywords, no category/product number). Is it possible to achieve this with STS? If so, what SEO/SEF URL contribution should I use?

 

Another newbie question: Does STS work only with contributions/add-ons specifically designed for STS or is it possible to use any contributions that work with a plain osc installation too?

 

Many thanks.

Link to comment
Share on other sites

First off, I apologize on my previous message about "I can't get sts to do nothing"---I was just frustrated. It's working and it's great.

 

I have a more legitimate problem and I don't know where it must be located, any help is appreciated.

 

I installed the latest version of sts on RC2, and installed and used the index module. Created my index and the default template, but any link that ends in cpath(catalog/index.php?cPath=3, eg.) loads the index template, which in my case is really just an entry page with company logo and contact information.

 

I guess the problem should be on index.php, but as far as I can see the code for cpath is there. Am I not aware of some sts funcion to take care of this types of links or is this a faulty installation? Everything else works great.

Link to comment
Share on other sites

First off, I apologize on my previous message about "I can't get sts to do nothing"---I was just frustrated. It's working and it's great.

 

I have a more legitimate problem and I don't know where it must be located, any help is appreciated.

 

I installed the latest version of sts on RC2, and installed and used the index module. Created my index and the default template, but any link that ends in cpath(catalog/index.php?cPath=3, eg.) loads the index template, which in my case is really just an entry page with company logo and contact information.

 

I guess the problem should be on index.php, but as far as I can see the code for cpath is there. Am I not aware of some sts funcion to take care of this types of links or is this a faulty installation? Everything else works great.

 

I tried with an unchanged index.php, didn't work still. Where else could the problem be?

Link to comment
Share on other sites

Thank you, Bill.

I need to have the URLs display in a format like this: ...catalog/e-books/birth-of-a-river.html (short path, hyphens between keywords, no category/product number). Is it possible to achieve this with STS? If so, what SEO/SEF URL contribution should I use?

 

Another newbie question: Does STS work only with contributions/add-ons specifically designed for STS or is it possible to use any contributions that work with a plain osc installation too?

 

Many thanks.

2nd question first: Yes, you can use any contribution with STS (except BTS of course). The issues arise when:

  • the contribution is not coded properly as STS relies on osC coding standards to function correctly.
  • Also, if the contribution creates a new box, you simply need to create a new tag for that box as STS does not automatically add new tags (this is a very simple task).
  • The contribution makes changes or adds functions to the product_info.php file. This is only an issue if you are using the product info content template feature in STS. If you are not, then STS will automatically pick up the changes that were made to the stock product_info.php file. If you are, then you would need to add the code logic to the includes/modules/sts_inc/product_info.php files as well and then create the new STS tags (if needed) to be added to your product info content template(s).

1rst question: STS will work with a properly coded SEO URL contribution. I think all SEO URL modifications are highly over-rated as the search engines can pick up any type of URL these days. I agree that it used to be an issue in the past but not so much these days with the major search engines.

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

First off, I apologize on my previous message about "I can't get sts to do nothing"---I was just frustrated. It's working and it's great.

 

I have a more legitimate problem and I don't know where it must be located, any help is appreciated.

 

I installed the latest version of sts on RC2, and installed and used the index module. Created my index and the default template, but any link that ends in cpath(catalog/index.php?cPath=3, eg.) loads the index template, which in my case is really just an entry page with company logo and contact information.

 

I guess the problem should be on index.php, but as far as I can see the code for cpath is there. Am I not aware of some sts funcion to take care of this types of links or is this a faulty installation? Everything else works great.

I'm not getting what you think is a problem. STS will use the index.php.html template as a default category template for all categories that do not have a specific template created for it. For example: When the user clicks on a category page in your shop, this is the process STS will perform to find what template to use:

 

How it works:

 

When the Index module is enabled, it looks in the template folder to see what templates exist. It is possible to define templates for each manufacturer as well as for each category. Templates must be located in the templates folder (includes/sts_templates/*your_template_folder).

 

It works as so (first found, first used):

 

1. If a manufacturer is selected in the URL, for example index.php?manufacturers_id=4, check for manufacturer templates.

 

1.1 Use index.php_mfr_4.html if exists.

 

1.2 Use index.php_mfr.html if exists, otherwise jump to 2.1 .

 

2. Check for category specific templates, based on the category ID. (Example below with category 33, located in category 22, located in category 11)

 

2.1 Use index.php_11_22_33.html if exists.

 

2.2 If parameter "Check parent templates" is enabled, use index.php_11_22.html if exists. If parameter is disabled, jump to 2.4 .

 

2.3 Use index.php_11.html if exists (index.php_0.html for the home page).

 

2.4 Use index.php.html if exists.

 

3. If no specific template is found, use the default template that is defined in the STS Default module (by default it is sts_template.html)

 

Note: If you don't create any template corresponding to points 1.1 to 2.3, you don't need to enable this module, the default one will do the same job in less time.

 

 

Hope that answered your question,

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

Link to comment
Share on other sites

Hi Bill,

I am trying to implement Ultra Pics 2.8 (#6167), which is based on Ultra Pic 2.7 (#1642). I had to add extra links according to the instructions in Ultra Pics (1642) to sts_template.html to work with this contribution. It works great on regular store, but when I turn STS on and click on "enlarge" the picture, it gets the enlarged picture way down the window. I would really appreciate your help because I like the contribution and would like to use with STS. Here is the link to my test side where you can see ithttp://danceintounity.org/store/product_info.php?products_id=28

Thanks much

Link to comment
Share on other sites

Hi Bill,

I am trying to implement Ultra Pics 2.8 (#6167), which is based on Ultra Pic 2.7 (#1642). I had to add extra links according to the instructions in Ultra Pics (1642) to sts_template.html to work with this contribution. It works great on regular store, but when I turn STS on and click on "enlarge" the picture, it gets the enlarged picture way down the window. I would really appreciate your help because I like the contribution and would like to use with STS. Here is the link to my test side where you can see ithttp://danceintounity.org/store/product_info.php?products_id=28

Thanks much

Never mind. Found the problem. Compared links in reg store and the template.

1. I did not use the correct path for lightbox css - instead of href="lightbox/PrettyPhoto.css" I use href="lightbox.css".

2. Also I removed following js links, which I put according to instructions (#1642)

<script type="text/javascript" src="js/prototype.js"></script>

<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>

<script type="text/javascript" src="js/lightbox.js"></script>

<script type="text/javascript" src="js/builder.js"></script>

3. So the only thing needed for STS to work is to add linklightbox/PrettyPhoto.css in sts_template.html.

Thanks much

Link to comment
Share on other sites

Why is no one willing to help me get the also purchased box to show on my product info page? Does this not work with STS 4.5.8?

 

Jason,

It works and I also posted a response regarding your modified shop. Something else is going on with your shop that no one here will be able to assist you with without digging deep into your modifed code.

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

ok.. Think I posted this in the wrong spot.. Here we go..

 

I am trying to modify the look and feel of the "new products" info box that is used by oscommerce. I am using STS and have created the infobox_new_products.php.html and it seems as though the tags are not recognized. Please help! im reading everywhere and cant seem to figure out what I am doing wrong! Save me BILL!

 

please have a look at www.krownmodastore.com - You will see on the homepage all i get is the STS tags. If I add the content tag to the infobox_new_prodcuts.php.html it shows the new products but in the original format..

 

Thanks in advance...

Link to comment
Share on other sites

ok.. Think I posted this in the wrong spot.. Here we go..

 

I am trying to modify the look and feel of the "new products" info box that is used by oscommerce. I am using STS and have created the infobox_new_products.php.html and it seems as though the tags are not recognized. Please help! im reading everywhere and cant seem to figure out what I am doing wrong! Save me BILL!

 

please have a look at www.krownmodastore.com - You will see on the homepage all i get is the STS tags. If I add the content tag to the infobox_new_prodcuts.php.html it shows the new products but in the original format..

 

Thanks in advance...

 

Dave,

 

You have a couple different problems going on here.

 

  1. You can't use the product info STS tags on pages other than the product_info content templates. It is possible but it would require some re-coding on your part. I have done this and even posted in this thread about it but I strongly suggest that you do not go down this route until at least you get problem #2 below worked out. Here is the post #4440 in any case:
    http://www.oscommerce.com/forums/index.php?sho...p;#entry1325353
  2. You are using an osCommerce template that needs to be converted to an STS template. See my step by step on how to do this properly:
    Post # 2587
    http://www.oscommerce.com/forums/index.php?sho...p;#entry1131089

Look into the above and see if that helps.

 

By the way, the only STS tags that can be used in your infobox templates are $content, $headertext and $right_arrow.

Bill Kellum

 

Sounds Good Productions

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...