Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

Hi Bill,

 

I've posted a question previously and not sure if you have caught it.

 

Hi Bill, thanks for the direction and I managed to insert the maninfobox into the content template of product_info page. Out of curiosity, I tried inserting tellafriendbox too and the box does appear but it is pointing to shopping_cart.php instead of tell_a_friend.php.. I've tried including the file with include(DIR_WS_BOXES . 'tell_a_friend.php') to make sure it points to this page but to no avail still. Is there a way that I could insert the tellafriendbox too?

 

Do you happen to know what might caused the link problem with tell_a_friend box? I've tried with all other infoboxes and I only have problem with the tell_a_friend box which I can't figure out why once it is placed into the content template, the link changes to shopping_cart.php. Appreciate if you can help with this again. Thanks

Share this post


Link to post
Share on other sites
Hi Bill,

 

I've posted a question previously and not sure if you have caught it.

 

 

 

Do you happen to know what might caused the link problem with tell_a_friend box? I've tried with all other infoboxes and I only have problem with the tell_a_friend box which I can't figure out why once it is placed into the content template, the link changes to shopping_cart.php. Appreciate if you can help with this again. Thanks

The tell a friend box works differently from other boxes:

 

$tellafriendbox

The Tell a Friend box, displaying a link to the Tell a Friend page where customers can send message to a friend about a product of the store. This will not show if not on a product page (no products_id in the URL) or on the Tell A Friend page (tell_a_friend.php)

 

Box file location: DIR_WS_BOXES . 'tell_a_friend.php' .

Created in: includes/modules/sts_inc/sts_column_left.php

Introduced in: STS v4.0

 

See also: $specialfriendbox (displays Specials or Tell a Friend box -see below).

 

Specials or Tell a Friend

$specialfriendbox

Displays either the Specials box or the Tell a Friend box.

If on a product page (products_id exists in the URL) and not on the Tell a Friend page (tell_a_friend.php), displays the Tell a Friend box, otherwise displays the Specials box.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
My suggestion....Get yourself a good file comparison utility such as Beyond Compare or WinMerge and use it to merge in the code changes needed to install the STS contribution. You will find these tools invaluable for other contributions and code changes you would like to make in the future to your shop. Beyond Compare is my choice.

OK I understand what you are saying but all I did was per the instructions, copy the various files to the various places and this is where I ended up. Am I missing something or did everyone else ace and I am left behind again?

Share this post


Link to post
Share on other sites
OK I understand what you are saying but all I did was per the instructions, copy the various files to the various places and this is where I ended up. Am I missing something or did everyone else ace and I am left behind again?

Well, since that error does not have anything to do with STS, it is either you misplaced some of the code during your manual install or you have another contribution installed that is improperly coded.

 

My advice in my previous post would save you a ton of time in correctly this instead of trying to find a "needle in a haystack".

 

You have the correct code right in front of you (came with the STS download). Just compare that code with your shop's code and find where you went wrong. :rolleyes:

 

Hope this helped you out,


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Hi Bill,

 

Thanks for the guidance, I decided to go without the tellafriendbox in the content template after spending 2 days trying to get it work to no avail, this is too advance for a newbie like me. :blush:

 

I've another question here if you can help with, I have $myaccountlogo and $loginofflogo on the templates and I'm trying to make the My Account appear only after customer login.

 

Below is my attempt, it doesn't trigger any error message thus I don't know where to begin troubleshooting. Can you kindly help with this? Thanks in advance.

 

 

<td align="right" class="headerNavigation"><?php 
if (tep_session_is_registered('customer_id')) 
{ 
?>
<a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  
<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <?php 
} else { ?>
<a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGIN;} ?></a>

Share this post


Link to post
Share on other sites

where can i find the downloads - please help

 

This template system work fine on http pages. I've installed version 1.2

 

Just download now 1.3 for install.

 

But there a problem, with https pages.

 

Whe go to https for confirm buy, if system it's configured with https, $content show pages on https, and other $ ($cartcontents, $information, ..) show href with http links.

 

