Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

And that is the root directory of your site Zach?

 

give me paths to all the files. We know that the sts_template.html is located in the includes directory. which is 1 directory above your store.

 

or is your store located in httpsdocs?

 

here is a sure way to see if you can parse php in html copy this code into a page and name it .html

 

<html>
<head></head>
<body>
 <h1><?php echo "I LOVE PHP!"; ?> hi</h1>
</body>
</html>

 

If so you will see I LOVE PHP displayed if not then you wont see anything.

Edited by kevenvision
Link to comment
Share on other sites

That didn't make a difference. I dont think finding the file is the problem... it just doesn't seem to acknowledge the php at all. When I view source for the page it shows the php include exactly as I entered it.

Link to comment
Share on other sites

Did you try the code I posted that does the echo?

make sure that .htaccess file exists in the directory where you want to parse your php page. in your case it looks like it should be in your shop directory.

 

It very well may be your host that your site resides on. Some hosts dont allow you to parse php in html.

Edited by kevenvision
Link to comment
Share on other sites

If one category has a different template than another, then isn't the category template supposed to carry through when you click on the product? What's happening for me right now is the background color is changing back to white when the product is clicked on, so seemingly it's not carrying through. Here is the link, just using a simple brown background to follow the template: http://www.merchtable.com/catalog/index.php?cPath=22

 

To clarify, if someone clicks on Category B and it's template is loaded, is there any way to have that template carry through to the product info page, cart page, checkout page, etc., all based off the current category? Seems simple enough that this could maybe be an add on to the STS contribution as it's currently written. That's assuming this isn't already part of STS. Any suggestions?

Edited by Burton
Link to comment
Share on other sites

you need to change the color in product_info.php.html to match that in the index.php_22.html

 

thats all

 

I think that would only change the color for the product info page itself. So if Category A used a black background and Category B used a white background there would be a conflict I think.

Link to comment
Share on other sites

I think that would only change the color for the product info page itself.  So if Category A used a black background and Category B used a white background there would be a conflict I think.

 

It doesnt make sense. Do you want different backround colors on each page? The style sheet that is in the root directory has the backround color scheme set in it. So all you really have to do is change the stylesheet.css

 

thats what I did with http://goldenpalmgifts.com/store

 

If you set a page backround color I think it over takes what the style sheet has set.

Link to comment
Share on other sites

It doesnt make sense. Do you want different backround colors on each page? The style sheet that is in the root directory has the backround color scheme set in it. So all you really have to do is change the stylesheet.css

 

thats what I did with http://goldenpalmgifts.com/store

 

If you set a page backround color I think it over takes what the style sheet has set.

 

It's been hard to explain. What I'm suggesting is that certain categories would have different templates (already built in to STS) and that when a product in one of those categories is clicked on, the product info screen would inherit the template of that category.

 

It's the idea of imagining the categories as individual stores. Does this make sense?

Link to comment
Share on other sites

I'm setting up a web site for my wifes jewelry and I've installed STS so that I can apply the following template: Wifes Desired Web Page.

 

My problem is that I can't quite figure out the best way to merge STS/osC with that template. I'm not sure how I would overlay a table over the graphics or if the template layout just won't work well with STS.

 

I would really appreciate any suggestions, help, guidance.

 

Thanx, Dave.

Link to comment
Share on other sites

Hi,

 

We have tried "autotheme" and BTS, however found both difficult to use when adding osCommerce contributions, or making other other customisations.

 

It doesn't seem that STS is like that at all, having downloaded the contribution, and compared the source code to standard osCommerce, there are, in fact, very few files changed at all.

 

Therefore, I assume STS would be much more suitable to use, assuming that we will want to add quite a number of osCommerce contributions, and also make the minor code customisation here and there, plus of course, we need to change the layout significantly.

 

Will STS be suitable ?

 

Thanks,

 

Peter

Link to comment
Share on other sites

Hi,

 

We have tried "autotheme" and BTS, however found both difficult to use when adding osCommerce contributions, or making other other customisations.

 

