Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[contribution] Simple Template System (sts)


DiamondSea

Recommended Posts

Hi,

 

Fantastic contribution!

 

Just one question (my sincere apologies if this has been answered already, I tried to search and read as much of the 230+ pages here but my eyes began to lose the will to stop working after a while!)

 

I would like to make it possible to use a button to link to individual categories but don't know the placeholder I would need. Is there a uniform one for category 1, 2 etc? I'm sure people have done this before and I'm even sure I've seen OSC sites which implement it but my php knowledge originates solely from using OSC and I'm at a bit of a loss as to what to do. Thank you immensely in advance for any help you could offer

 

STS Link to a category:

 

<a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a>

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

STS Link to a category:

 

<a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a>

 

Bill - that's absolutely fantastic, thanks a million!!

Link to comment
Share on other sites

Hello Guys,

 

I love the STS Contribution and I still have a lot more to learn form this addition.

 

I am working on a new Store and I installed the MSRP contribution which is great, however, since I am not a brain in PHP, I haven't been successful in displaying the MSRP using the Simple Template System.

 

Another OSCommerce User gave me a hint, however, I can't still make it to work:

 

"Ed, if the MSRP contribution followed osC coding, then STS would automatically pick up the price and display it. However, if you are using the "content" template feature in STS, then you have some extra work cut out for you, not much, but extra.

 

Any edits that the MSRP contribution made in the product_info.php file needs to be duplicated in the sts_inc/product_info.php file. For example, you will need to find the database query and whatever variable MSRP uses for the special price (I think it is 'products_msrp') and make a STS tag for it in the sts_inc/product_info.php file."

 

I looked at how Product Info renders the price of an item, tried to use the same method in different ways to render the MSRP within STS and it doesn't work. Of course.. I am guessing wildly! I am wondering if somebody has been successful at it and how it can be achieved.

 

 

 

 

 

 

Cheers!

Ed

Link to comment
Share on other sites

Hello Guys,

 

I love the STS Contribution and I still have a lot more to learn form this addition.

 

I am working on a new Store and I installed the MSRP contribution which is great, however, since I am not a brain in PHP, I haven't been successful in displaying the MSRP using the Simple Template System.

 

Another OSCommerce User gave me a hint, however, I can't still make it to work:

 

"Ed, if the MSRP contribution followed osC coding, then STS would automatically pick up the price and display it. However, if you are using the "content" template feature in STS, then you have some extra work cut out for you, not much, but extra.

 

Any edits that the MSRP contribution made in the product_info.php file needs to be duplicated in the sts_inc/product_info.php file. For example, you will need to find the database query and whatever variable MSRP uses for the special price (I think it is 'products_msrp') and make a STS tag for it in the sts_inc/product_info.php file."

 

I looked at how Product Info renders the price of an item, tried to use the same method in different ways to render the MSRP within STS and it doesn't work. Of course.. I am guessing wildly! I am wondering if somebody has been successful at it and how it can be achieved.

 

 

 

 

 

 

Cheers!

Ed

 

Ed,

I take it you are using the STS Content Template feature and therefore need to modify the sts_inc/product_info.php file to include the MSRP data. Just a reminder, STS should pull this data in automatically without any intervention on your part if you DID NOT use the Content Template feature and not use the Product Info Module in the admin.

 

If you do use the Content Template feature, then you will need to add the query for MSRP into your sts_inc/product_info.php file, create the STS tag for MSRP in the same file, and then add the new STS tag into your product_info.php.html content template.

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

Hello!

 

I wonder...

 

The page After you go to a catagory and get a list of products.

1. Is It possible to make the products line up like 4 or 5 thumbnails in widht, and the rest in height. Creat a grid of a sort?

 

2 On the product page. I would like to have 4 pictures. One on each side wich are links to the previous and next product.

 

It is really great with all of you helpful people out there. With out you this would not be possible, for many of us.

Thank you!

Link to comment
Share on other sites

Hello, I have an odd problem with STS.

 

Here is my website: http://www.tv-stands.com/. Now I can access this fine, but Google or other computers seem unable to (they receive a 500 error on all pages of the site - e.g. try typing the url into here http://www.freespeedtest.com/).

 

I have tracked the problem down to STS, and specificially to do with the output buffering (ob_start() etc). If i output a whitespace at the top of application_top.php - it fixes the problem (but then redirects will obviously not work).

 

Can anyone shed any light on this problem?

 

Thanks :)

Link to comment
Share on other sites

Instead of the information infobox I would like to have a separate link to shipping, contact us... in my footer.

 

What link can I use for eage page? Ihave tried /catalog/includes/languages/english/shipping.php?osCsid=4ca0cfa47c3fc55de7e60fabcdd71c03 or /catalog/privacy.php but they just take me to the installation page.

Link to comment
Share on other sites

Instead of the information infobox I would like to have a separate link to shipping, contact us... in my footer.

 

