Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Can someone help with this. I have posted it a few times with no results. If it can't be done, just let me know so I don't think my postings are invisible. I think the answer is out there though... Here it the issue, again.... Please help:

 

I am trying to add an infobox for Add to Favories by editing column_left.php with this:

 

// STS: ADD

$sts_block_name = 'addfavorites';

include(DIR_WS_BOXES . 'add_favorites.php');

 

and then editing the sts_display_output.php with this under ///create custom boxes////:

 

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

 

 

The box now takes over the entire top of the page and forces others to the bottom. I then moved the code from column_left.php to column_right.php and it is now at the bottom of the page, but not in a box on the side as I would like. Can anyone advise if my process is wrong and recommend how I can resolve this issue? You can see the site by clicking the barcode labels below. I did add the $addfavorites to the sts_template.html also. No Luck... Please help!

Laser labels, barcode labels, custom labels

Link to comment
Share on other sites

Hello, I have the New Products Listing maximum value set to 4 products, but the database is far too wide and it becomes really tedious to click all the time to see the next 4 products each time...

I managed to get a scroll on the template page, but I would like it to be displayed just on the products_new.php page and not in all the other pages as well...

 

Is there a way I can edit a template page for the products_new.php like there is for the product_info.php or the categories?

 

I know this is not supported in STS but maybe I'm missing something and in any case I'm open to any other idea...

 

Thanks!

Link to comment
Share on other sites

Has anyone tried adding the 'Switch between inc VAT and exc VAT' contrib?

 

It basically permits the user to select whether or not the want to see the prices on the site with tax included by use of a button situated somewhere on the site.

 

I can't seem to get the button to appear.

 

I was wondering if maybe it was something to do with using STS?

 

Regards,

 

Peter

Link to comment
Share on other sites

Hi I am new here to this topic STS and I Need an outline of what I am to do in order to put some Contirbutions that I have added to the Right_column using STS. There currenly are not tags for these contirbutions so I have to start from scratch.

 

Could someone outline or point to a message where adding contribution infoboxes are explained in the Right Column ?

 

Thank you.

 

Leon

Link to comment
Share on other sites

I am having problems implementing my template. In IE the width that is outputed in the variable $content screws me over. It looks fine in firefox, but in internet exploerer it overlaps my right column. Is there anyway to fix this?

 

Heres a link:

 

www.icfstore.com/catalog/

 

any help would be greatly appreciated!!

 

-pete

Link to comment
Share on other sites

Hi everyone,

 

I also just installed STS on a new installation of OsCommerce. Looks fine so far and I was having some fun kicking HTML commands all over the place - well now here is my prob:

 

The homepage looks ok but as soon as I click on anything that refers to another page the layout slightly changes.

 

As an example: I basically used the same layout that OsCommerce has from scratch but using STS having a table with 3 coloumns (left menu, content, reight menu). Between each coloumn i wanna have let's say 10 pixels of space which i managed to do but only for the homepage after that the spacing goes back to 0 and the left meny boxes and the content are "glued" together. :huh: How did that happen? And I am really having a problem to understand how to use STS for differeent categories. That's why I am wondering if, after leaving the homepage by clicking on a link, ANOTHER STS template file takes over and messes up my spacings??? :huh: ??? :huh:

Is that possible?

 

If anyone knows, let me know! Casi

Link to comment
Share on other sites

Hi everyone, hopefully someone will be able to make sense of this for me. I'm new to OSC and i've just installed STS on a slightly modified OSC install to see if it makes my life easier making mods to how the store looks. I merged all the changes, uploaded the extra files but when i went to check the store i got the following error

 

Parse error: parse error, unexpected $ in /homepages/39/d118852182/htdocs/GB/catalog/includes/footer.php on line 84

 

The strange thing is I've checked footer.php and line 84 contains only ?> and nothing else.

 

This is the code from my footer.php file

 

<?php
/*
$Id: footer.php,v 1.26 2003/02/10 22:30:54 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/

// STS: ADD
// Get the output between column_right.php and footer.php
$sts_block_name = 'columnright2footer';
require(STS_RESTART_CAPTURE);
// STS: EOADD

require(DIR_WS_INCLUDES . 'counter.php');

// STS: ADD
$sts_block_name = 'counter';
require(STS_RESTART_CAPTURE);
// STS: EOADD

?>
<table border="0" width="100%" cellspacing="0" cellpadding="1">
<tr class="footer">
  <td class="footer">  <?php echo strftime(DATE_FORMAT_LONG); ?>  </td>
  <td align="right" class="footer">  <?php echo $counter_now . ' ' . FOOTER_TEXT_REQUESTS_SINCE . ' ' . $counter_startdate_formatted; ?>  </td>
</tr>
</table>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
  <td align="center" class="smallText">
<?php
/*
The following copyright announcement can only be
appropriately modified or removed if the layout of
the site theme has been modified to distinguish
itself from the default osCommerce-copyrighted
theme.

For more information please read the following
Frequently Asked Questions entry on the osCommerce
support site:

http://www.oscommerce.com/community.php/faq,26/q,50

Please leave this comment intact together with the
following copyright announcement.
*/

