Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Regarding the ultrapics problem people are having, I have them working OK together without any need for much messing around with code.

 

I did have the problem with the images not showing up on the catalog page but this was a problem with the ultrapics contrib.

 

I traced this to a case mismatch in product_info.php. In the line:

 

if (ULTIMATE_ADDITIONAL_IMAGES == 'enable') { include(DIR_WS_MODULES . 'additional_images.php'); }

 

it will only display images if I change 'enable' to 'Enable'.

 

Hopefully that will get it working.

 

Sorry if that is slightly off topic for STS - this has already been posted in the ultrapics and HTML editor thread:

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

 

Tim

Link to comment
Share on other sites

Hi, was wondering if any of you guys would know why Im getting this error with the latest version of STS.

 

Fatal error: Cannot redeclare clean_html_comments() (previously declared in /var/www/html/meccanoman/catalog/includes/functions/clean_html_comments.php:13) in /var/www/html/meccanoman/catalog/includes/functions/clean_html_comments.php on line 13

 

 

Which is this:

 

// Clean out HTML comments code

function clean_html_comments($clean_html) {

global $its_cleaned;

 

 

 

I have installed Linda's meta tag controller some time ago. Think this is whats causing the error since it says in the readme that sts does'nt need all of the files in catalog modified (which I've allready done) for the header controller.

 

though that all I would need to do is reverse the changes I made to the files in Catalog (for the meta controller) to get this to work. have tried it on index.php but it still comes up with this error.

 

Am I completely barkin up the wrong tree or what?

 

Cheers for any help.

 

Ian

Link to comment
Share on other sites

Ps it works ok if i disable this bit:

 

/////////////////////////////////////////////

////// Capture <title> and <meta> tags

/////////////////////////////////////////////

 

// STS: ADD: Support for WebMakers.com's Header Tag Controller contribution

// Capture the output

 

// require(STS_START_CAPTURE);

 

// BOF: WebMakers.com Changed: Header Tag Controller v1.0

// Replaced by header_tags.php

 

// if ( file_exists(DIR_WS_INCLUDES . 'header_tags.php') ) {

// require(DIR_WS_FUNCTIONS . 'clean_html_comments.php');

// require(DIR_WS_FUNCTIONS . 'header_tags.php');

// require(DIR_WS_INCLUDES . 'header_tags.php');

// } else {

// echo "<title>" . TITLE . "</title>";

// }

// EOF: WebMakers.com Changed: Header Tag Controller v1.0

 

// $sts_block_name = 'headertags';

// require(STS_STOP_CAPTURE);

 

// STS: EOADD: Support for WebMakers.com's Header Tag Controller contribution

 

 

In sts_display_output.php - so I guess it must be to do with the meta tag controller, any help on where to go next would be greatly apreciated.

 

Cheers

 

Ian

Link to comment
Share on other sites

Ok got some sleep and figured it out.

 

It doesnt want the references to the headertag controller in

 

/catalog/includes/applicationtop.php

 

It obviously does this automatically when it detects the Controller is installed cos when I removed it it worked fine.

 

Hurah!

 

Thanks for a great contribution.

 

Cheers

 

Ian

Link to comment
Share on other sites

Hi some one please help me with this, okay

I want to put a cart summary at the top of my page

and I have the code for it

 

<!-- Cart Contents -->

<table width="294" border="0" cellspacing="0" cellpadding="0">

<tr>

?? <td width="28" class="smallText"><b><img src="images/cart.gif" width="22" height="14" align="absmiddle"></b></td>

?? <td width="110" class="smallText"><b>Cart Summary:</b></td>

?? <td width="66" align="right" class="smallText"> </td>

?? <td width="90" class="smallText">

? ?? <?php if ($cart->count_contents() > '0') { ?>

? ?? <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>"><img src="images/content.gif" border="0" align="absmiddle"></a> <b><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>">Edit</a></b>

? ?? <?php } ?>

?? </td>

</tr>

<tr>

?? <td width="28" class="smallText"> </td>

?? <td width="110" class="smallText">Item(s) in Cart:</td>

?? <td width="156" colspan="2" class="smallText"><?php echo $cart->count_contents(); ?></td>

</tr>

<tr>

?? <td width="28" class="smallText"> </td>

?? <td width="110" class="smallText">Current Total:</td>

?? <td width="156" colspan="2" class="smallText"><?php echo $currencies->format($cart->show_total()); ?></td>

</tr>

<tr>

?? <td width="28" class="smallText"> </td>

?? <td width="110" class="smallText">Shipping Weight:</td>

?? <td width="156" colspan="2" class="smallText"><?php echo $cart->show_weight(); ?>lbs

? ?? (est.) </td>

</tr>

</table>

 

this code is saved as /include/cart_summmary.php

now I can call this by

<?php require(DIR_WS_INCLUDES . 'cart_summary.php'); ?>

 

but how do I do that in STS?

Please help

I am still waiting for the help, some one please

Sorry guys! I need this help very badly! some one!!!!!!!!! Pleaseeeeeeeeeeeeee

Link to comment
Share on other sites

hi oscommerce community..

 

I think i've got a challenge..

 

everything on my site finally works.. when i press the link forgotten password during login, the system asks me to fill in my e-mail adress..

But, when i fill in my emailadress i get the error :

 

Faillure: youre emailadress does'nt exists in our database, check your emailadress.

 

BUT when i look in my admin the emailadress is exactly the same.. also tried it with a testaccount but the same faillure.. :o

 

I have this problem from the moment i have installed sts....

I,m working with oscommerce 2.2 ms2 sts 1.8

 

 

please help me with this one, really don't know were to search anymore..

already tried to install everything again, twice... :(

 

thanks, Marco van Meurs (sorry for my poor english)

Link to comment
Share on other sites

Marco

 

I have the same problem but hadn't narrowed it down to STS. I've seen a number of other posts in other threads showing the same problem.

 

Do you find that after you try to get a new password it fails, but if you go to log in again, with or without the correct password, it then sends you the new password email? That happens for me and will be no good when my site goes live. Customers will see this and run away.

 

Do all users with STS installed have this problem? Anyone go a solution?

 

Regards

Tim

Link to comment
Share on other sites

Hi Tim,

 

Yep, i have the exact same problem, (glad i'm not the only one ;) ) does'nt work the first time, but after that when i try to log in with that account with or witthout password, it sends the new password....!!!???

 

so yes, i have the same problem and i've got it since i installed sts...

 

hope somebody can help us and really want to know if there are more persons having this same problem..

 

greetz, Marco van Meurs

Edited by marcom
Link to comment
Share on other sites

Speed

 

In the STS intructions it says this:

 

If you want to add any new boxes or template variables, add them in the

sts_user_code.php file.

 

So you need to add the following to the sts_user_code.php file

   $sts_block_name = 'cart_contents';
  require(STS_START_CAPTURE);
  require(DIR_WS_INCLUDES . 'cart_contents.php');
  require(STS_STOP_CAPTURE);
  $template['cart_contents'] = strip_unwanted_tags($sts_block['cart_contents'], 'cart_contents');

 

And then put the $cart_content tag somewhere in your STS_template.php.

 

I've tried it on my test site and it works OK.

 

Regards

Tim

Link to comment
Share on other sites

Hi Tim Elliott,

 

I folled everything you asked me to do

 

I created a file called

"sts_ship_cart.php"

and incuded

 

$sts_block_name = 'cart_contents';
 require(STS_START_CAPTURE);
 require(DIR_WS_INCLUDES . 'cart_contents.php');
 require(STS_STOP_CAPTURE);
 $template['cart_contents'] = strip_unwanted_tags($sts_block['cart_contents'], 'cart_contents');

 

then uploded to my /include folder

then in sts_template.html

i define as

 

$cart_content

 

when I view it, I see "$cart_content" as output! why is that? what went wrong?

thanks

Link to comment
Share on other sites

Speed

 

No, don't create a file called "sts_ship_cart.php".

 

You should already have a file called includes/sts_user_code.php from the sts package.

 

Edit that file to include the code I mentioned. As long as you have the cart_contents.php file in your includes directory it should work.

 

Regards

Tim

Link to comment
Share on other sites

Tim, where do I add the code in

includes/sts_user_code.php ?

I tried to add code in bottom, then I got this error msg

 

Warning: main(includes/cart_contents.php): failed to open stream: No such file or directory in /home/tamilwor/public_html/shoppingcart/includes/sts_user_code.php on line 64

 

Warning: main(includes/cart_contents.php): failed to open stream: No such file or directory in /home/tamilwor/public_html/shoppingcart/includes/sts_user_code.php on line 64

 

Fatal error: main(): Failed opening required 'includes/cart_contents.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/tamilwor/public_html/shoppingcart/includes/sts_user_code.php on line 64

Link to comment
Share on other sites

i created a file called "cart_contents.php" under /include

and included

 

<!-- Cart Contents --> 
<table width="294" border="0" cellspacing="0" cellpadding="0">
<tr> 
  <td width="28" class="smallText"><b><img src="images/cart.gif" width="22" height="14" align="absmiddle"></b></td>
  <td width="110" class="smallText"><b>Cart Summary:</b></td>
  <td width="66" align="right" class="smallText"> </td>
  <td width="90" class="smallText"> 
    <?php if ($cart->count_contents() > '0') { ?>
    <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>"><img src="images/content.gif" border="0" align="absmiddle"></a> <b><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>">Edit</a></b> 
    <?php } ?>
  </td>
</tr>
<tr> 
  <td width="28" class="smallText"> </td>
  <td width="110" class="smallText">Item(s) in Cart:</td>
  <td width="156" colspan="2" class="smallText"><?php echo $cart->count_contents(); ?></td>
</tr>
<tr> 
  <td width="28" class="smallText"> </td>
  <td width="110" class="smallText">Current Total:</td>
  <td width="156" colspan="2" class="smallText"><?php echo $currencies->format($cart->show_total()); ?></td>
</tr>
<tr> 
  <td width="28" class="smallText"> </td>
  <td width="110" class="smallText">Shipping Weight:</td>
  <td width="156" colspan="2" class="smallText"><?php echo $cart->show_weight(); ?>lbs 
    (est.) </td>
</tr>
</table>

 

its still not working

I get to see $cart_content

in the output of html files why?

Link to comment
Share on other sites

Tim, I dont' have any problem adding the code in sts_user_code.php

I think I did everything what you asked me to do, but some reason its still displaying the "$cart_content" in the output of html

 

can you think of any reason?

or tell me I did anything wrong?

Link to comment
Share on other sites

here is my cart_contents.php file

 

<!-- Cart Contents --> 
<table width="294" border="0" cellspacing="0" cellpadding="0">
<tr> 
  <td width="28" class="smallText"><b><img src="images/cart.gif" width="22" height="14" align="absmiddle"></b></td>
  <td width="110" class="smallText"><b>Cart Summary:</b></td>
  <td width="66" align="right" class="smallText"> </td>
  <td width="90" class="smallText"> 
    <?php if ($cart->count_contents() > '0') { ?>
    <a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART); ?>"><img src="images/content.gif" border="0" align="absmiddle"></a> <b><a href="<?php echo tep_href_link(FILENAME_SHOPPING_CART, '', 'NONSSL'); ?>">Edit</a></b> 
    <?php } ?>
  </td>
</tr>
<tr> 
  <td width="28" class="smallText"> </td>
  <td width="110" class="smallText">Item(s) in Cart:</td>
  <td width="156" colspan="2" class="smallText"><?php echo $cart->count_contents(); ?></td>
</tr>
<tr> 
  <td width="28" class="smallText"> </td>
  <td width="110" class="smallText">Current Total:</td>
  <td width="156" colspan="2" class="smallText"><?php echo $currencies->format($cart->show_total()); ?></td>
</tr>
<tr> 
  <td width="28" class="smallText"> </td>
  <td width="110" class="smallText">Shipping Weight:</td>
  <td width="156" colspan="2" class="smallText"><?php echo $cart->show_weight(); ?>lbs 
    (est.) </td>
</tr>
</table>

 

Tell me what need to be fixed here?

Link to comment
Share on other sites

Marco

 

Regarding the problem with password_forgotten.php

 

Hi Tim,

 

Yep, i have the exact same problem, (glad i'm not the only one  ) does'nt work the first time, but after that when i try to log in with that account with or witthout password, it sends the new password....!!!???

 

so yes, i have the same problem and i've got it since i installed sts...

 

hope somebody can help us and really want to know if there are more persons having this same problem..

 

greetz, Marco van Meurs

 

This isn't very helpful to you but my problem with this seems to be fixed. The annoying thing is I don't know what changed. I have changed a number of other things since I last saw it, but none of the changes were attempts to fix the problem.

 

Chances are it'll come back again sometime soon, but I'm keeping my fingers crossed that it doesn't.

 

Hope you get your problem sorted and I'll keep you informed if I work out what I changed that fixed it.

 

Regards

Tim

Link to comment
Share on other sites

I'm using 2.2M2 and STS 2.01

 

For some reason I can get the template to work for the main page (sts_template.html),

but when I test out the included product_info.php.html template, it doesn't work.

The product info page defaults to the sts_template as if it doesn't find the product_info.php.html file.

 

I have placed the template in catalog/includes/sts_templates/

but no luck....

Link to comment
Share on other sites

Using STS template system with Big Images contribution!

I knwo this question has been asked a million times, but I read though all 81 pages, and still coulnd't get it to work.

Whenever the "click to enlarge" is clicked, new page is opened with the template look without the picture in it. I read that is has to do with javascript, but didn't find no way how to fix it.

Can someone help?

Thanks in advance! :D

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

 

Sincerely,

Dr. DK

Link to comment
Share on other sites

Just tryed to install fresh copy of 2.01 STS.

Yet I still get the template without the image on "click to enlarge", without using any other contributions.

Is there something that should be perhaps added somewhere that I am missing?

Any help is greatly appreciated.

Thanks.

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

 

Sincerely,

Dr. DK

Link to comment
Share on other sites

Hi Tim,

 

I'm glad you solved your problem with the forgotten password problem..

But could you tell me wich files you have been working on.. so i can trie to search for an answer in those files..

 

I have been searching and trying now for 4 weeks and still did'nt found anything..

 

Also i'd like to know if there are more people who have this problem..

 

Original message was,

 

hi oscommerce community..

 

I think i've got a challenge..

 

everything on my site finally works.. when i press the link forgotten password during login, the system asks me to fill in my e-mail adress..

But, when i fill in my emailadress i get the error :

 

Faillure: youre emailadress does'nt exists in our database, check your emailadress.

BUT when i look in my admin the emailadress is exactly the same.. also tried it with a testaccount but the same faillure.. 

 

I have this problem from the moment i have installed sts....

I,m working with oscommerce 2.2 ms2 sts 1.8

 

 

please help me with this one, really don't know were to search anymore..

already tried to install everything again, twice... 

 

thanks, Marco van Meurs (sorry for my poor english)

 

Really hope someone can help me with this..

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