What link can I use for eage page? Ihave tried /catalog/includes/languages/english/shipping.php?osCsid=4ca0cfa47c3fc55de7e60fabcdd71c03 or /catalog/privacy.php but they just take me to the installation page.

No, you wouldn't want to create the link in that matter. There are a couple different ways to do it:

 

<a href="<?php echo tep_href_link('conditions.php', 'NONSSL'); ?>"

 

<a href=' . tep_href_link(FILENAME_CONTACT_US, '', 'NONSSL') . ' class="headerNavigation">' . 'contact' . '</a>';

 

STS way: Create a new tag in your sts_user_code.php file.

 

Create a tag to be a URL for a file in your shop:

 

 $sts->template['urlshipping'] = tep_href_link(FILENAME_SHIPPING, '', 'NONSSL');

This will create a $urlshipping STS tag that you could link to text or an image in your footer of your template. It retains the Session ID which is VERY IMPORTANT.

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.

 

I hope someone can help me with this. I've installed the update to this mod last week and created a new template for the site and can't seem to figure out these two things.

 

1. I'm now trying to tweak the links on the site. I'm using CSS through the style.css file found at /style.css. Is this where I make the changes to the boxes in my menu? I can't seem to change the color of the links. Could someone suggest a css string to change this in .infoBoxContents (I think that's where the change needs to be made).

 

2. I can't get rid of the New Products box on the home page. I've deleted the lines in the /index.php page and it just won't go away. Do I need to get rid of something else somewhere else?

 

Thanks for the help. I'm really loss with these problems.

Thanks!

Clesha

Link to comment
Share on other sites

Hello, I have an odd problem with STS.

 

Here is my website: http://www.tv-stands.com/. Now I can access this fine, but Google or other computers seem unable to (they receive a 500 error on all pages of the site - e.g. try typing the url into here http://www.freespeedtest.com/).

 

I have tracked the problem down to STS, and specificially to do with the output buffering (ob_start() etc). If i output a whitespace at the top of application_top.php - it fixes the problem (but then redirects will obviously not work).

 

Can anyone shed any light on this problem?

 

Thanks :)

 

Mike, this is most likely due to a server issue. Check your error logs and you might find out more details. It has nothing to do with STS by the way.

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.

 

I hope someone can help me with this. I've installed the update to this mod last week and created a new template for the site and can't seem to figure out these two things.

 

......

 

2. I can't get rid of the New Products box on the home page. I've deleted the lines in the /index.php page and it just won't go away. Do I need to get rid of something else somewhere else?

 

Thanks for the help. I'm really loss with these problems.

What update are you referring to?

 

See a few posts back regarding the New Products box:

http://www.oscommerce.com/forums/index.php?sho...p;#entry1301506

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 page After you go to a catagory and get a list of products.

1. Is It possible to make the products line up like 4 or 5 thumbnails in widht, and the rest in height. Creat a grid of a sort?

 

2 On the product page. I would like to have 4 pictures. One on each side wich are links to the previous and next product.

 

Sorry.. let me be more sts specific.

Index.php(.html) is the home page, the first page. The product.php(.html) is the product page.

What is the name of the page when you go to a category? And how do I change the content there?

The defult is a list of products.. Do I make sense?

 

Hope so..

 

All the best!

 

,

Tim

Link to comment
Share on other sites

Sorry.. let me be more sts specific.

Index.php(.html) is the home page, the first page. The product.php(.html) is the product page.

What is the name of the page when you go to a category? And how do I change the content there?

The defult is a list of products.. Do I make sense?

 

Hope so..

 

All the best!

 

,

Tim

 

Sorry.. Wrong sts forum.

 

Man I need to learn to read...

Sry

Link to comment
Share on other sites

Sorry to ask a silly question, I want to create a new page and I know somewhere there is documentation on this but I just can't find it, I've looked in the following documentation:

 

  • STS User Manual
  • STS-tips-volume1

 

but can't spot it in either of those - is there a document I'm missing?

 

Thanks

 

Lotti

Link to comment
Share on other sites

What update are you referring to?

 

See a few posts back regarding the New Products box:

http://www.oscommerce.com/forums/index.php?sho...p;#entry1301506

 

Bill, first, thanks for the new products fix link. I didn't know about the second string to comment out. I am using STSv4.5.2 and HTCv2.6.3 Bundle.

 

I was able to import the categories and their descriptions into the database and it's visible in the admin section, but the category descriptions don't show up on the web. I follow the directions in the install file to fill in the tags and added for all sts:

 

Files for normal template

sts_user_code.php;headertags.php

 

For some reason it's still not showing up. I know I'm missing something obvious, but i can't see it.

 

As for Q1, I'm going to read through your STS infobox template instructions and try to create the look of the left column boxes that way.

 

 

Thanks again for the help!

Thanks!

Clesha

Link to comment
Share on other sites

STS way: Create a new tag in your sts_user_code.php file.

 