That produces a lot of windows alerts on IE and other browsers.

Share this post


Link to post
Share on other sites

where you guys download Simple Template System ? - please help

 

Hi Bill,

 

Thanks for the guidance, I decided to go without the tellafriendbox in the content template after spending 2 days trying to get it work to no avail, this is too advance for a newbie like me. :blush:

 

I've another question here if you can help with, I have $myaccountlogo and $loginofflogo on the templates and I'm trying to make the My Account appear only after customer login.

 

Below is my attempt, it doesn't trigger any error message thus I don't know where to begin troubleshooting. Can you kindly help with this? Thanks in advance.

 

 

<td align="right" class="headerNavigation"><?php 
if (tep_session_is_registered('customer_id')) 
{ 
?>
<a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  
<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <?php 
} else { ?>
<a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGIN;} ?></a>

Share this post


Link to post
Share on other sites
where can i find the downloads - please help

 

WOW! That was a very old post that you quoted above.

 

You can download the latest version of STSv4.5.8 using the link in my signature below. Download my version which is two from the top I think.

 

You will see a small icon to the right by the date of the upload (click on the green downward arrow).


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Latest version of STS is 4.5.8

 

hey bkellum, i finnaly found what you were talking about

 

thanks very much - my head was about to explode

 

thanks again !

 

 

WOW! That was a very old post that you quoted above.

 

You can download the latest version of STSv4.5.8 using the link in my signature below. Download my version which is two from the top I think.

 

You will see a small icon to the right by the date of the upload (click on the green downward arrow).

Share this post


Link to post
Share on other sites
Hi Bill,

 

Thanks for the guidance, I decided to go without the tellafriendbox in the content template after spending 2 days trying to get it work to no avail, this is too advance for a newbie like me. :blush:

 

I've another question here if you can help with, I have $myaccountlogo and $loginofflogo on the templates and I'm trying to make the My Account appear only after customer login.

 

Below is my attempt, it doesn't trigger any error message thus I don't know where to begin troubleshooting. Can you kindly help with this? Thanks in advance.

 

 

<td align="right" class="headerNavigation"><?php 
if (tep_session_is_registered('customer_id')) 
{ 
?>
<a href="<?php echo tep_href_link(FILENAME_LOGOFF, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGOFF; ?></a>  |  
<a href="<?php echo tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_MY_ACCOUNT; ?></a>  |  <?php 
} else { ?>
<a href="<?php echo tep_href_link(FILENAME_LOGIN, '', 'SSL'); ?>" class="headerNavigation"><?php echo HEADER_TITLE_LOGIN;} ?></a>

All of the tags below work only if the customer is logged in:

myaccount

urlmyaccount

logoff

urllogoff

myaccountlogoff

loginofflogo

 

These are for the not logged in customers:

myaccount

urlmyaccount

logoff

urllogoff

myaccountlogoff

loginofflogo

 

May I suggest a good addition to your STS shop? Download the "Loginbox with Member name" contribution. Follow the install instructions for everything except where it tells you to add some lines to includes/column_left.php or includes/colum_right.php (skip that part).

 

Instead, add the following in your includes/modules/sts_inc/sts_column_left.php file:

// Get Loginbox - don't show if member is logged in
if (tep_session_is_registered('customer_id')) {
  } else {
  require(DIR_WS_BOXES . 'memberlogin.php');
  $sts->restart_capture ('memberloginbox', 'box'); //Get the Loginbox with member name

Then, use the $memberloginbox tag anywhere you want in your template. It will not display if the customer is logged in. A nice feature though would be to comment out the first two lines of that code and the box will continue to display but instead say "Welcome Username". while the user is logged in.

// Get Loginbox - don't show if member is logged in
//if (tep_session_is_registered('customer_id')) {
//  } else {
  require(DIR_WS_BOXES . 'memberlogin.php');
  $sts->restart_capture ('memberloginbox', 'box'); //Get the Loginbox with member name


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Hello I have put together a full package to download...

 

this includes

 

OSC 2.2 RC1

GCO v1.4.5a

 

and because I like it so much:

 

STS v4.5.8

 

please see pages following:

 

http://www.bluegreenenterprises.com/ebusiness_info/index.php

 

I have put it on my server because the zip file is far too big for the OSC contribs uploads. And this way you can play and see the changes to file at the same time in the knowledge that (fingers crossed tightly) I have no bugs ;o)

 