It doesn't seem that STS is like that at all, having downloaded the contribution, and compared the source code to standard osCommerce, there are, in fact, very few files changed at all.

 

Therefore, I assume STS would be much more suitable to use, assuming that we will want to add quite a number of osCommerce contributions, and also make the minor code customisation here and there, plus of course, we need to change the layout significantly.

 

Will STS be suitable ?

 

Thanks,

 

Peter

 

Yes.

 

http://e.volve.net/downloads/

 

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Hi,

Thanks, no doubt 'e-volve' is a loaded version of osCommerce, right ?

 

Peter

 

Tis, but I'm the only one that uses it. Does that count? Anyways you can can get just about any contrib rolled in under STS without much trouble is the point. About the only ones that require work on STS are things that add new boxes and even then it's just a matter of defining new template tags.

 

Iggy

Everything's funny but nothing's a joke...

Link to comment
Share on other sites

Hi Iggy,

 

Okay, thanks for the advice, our main concerns are adding osC contributions and _easy_ integration with osCommerce (I do have Beyond Compare and it saves heaps of time anyway with adding contributions) , so STS looks very good indeed.

 

Thanks,

 

Peter

Link to comment
Share on other sites

OK i see what your saying now. I'm sorry, I didnt understand your question before.

 

It can be done with stylesheets and cookies.

 

I was thinking about that, but I also noticed that in sts_display_output.php are these lines of code:

 

if ($scriptbasename == 'product_info.php') {
 require(STS_PRODUCT_INFO);
}

 

It would seem that some minor alteration there could work. It would help if I understood what exactly is different between the original index.php and product_info.php scripts.

Edited by Burton
Link to comment
Share on other sites

Hello!

 

I am using STS on a site (fantastic contribution!!) but I have just have a question. I am laying out each category page separately using for examle "index.php_256_2.html" and I was wondering if there's an easy way to display the category name as the title, i.e. using something like $category so that I don't have to type in each category name by hand (if incase they get updated in the future).

 

I have got the pull down category menu to work but can't find a function for what I am trying to do! I have about 50 categories so it would be really helpful!

 

By the way, I don't want to use $content at all so changing the php file won't help I don't think.

Correct me if I'm wrong though!

 

Look forward to hearing your suggestions. Many thanks!

 

WhirlyGirl

Link to comment
Share on other sites

This conribution is great! Thank you for all your hard work.

 

Here is a sample of what I have done so far, it is not live yet

 

http://www.natabletennis.com/store

 

However, I have one major problem. If there is any product pages that has a product image, the page is displayed really weird, and doesn't integrate with the layout I set.

Example: http://natabletennis.com/store/product_inf...?products_id=26

 

 

For products without any images, it works fine, For example http://natabletennis.com/store/product_inf...&products_id=28

 

Any clues to what is going on? any help would be greatly appreciated!

Link to comment
Share on other sites

I'm using this template. It's wonderful. However, while adding payment methods, etc, I started checking the checkout procedure (which I haven't done before) and I'm having a display problem.

 

http://www.coastalmermaid.com/problem.htm

 

Bare with me, I know the image quality isn't good (becuase I didn't want someone to have to go thru creating a user) but the checkout is being put below the table area and the specials box is where the contents or checkout info should be. It seems to be putting all the boxes, ie search box, tell a friend, all that stuff down there that I elimated off my sts template page. Everything is fine until you click checkout.

 

This seems like a big mess to me, if someone could be so kind to send me in the right direction, I'd really appreciate it. I just don't know what's wrong.

 

Thanks so much

Linda

Link to comment
Share on other sites

Anyways you can can get just about any contrib rolled in under STS without much trouble is the point. About the only ones that require work on STS are things that add new boxes and even then it's just a matter of defining new template tags.

 

Iggy

 

I am wanting to install Google ads into my site as an infobox in one of the columns. A standard install seems to screw up my STS template. I am guessing that I need to define a new template tag for the google infobox. the relevant contribution I am working with is http://www.oscommerce.com/community/contributions,3031

 

Can you (or anyone) show me to how I would go about adding this new box?

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