Create a tag to be a URL for a file in your shop:

 

 $sts->template['urlshipping'] = tep_href_link(FILENAME_SHIPPING, '', 'NONSSL');

This will create a $urlshipping STS tag that you could link to text or an image in your footer of your template. It retains the Session ID which is VERY IMPORTANT.

 

Chose the STS way and it works perfectly. Thanks.

 

I may not know how to write PHP but I can copy and paste.

Link to comment
Share on other sites

Bill, first, thanks for the new products fix link. I didn't know about the second string to comment out. I am using STSv4.5.2 and HTCv2.6.3 Bundle.

 

I was able to import the categories and their descriptions into the database and it's visible in the admin section, but the category descriptions don't show up on the web. I follow the directions in the install file to fill in the tags and added for all sts:

 

Files for normal template

sts_user_code.php;headertags.php

 

For some reason it's still not showing up. I know I'm missing something obvious, but i can't see it.

 

As for Q1, I'm going to read through your STS infobox template instructions and try to create the look of the left column boxes that way.

 

 

Thanks again for the help!

 

Post 2481

http://www.oscommerce.com/forums/index.php?sho...p;#entry1116611

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

Sorry to ask a silly question, I want to create a new page and I know somewhere there is documentation on this but I just can't find it, I've looked in the following documentation:

 

  • STS User Manual
  • STS-tips-volume1

 

but can't spot it in either of those - is there a document I'm missing?

 

Thanks

 

Lotti

Lotti,

 

Look in the STSv4 Power Pack site (a site dedicated to STS addons). I have a "Add New Pages Using STS" addon available.

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 am trying to add a link on an image which takes the customer to the shopping cart. I thought shopping_cart.php would do the job but I always get an empty cart but I have seen it work fine on other stores which is strange. However if I use the sts_template.html as an example and position the mouse over the link 'Cart Contents', I get the url http://domainhere/catalog/shopping_cart.ph...i51bi9o073mvro2 which takes me to my shopping cart containing the items in that cart which is what I want.

 

Can anyone give me an idication as how to get around this problem?

 

Cheers.

Link to comment
Share on other sites

I am trying to add a link on an image which takes the customer to the shopping cart. I thought shopping_cart.php would do the job but I always get an empty cart but I have seen it work fine on other stores which is strange. However if I use the sts_template.html as an example and position the mouse over the link 'Cart Contents', I get the url http://domainhere/catalog/shopping_cart.ph...i51bi9o073mvro2 which takes me to my shopping cart containing the items in that cart which is what I want.

 

Can anyone give me an idication as how to get around this problem?

 

Cheers.

$urlcartcontents

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 a line of JavaScript to display my SSL cert (or more correctly that my site HAS an SSL cert) by adding the following into footer.php - latest OSC release, latest STS. All working fine, so far, thanks to Bill.

 

<tr>
<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>
</tr>

 

Changed to:

 

<tr>
<td align="center" class="smallText"><?php echo FOOTER_TEXT_BODY; ?></td>
</tr>

<!-- new code added - SSL display -->
 <tr>
<td align="left"><script language='Javascript' src='https://seal.godaddy.com /getSeal?sealID=191****380'></script></td>
 </tr>

<!-- end of added code - SSL display -->

 

Am I editing the right file? It should show an image that's clickable to validate my SSL cert. Works ok in a bog-standard HTML page, problematic in OSC pages.

Link to comment
Share on other sites

For some reason I can't get the background of the infobox headings to change, the section in between the two corner images. It just seems to stay the original grey blue.

 

The heading is

<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111" bgcolor="#006699">
 <tr>
<td width="12" bgcolor="#006699">
<img border="0" src="images/infobox/corner_left.gif" width="11" height="14"></td>
<td width="620" bgcolor="#006699" class="infoBoxHeading">Browse by categories </td>
<td width="83" style="background-repeat: norepeat" bgcolor="#006699">$right_arrow</td>
<td width="12"  bgcolor="#006699" style="background-repeat: norepeat">
<img border="0" src="images/infobox/corner_right.gif" width="11" height="14"></td>
 </tr>

 

and the style is

 

TD.infoBoxHeading {
 font-family: Verdana, Arial, sans-serif;
 font-size: 10px;
 font-weight: bold;
 background: #006699;
 color: #ffffff;
}

 

I'm sure I must be missing something basic but I just don't see what else to change, if the table background is changed in the html, and the class has changed on the stylesheet, and I have reuploaded all the files, where is the template still getting the old colour from?

Every other border round the box's changes, it is just the section with the writing in.

Link to comment
Share on other sites

Fazer6, I just changed my infobox background colour 2 minutes ago by changing the value of 'background: #006699;' for example change it to #ebebeb.

 

Thats all I ever change.

 

btw, if you changed the font size, does the font size actually change? Its a good way to confirm the css you are editing is actually making the physical changes.

Edited by scream_zone
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...