Titles:

 

STS GoogleCheckout

 

Iwill have a demo Page/site up and running very soon so keep posted....

 

Many Thanks for all your help, Hugs all Round ;o)

 

Matthew John Ritchie

Share this post


Link to post
Share on other sites

I'm using the $loginofflogo tag, and noticed today in Safari, the link displays as a broken image. Firefox works perfectly for me. Any ideas on why this is happening??

Share this post


Link to post
Share on other sites
I'm using the $loginofflogo tag, and noticed today in Safari, the link displays as a broken image. Firefox works perfectly for me. Any ideas on why this is happening??

 

Has it worked in the past? Does it display correctly in other browsers?


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites
Has it worked in the past? Does it display correctly in other browsers?

 

I'm building the site and testing locally, first time I've opened it in Safari.

Firefox displays the tag properly.

Share this post


Link to post
Share on other sites

STS + GCO FILES AND MODS NOW AVAILABLE AT

 

STS POWER PACK

 

MORE INFO AND NOTES AT

 

BGE/STS_GoogleCheckout

 

Matthew John Ritchie

 

p.s.

 

I have another contrib in development:

 

WEB MOBILE COMPLIANT THUMBNAILS

 

it is a fix so you can have thumbnails for the public viewing pages for fast uploads to mobiles as well as having large pictures in the popup windows

 

if this reminds you of anything please let me know so i can have a look

Share this post


Link to post
Share on other sites

How to have 'micro' images for webmobile fast downloads of your website to say the iphone:

 

Three days for trying to hack every public and admin page that shows a picture untill suddently the easy answer just pops into my mind,

 

WHY OH WHY could that not have happened THREE DAYS AGO ARRRRRGGGGGHHHHH!!!!!!!!!!!!!

 

;o)

 

the easy way in four quick steps:

 

1.

 

Dowload freeware: EASY THUMBNAILS. Convert all you large product pictures to thumbnails of the size 100 wide by 80 high.

these thumbnails need to be in your image/manufacturer aka like catalog/images/dvd or catalog/images/microsoft folder. then move all the large images into a sub folder called 'large'. all lower case. like: catalog/images/microsoft/large/...... etc.

 

2.

 

GOTO

"(ZX spectrum 128k with tape drive ... cool ... basic speak) "

catalog/popup_image.php and insert:

 

</head>

<?PHP

// get large image for popup window from images/xxx/large/

$imgpath = $products['products_image'];

$imgpath = str_replace('/', '/large/', $imgpath);

// end get large image

?>

<body......

 

just after closing head tag and before opening body tag.

 

3.

 

change:

 

<?php echo tep_image(DIR_WS_IMAGES . $products['products_image'] , $products['products_name']); ?>

 

for this:

 

<?php echo tep_image(DIR_WS_IMAGES . $imgpath, $products['products_name']); ?>

 

all done. you now have a big picture for your popup and small picks everywhere else for fast mobile downloads.

 

Now SETUP UP paypal etc to accept mobile payments!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

 

;o)

 

THREE BL**DY DAYS I DONT EFFIN BELIEVE IT WAS SO DAM SIMPLE!!!!!!!!!!!!!!

 

TEEHEE

 

Matthew John Ritchie

 

I will add it to my demo tomorrow ;o)

Share this post


Link to post
Share on other sites

need next...

 

sts fix to accomodate the above in popup_image.php.html template when in use....

 

 

bill... anyone else any suggestions?

Share this post


Link to post
Share on other sites

Hi can anyone help me with two small problems. Maybe three.

 