echo FOOTER_TEXT_BODY
?>
  </td>
</tr>
</table>
<?php

// STS: ADD
$sts_block_name = 'footer';
require(STS_RESTART_CAPTURE);
// STS: EOADD

if ($banner = tep_banner_exists('dynamic', '468x50')) {
if ($banner = tep_banner_exists('dynamic', '468x60')) {
?>
<br>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
  <td align="center"><?php echo tep_display_banner('static', $banner); ?></td>
</tr>
</table>
<?php

// STS: ADD
$sts_block_name = 'banner';
require(STS_RESTART_CAPTURE);
// STS: EOADD

}
?>

 

Can anyone see where i've gone wrong? Is this due to something in another file? I just have no idea!

Link to comment
Share on other sites

(Sorry if I've posted this twice. I tried to post it in the STS area earlier but apparently it got posted generally in the Contributions area.)

 

We've worked through most of the STS (latest download) issues we've had but can't get a handle on this one. Things are working pretty much OK until we login.

 

When we login, our right column is empty and its infoboxes are broken and some of them show up below the main content area but before the footer. We've commented out all the infoboxes, one by one, included in the right column and it still happens.

 

We cannot figure out where to look for the problem.

 

We have several contributions installed: Header Tag Controller, Loginbox 5.5, Wishlist, etc.

 

Our not-open site is: http://www.womenofsubstance.us/catalog/

 

I've created a dummy account for testing:

[email protected] for the email and "guest" for the password.

 

Can anyone give us a hint where to look for this problem?

 

Thanks,

Anne

Link to comment
Share on other sites

I'm just about to start my third client site with STS but I have come across a problem I hope theres a solution to.

 

Is there anyway to place the $content variable inside a iframe??

 

My client would like the content panel (product listing etc) to be the only part of the page that moves. The header and left/right colums need to be static.

 

Has anyone achieved this?

 

 

I never saw an answer to this problem in the forum. I have spent the last few hours trying to do the same thing. While I couln't get iframe to work because the content is dynamic and not a URL, I accomplished the same effect using the code below:

 

<ilayer name="scroll1" width=170 height=150 clip="0,0,170,150">
<layer name="scroll2" width=170 height=150 bgColor="lightyellow">
<div id="scroll3" style="width:170px;height:150px;background-color:lightyellow;overflow:auto">


$content

</div>
</layer>
</ilayer>

<script>

/***********************************************
* Scrollable content Script- ? Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var nsstyle='display:""'
if (document.layers)
var scrolldoc=document.scroll1.document.scroll2
function up(){
if (!document.layers) return
if (scrolldoc.top<0)
scrolldoc.top+=10
temp2=setTimeout("up()",50)
}
function down(){
if (!document.layers) return
if (scrolldoc.top-150>=scrolldoc.document.height*-1)
scrolldoc.top-=10
temp=setTimeout("down()",50)
}

function clearup(){
if (window.temp2)
clearInterval(temp2)
}

function cleardown(){
if (window.temp)
clearInterval(temp)
}

</script>

while (!succeed) {try()};

 

GMT -6:00

Link to comment
Share on other sites

Hello all. First post here. I have a question about weird URL's in my shopping cart. After adding an item to the cart, the product link in the table and also the Continue Shopping link have weird URL's that look like "...product_info.php?products_id=46{1}3{2}29". The weirdness I'm referring to is obviously the curly brackets and numbers appearing after the products_id.

Does anyone know what causes this, or more importantly, if this will cause any errors or bugs if a visitor were to click on those particular links? I'm posting this in this topic thread because I don't think it started happening until after I installed STS. Sorry if this has already been discussed before but I did a search and didn't find anything. Thank you.

Link to comment
Share on other sites

Hi Guys,

 

I have a small problem with my store, I have been running the 'auto thumbnail with GD' contrib and now that I have installed the simple template system everytime I add a new product the thumbnail ends up as a grey box with the correct dimensions.

 

For some reason the file is created just not correctly. :'(

 

Has anyone else come across this problem or is it that the two contribs are just not compatible?

 

Thanks

 

Mark : :thumbsup:

Lifes a bitch, then you marry one, then you die!

Link to comment
Share on other sites

Check index.php under /catalog and under /english - that's where I would start - cause it looks isolated to the catalog home page - wish I could be more help

 

Thanks, your suggestion helped my sort the problem on the home page, however when in the catagories, HEADING_TITLE appears again, looking at the code it looks like I cannot find the language definitions and is therefore just displaying the tag text. However I'm not a good enough programmer to figure out a way around it.

Link to comment
Share on other sites

I'm hoping somebody can offer some suggestions here. I've been trying to fix this for about 6 hours and am bleary eyed!

 

I am using STS with a few other contributions (Easy Populate, Attribute Sets) and all was fine until I tried to install the Category Descriptions contribution. I couldn't get it to work, as it kept showing blank content areas on my category pages.

 

So I am trying to get back where I was before,and have replaced the pages I edited with my backup copies. However I am still getting blank category page content areas. I'm stumped!

 

I have an sts_template.html which is located in the catalog/includes directory, and am using a index.php_0.html for the main page and product_info.php.html for the product info pages. All pages seem to display correctly except the categories pages. Whether or not I use an index.php.html template, the $content area is empty.

 

My site is at http://www.bountifulpantry.com/catalog

 

Any help is appreciated!

Janet

Link to comment
Share on other sites

Has anyone got the STS Template System to work with the Header Tag Controller Contribution??? The standard part of the tag contribution for the product pages works likea charm, but the addition of the category tags dosn't work at all.

 

Any help would be much appreciated.

 

Thanks :)

Link to comment
Share on other sites

Ok I've managed to get the category metta tags working by not using the category header tags addition to header tag controller, but by using the stand alone category meta tag contribution and the updated sts_output file by HH in the sts contributions section. Only problem now is that for some reason I get an error when my pages load stating the table_counter can not be found. I've traced this to the script in my footer, after deleting that script my pages load fine with all my tags in all the right places. Is there anything about the sts code that would give me errors for the footer scripts?????? Everthing was running smoth before.

 

Any help would be appreciated.

 

Thanks

Link to comment
Share on other sites

I am about to finish the site but there's still something that I couldn't make it work the way I want although I tried lots of things.

I would like to display the information from the manufacturers using the sts_template.html layout, instead it looks like it takes after the layout of the index.php_0.html... and I don't understand why.

 

Can anyone please point me out some idea or how can I get this solved?

Thanks!!!

Link to comment
Share on other sites

Great Contribution of Newbies and who are not programmers.

 

I am tryin to use STS and I have some problem.

 

1. The default images from the OSCom shows pretty fine on my website.

But I have added new HTML layout with some images in it. All the new images does not show up. What am I doing wrong.

 

 

2. I ahev a differnt CSS for my new template and how do i mex the old and new one.

 

Thanks

Link to comment
Share on other sites

I'm having a similar problem that others are having where the $content area is not displaying anything. But it's not quite the same - I've read that for other people who are having this problem, nothing is being displayed because the $content variable isn't producing any html code. Well, when I click view source from IE, the code IS there, but nothing is being displayed where the $content stuff should be. Actually that is not totally true -- the content will be displayed for a split second and then it will disappear. Also, I've noticed that this only happens the very first time someone visits the site. A refresh/reload of the page will fix the problem though. But I'm afraid that visitors of my site will be turned away/confused by this and leave. I tested this with one of my other home PC's and it only happened using IE, but not Firefox so I'm thinking this is related to IE somehow. Is anyone else having this problem? I could really use some help with this problem, so you if you guys/gals need some more information about my setup or whatever, please just ask. Thanks.

Link to comment
Share on other sites

Sorry, for posting again so quickly, but the option to edit my post said I didn't have permissions to edit the post. Anyways, just wanted to clarify that I'm using STS 2.01 on OSC 2.2-MS2, so people won't think I just arbitrarily decided to post in this thread for no reason :D . Thanks.

Edited by pimpcambo
Link to comment
Share on other sites

Hello!

 

I have aplied STS to my sore and built a new template. Almost everything worked like a charm exept one thing.

 

$content and $footer doesn?t display anything. No error message no... nothing. I can see my productcathegorys, I can login threw the login box (Login box V5.4, witch I have named login_box according to the STS contribution page) but nothing shows. What can I have done wrong?

 

Unfortionally install everything from the beginning is not an option for me... I have to get this to work.

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