Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

:(  :(  :( Noooo i noticed another problem.. when signing up customers get a really weird welcome e-mail..

 

EMAIL_GREET_MREMAIL_WELCOMEEMAIL_TEXTEMAIL_CONTACTEMAIL_WARNING

 

Any suggestions ?? :(

It looks like you are missing some Define's somewhere.

 

Search for the variables it's reporting and see if you can identify where they should be defined.

 

EMAIL_GREET_MR

EMAIL_WELCOME

EMAIL_TEXT

EMAIL_CONTACT

EMAIL_WARNING

 

I found these in this file(s):

 

includes/languages/english/create_account.php:define('EMAIL_GREET_MR', 'Dear Mr. %s,' . "\n\n");

 

See if you are missing it.

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

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

Link to comment
Share on other sites

Please help me...

 

I installed the new Version of STS and everything work fine - but the loginbox does not work. There is only the code $loginbox visible - but not the box.

 

In my old version (1.8) the loginbox works without problems.

 

What can I do?

Link to comment
Share on other sites

Please help me...

 

I installed the new Version of STS and everything work fine - but the loginbox does not work. There is only the code $loginbox visible - but not the box.

 

In my old version (1.8) the loginbox works without problems.

 

What can I do?

Link to comment
Share on other sites

I really like the easy way I can deploy templates with STS, but I am having a problem in the checkout. When you reach payment page in the process, running the mouse over the area that contains the payment options, be it one choice or many, produces a javascript error, as if there's a broken mouseover function on that payment table.

 

In playing with the debug mode, I find that if I turn on normal mode with the template mode in sts_display_output.php, the problem goes away. I almost suspsect it might be something with the CSS, but I can't figure what. Can anybody help with this? I've got to get this thing up and running asap.

I've managed to eliminate my problem by remove a mouseover reference in the checkout_payment.php file. In the code there's reference to onmouseover="rowOverEffect(this)" and onmouseout="rowOutEffect(this" (around line 248). I removed both mouse events from the code and my problem was solved. I don't seem to have lost anything in the formatting, so I am happy with this solution for now. I wouldn't mind finding out WHY I had the problem in the first place, since it seems related to using my template only (wondering if missing something in my stylesheet?) but for my immediate needs, it is ok the way it is now.

Link to comment
Share on other sites

<Quote>I installed the new Version of STS and everything work fine - but the loginbox does not work. There is only the code $loginbox visible - but not the box.

 

In my old version (1.8) the loginbox works without problems. </Quote>

 

This will sound strange, but try it. First, make sure you have the variable spelled right. Then add a space before it in your code, and for the heck of it, try adding a space after. So if it was between 2 font tags, make sure it looks like this

 

<font> $loginbox </font>

instead of... <font>$loginbox</font>

 

This has solved the problem for me. Sometimes STS can miss some variables when it renders, and I have no idea why. This solved several problems for me, especially when the variable was part of a link. If I added space around it, it would finally register. Might help.

Link to comment
Share on other sites

AUTHORIZE.NET UPDATE...

 

There were several questions as to whether Authorize.Net worked with STS. I tried the built in Authorize payment module with a test account and it failed. Apparently the calls are messed up somehow. However, the "Authorize.net consolidated for AIM" contribution seems to work better, but the errors do not work if you enter a wrong credit card nbumber. So both aren't any good.

 

I'm going to try and see if I can keep the whole checkout process from rendering in STS and perhaps that will fix the problem. In the meantime, I'm trying to link with Linkpoint services to see if that will work.

 

IF ANYONE HAS FOUND A PAYMENT GATEWAY THAT WORKS WITH STS, PLEASE INFORM THIS LIST. It would be a great help.

Link to comment
Share on other sites

I just installed the STS 2.01 contrib, and (unfortunately) am having many problems with it. I've spent the better part of a day trying to fiddle around to fix my problems, as well as searching this forum for answers, all to no avail. If anyone has any suggestions or solutions, I'd greatly appreciate it. Here's the list

 

-Header Logo. I can't seem to change it. I went into the header.php file to change it, but it still shows the oscommerce.gif logo. I changed the display option in sts_display_output.php to debug mode, and it lists the .GIF image that I want. But even with that, I'm still not seeing my image, only the oscommerce.gif image

 

-Column widths. I can't seem to adjust my left column width. Not only that, but STS is squishing the left column to about 100 pixels wide, causing all the text to line wrap, which looks pretty ugly.

 

-Form buttons. Both the "Add to Cart" and the "Sign In" buttons don't link to anything when STS is enabled. They work just fine when STS is disabled.

 

If anyone has any big or small suggestions for my problems, I'd really appreciate it. Thanks!

Link to comment
Share on other sites

Hello, I'm sorry if this was already covered, but I have just a couple of help questions for STS.

 

The HTML is not plain straight forward for me on the formatting of the layout itself. I want to get rid of the small black border around the page, and I would like the page to stretch/shrink according to screen resolution. Right now it looks fine on an 800x600 or 1024x768, but if your resolution is higher, the page is too thin for pleasant viewing, and if your resolution is lower than 800x600 you have to scroll sideways.

 

Any help would be greatly appreciated. My site is below if anyone wants to take a look at what I'm talking about.

 

http://eprota.com/catalog/

 

Thanks in advance!

Link to comment
Share on other sites

I have a question regarding the Mutliple Template Files. I am a little confused.

 

Example: I have a file called aboutus.php and I want to control the look of that file, I create a file called aboutus.php.html and place it in the /includes/sts_templates directory. I understand that all of the design elements and tags go in the template file, but what should the aboutus.php file look like? What should be in that file? Do I just end up making two files that are identical?

 

Thanks for helping clear up the confusion.

 

Thanks!

 

Mark

Dayton, OH

Edited by mbianchi
Link to comment
Share on other sites

Does anybody know how to change the font color for the $cartbox dollar amounts also for the contents ? I am having trouble controlling the color that I want, that has to be independent from any other css tag.

 

I realy need help, this is the last step before going live. I will post a link to the site when done. It is much more different than any of the examples seen yet. I guess I would say template is very graphical

I'm not a coder just a splicer.

Link to comment
Share on other sites

Does anybody know how to change the font color for the $cartbox dollar amounts  also for the contents ? I am having trouble controlling the color that I want, that has to be independent from any other css tag.

 

I realy need help, this is the last step before going live. I will post a link to the site when done. It is much more different than any of the examples seen yet. I guess I would say template is very graphical

Unfortunately, there doesn't seem to be a style for that attribute (don't know why). You'd have to add a new style to the CSS file and modify the cartbox program to include it.

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

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

Link to comment
Share on other sites

I have a question regarding the Multiple Template Files.  I am a little confused.

 

Example: I have a file called aboutus.php and I want to control the look of that file, I create a file called aboutus.php.html and place it in the /includes/sts_templates directory.  I understand that all of the design elements and tags go in the template file, but what should the aboutus.php file look like?  What should be in that file?  Do I just end up making two files that are identical?

 

Thanks for helping clear up the confusion.

 

Thanks!

 

Mark

Dayton, OH

You don't do anything to the original PHP files, leave them untouched.

 

You would simply create the template page (aboutus.php.html) as you want it to appear when someone goes there. It would probably be the same as your main template file (sts_template.html) but have your About Us stuff in the middle instead of $content.

 

This help at all?

 

- Brian

Simple Template System (STS)

Layout your site with 1 (or more) HTML file!

Download STS: http://www.oscommerce.com/community/contributions,1524

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

Link to comment
Share on other sites

Unfortunately, there doesn't seem to be a style for that attribute (don't know why). You'd have to add a new style to the CSS file and modify the cartbox program to include it.

Where can I fiind how to do it ? Or if some one can help, I am not much of a programmer.

I'm not a coder just a splicer.

Link to comment
Share on other sites

Is there really nobody who knows a solution for my problem with the loginbox????????

 

I installed the new Version of STS and everything work fine - but the loginbox does not work. There is only the code $loginbox visible - but not the box.

 

In my old version (1.8) the loginbox works without problems.

 

What can I do?

Link to comment
Share on other sites

Is there really nobody who knows a solution for my problem with the loginbox????????

 

I installed the new Version of STS and everything work fine - but the loginbox does not work. There is only the code $loginbox visible - but not the box.

 

In my old version (1.8) the loginbox works without problems.

 

What can I do?

Link to comment
Share on other sites

You don't do anything to the original PHP files, leave them untouched.

 

You would simply create the template page (aboutus.php.html) as you want it to appear when someone goes there.  It would probably be the same as your main template file (sts_template.html) but have your About Us stuff in the middle instead of $content.

 

This help at all?

 

  - Brian

Thanks for the speedy reply, Brian. I think I am closer to understanding how this works.

 

You said that I don't have to do anything to the original PHP scripts, but what if the page I am creating is not one of the originals? My example: aboutus.php is not an original file for OsCommerce. Do I then just copy one of the other files and rename it? (Ie: index.php to aboutus.php?)

 

Thanks for all your help!

 

Mark

Link to comment
Share on other sites

Is there really nobody who knows a solution for my problem with the loginbox????????

 

I installed the new Version of STS and everything work fine - but the loginbox does not work. There is only the code $loginbox visible - but not the box.

 

In my old version (1.8) the loginbox works without problems.

 

What can I do?

Link to comment
Share on other sites

Is there really nobody who knows a solution for my problem with the loginbox????????

 

I installed the new Version of STS and everything work fine - but the loginbox does not work. There is only the code $loginbox visible - but not the box.

 

In my old version (1.8) the loginbox works without problems.

 

What can I do?

Look in the sts_display_output.php file and make sure the there is a template setup for the login box. There should be a line that looks something like this:

 

$template['loginbox'] = strip_unwanted_tags($sts_block['loginbox'], 'loginbox');

 

listed with all the other boxes. Usually when all that shows up is the tag $loginbox that means the template is not set up or that the tag does not match what is setup.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Hi all and Supporters,

 

I have a liitle Problem with sts and the processing.tpl.php from Paypal IPN....

 

Here is the code:

<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<title><?php echo STORE_NAME; ?></title>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
</head>
<body bgcolor="#FFFFFF" onload="return document.paypal_payment_info.submit();">
<?php echo "\n".tep_draw_form('paypal_payment_info', 'https://www.paypal.com/cgi-bin/webscr', 'post'); ?>
<table cellpadding="0" width="100%" height="100%" cellspacing="0" style="border:1px solid #003366;">
 <tr><td align="middle" style="height:100%; vertical-align:middle;">
   <div><?php $logo = (MODULE_PAYMENT_PAYPAL_STORE_LOGO_IMAGE_NAME) ? MODULE_PAYMENT_PAYPAL_STORE_LOGO_IMAGE_NAME : STORE_LOGO; echo tep_image( DIR_WS_IMAGES . $logo ); ?></div>
   <div style="color:#003366"><h1><?php echo MODULE_PAYMENT_PAYPAL_TEXT_TITLE_PROCESSING.tep_image( DIR_WS_IMAGES .'icons/period_ani.gif' ); ?></h1></div>
   <div style="margin:10px;padding:10px;"><?php echo MODULE_PAYMENT_PAYPAL_TEXT_DESCRIPTION_PROCESSING?></div>
   <div style="margin:10px;padding:10px;"><?php echo tep_image_submit('button_ppcheckout.gif', MODULE_PAYMENT_PAYPAL_IMAGE_BUTTON_CHECKOUT); ?></div>
 </td></tr>
</table>
<?php echo $this->_getPayPalFields()."\n"; ?>
</body></html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

What must I add, that this works?

 

Thanks for your help...

Regards from Germany...

Link to comment
Share on other sites

Hi all,

 

I find it with Greg and Kraven, just replace in application_top.php, checkout_process.php and processing.tpl.php the following:

 

require(DIR_WS_INCLUDES . 'application_bottom.php');

 

with these lines:

 

  
// close session (store variables)
tep_session_close();

if (STORE_PAGE_PARSE_TIME == 'true') {
 $time_start = explode(' ', PAGE_PARSE_START_TIME);
 $time_end = explode(' ', microtime());
 $parse_time = number_format(($time_end[1] + $time_end[0] - ($time_start[1] + $time_start[0])), 3);
 error_log(strftime(STORE_PARSE_DATE_TIME_FORMAT) . ' - ' . getenv('REQUEST_URI') . ' (' . $parse_time . 's)' . "\n", 3, STORE_PAGE_PARSE_TIME_LOG);

 if (DISPLAY_PAGE_PARSE_TIME == 'true') {
   echo '<span class="smallText">Parse Time: ' . $parse_time . 's</span>';
 }
}

if ( (GZIP_COMPRESSION == 'true') && ($ext_zlib_loaded == true) && ($ini_zlib_output_compression < 1) ) {
 if ( (PHP_VERSION < '4.0.4') && (PHP_VERSION >= '4') ) {
   tep_gzip_output(GZIP_LEVEL);
 }
}

 

And it works fine :D

 

Kind Regards...

Regards from Germany...

Link to comment
Share on other sites

i just installed the newest version of OScommerce. I then followed the directions for sts template system and i keep getting this error even though i have reinstalled both oscommerce and sts 3 times.

I have done a search in this forum for answer but am either overlooking it or it isnt there so any help would be greatly appreciated.

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /home/freewire/public_html/catalog/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/local/lib/php') in /home/freewire/public_html/catalog/includes/application_top.php on line 511

Link to comment
Share on other sites

i just installed the newest version of OScommerce. I then followed the directions for sts template system and i keep getting this error even though i have reinstalled both oscommerce and sts 3 times.

I have done a search in this forum for answer but am either overlooking it or it isnt there so any help would be greatly appreciated.

 

Warning: main(STS_START_CAPTURE): failed to open stream: No such file or directory in /home/freewire/public_html/catalog/includes/application_top.php on line 511

 

Fatal error: main(): Failed opening required 'STS_START_CAPTURE' (include_path='.:/usr/local/lib/php') in /home/freewire/public_html/catalog/includes/application_top.php on line 511

make sure you have made the additions to the configure.php file. I think I forgot to do that once and those were the error messages I received. This is what you need to add if you have not done so already.

 

// STS: ADD: Define Simple Template System files

define('STS_START_CAPTURE', DIR_WS_INCLUDES . 'sts_start_capture.php');

define('STS_STOP_CAPTURE', DIR_WS_INCLUDES . 'sts_stop_capture.php');

define('STS_RESTART_CAPTURE', DIR_WS_INCLUDES . 'sts_restart_capture.php');

define('STS_TEMPLATE_DIR', DIR_WS_INCLUDES . 'sts_templates/');

define('STS_DEFAULT_TEMPLATE', DIR_WS_INCLUDES . 'sts_template.html');

define('STS_DISPLAY_OUTPUT', DIR_WS_INCLUDES . 'sts_display_output.php');

define('STS_USER_CODE', DIR_WS_INCLUDES . 'sts_user_code.php');

define('STS_PRODUCT_INFO', DIR_WS_INCLUDES . 'sts_product_info.php');

// STS: EOADD

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

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