1st problem is I have made a index page that I want to display the homepage (with a categories box and a bacckground picture), then once the user clicks on a category, I would like it to go to another version of the index page that has all the standard functions.

 

very similar to www.asos.com

 

2nd How can I get the cartbox to only show number of items and basket total.

 

3rd in product_info.php I want the picture to show on the left of the page.

Share this post


Link to post
Share on other sites
Hi can anyone help me with two small problems. Maybe three.

 

1st problem is I have made a index page that I want to display the homepage (with a categories box and a bacckground picture), then once the user clicks on a category, I would like it to go to another version of the index page that has all the standard functions.

 

very similar to www.asos.com

 

2nd How can I get the cartbox to only show number of items and basket total.

 

3rd in product_info.php I want the picture to show on the left of the page.

 

  1. You can always create a home page template and name it index.php_0.html and then create a default category template to be used for all other category pages and name it index.php.html.
  2. Take a look at my post regarding adding the cart to show only the number of items and basket total:
    http://forums.oscommerce.com/index.php?sho...p;#entry1195537
  3. You could either edit the catalog/product_info.php file (not very difficult to simply move the product image to the left table cell) or use the STS Product Info Template feature to layout your product page anyway you want using HTML.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Hi eveyone,

 

i'm having a slight problem after creating a STS placeholder : when opening the page where the placeholder is called, i have the following errors :

 

Warning: require(skydog/catalog/story.php) [function.require]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/skydog/catalog/includes/modules/sts_inc/sts_user_code.php on line 55

 

Fatal error: require() [function.require]: Failed opening required 'skydog/catalog/story.php' (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/skydog/catalog/includes/modules/sts_inc/sts_user_code.php on line 55

 

The sts_user_code file has the following code for this placeholder :

$sts->template['story']=require('catalog/story.php');

 

and the file is placed in the 'catalog' folder

 

any idea ?

Edited by supertiti

Share this post


Link to post
Share on other sites
Hi eveyone,

 

i'm having a slight problem after creating a STS placeholder : when opening the page where the placeholder is called, i have the following errors :

 

Warning: require(skydog/catalog/story.php) [function.require]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/skydog/catalog/includes/modules/sts_inc/sts_user_code.php on line 55

 

Fatal error: require() [function.require]: Failed opening required 'skydog/catalog/story.php' (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/skydog/catalog/includes/modules/sts_inc/sts_user_code.php on line 55

 

The sts_user_code file has the following code for this placeholder :

$sts->template['story']=require('catalog/story.php');

 

and the file is placed in the 'catalog' folder

 

any idea ?

 

OK, now when i change

$sts->template['story']=require('catalog/story.php');

to

$sts->template['story']=require('story.php');

 

i get this :

 

Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /Applications/MAMP/htdocs/skydog/catalog/includes/functions/compatibility.php:18) in /Applications/MAMP/htdocs/skydog/catalog/includes/functions/compatibility.php on line 30

 

But i didn't see any second declaration of that function...

 

Help !

Share this post


Link to post
Share on other sites
Hi eveyone,

 

i'm having a slight problem after creating a STS placeholder : when opening the page where the placeholder is called, i have the following errors :

 

Warning: require(skydog/catalog/story.php) [function.require]: failed to open stream: No such file or directory in /Applications/MAMP/htdocs/skydog/catalog/includes/modules/sts_inc/sts_user_code.php on line 55

 

Fatal error: require() [function.require]: Failed opening required 'skydog/catalog/story.php' (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/skydog/catalog/includes/modules/sts_inc/sts_user_code.php on line 55

 

The sts_user_code file has the following code for this placeholder :

$sts->template['story']=require('catalog/story.php');

 

and the file is placed in the 'catalog' folder

 

any idea ?

Try:

 

  $sts->start_capture();
 if ( file_exists('story.php') ) {
require('story.php');
 } 
 $sts->stop_capture('story');

Then, use $story as the placeholder in your template page.

 

NOTE: Be sure the file permissions are correctly set for story.php or you will get the same error message as before.


Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×