Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Dan,

 

I don't know of any less harsh way of putting this so I apologize ahead of time...

 

I think osCommerce as well as STS is out of your league. If you do not know what a css file is or even HTML, then there is no one there that can help you. You need step by step instructions on the very basic of web master skills so developing and maintaining an osCommerce site would be too daunting for you.

 

STS is a great tool for shop owners who don't know PHP but want to maintain their site using the web skills that they are used to; considering these skills are up to par in maintaining a typical web site as well as an online ecommerce shop.

 

You are expected to know HTML and CSS Styles at the very least. Then, it would be a great bonus to understand JavaScript and other cut and paste type programming.

 

This forum is willing to answer your questions on how to use STS or assist in getting it installed on your shop but it is beyond the scope of this forum to teach you the necessary arts in web development.

 

The links I had suggested in my reply to your original post would have been suffice for a web developer who has the basic skills of web development and was just starting out with STS.

 

Good Luck and I wish you the best,

 

 

Hi Bill,

 

No offence. I am aware of my own limitations. I will look further into PHP and HTML and see what's a CSS. I am a fast learner and it's really not a problem acquiring the required knowledge. Question is if it's worth the time for me... and how much involved is it to add things or modify the appearance at later stages. If it's messing several hours with the scripts to do a little tweaking, then I am afraid it's not for me...

 

Regards,

Dan

Share this post


Link to post
Share on other sites

Rob,

 

There is a section in the STS User Manual that specifically covers this topic; Section 6.3

It is under the Tips and Tricks as it doesn't really relate to STS but it is assumed most STS site owners would benefit from this information.

 

Hi Bill

 

Thats the one!!!! , i found what i needed , also i must be in need for new glasses tho ;-)

Share this post


Link to post
Share on other sites

Also, as Rob has just asked, I have no idea as to where does the "What's New Here?" title, that is displayed on my shop home, come from?

 

Thanks,

Dan

 

I found that on the "index.php" file , somewere near the bottom - on line 313 - this function gets called , i just deleted it but left the td thingies like this:

 

         <tr>
           <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
         </tr>
         <tr>
         <td></td> [i][b]( <<<in here was the code)[/b][/i]
         </tr>
<?php
   include(DIR_WS_MODULES . FILENAME_UPCOMING_PRODUCTS);
?>

 

 

It now works without the whole " whats new" field.

 

 

 

Gr, Rob

Share this post


Link to post
Share on other sites

Thanks Rob. What I didn't know (and just understood) is that there were 2 of each php file in osCommerce - one in the main catalogue directory and one for each language. I was looking at the index.php in the English folder and was not understanding where all the variables were coming from and where they were being used...

 

Dan

Share this post


Link to post
Share on other sites

Hi,

 

Did some more reading and now I have a good feeling of PHP and HTML. Thanks again for the links, George. While now I can read the scripts and tell what they should do, I am still very confused as to how exactly osCommerse works. There are lots of variables all over the place shared by several PHP files and I am getting lost in all this. The PHP files don't have sufficient comments to understand what's going on. Is there some place that lists all the variables and structure of osCommerce?

 

For instance, there is a line at the top of the home page:

 

"Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?"

 

Which I have no idea where does it come from???

 

Thanks,

Dan

Share this post


Link to post
Share on other sites

Did some more reading and now I have a good feeling of PHP and HTML. Thanks again for the links, George. While now I can read the scripts and tell what they should do, I am still very confused as to how exactly osCommerse works. There are lots of variables all over the place shared by several PHP files and I am getting lost in all this. The PHP files don't have sufficient comments to understand what's going on. Is there some place that lists all the variables and structure of osCommerce?

Well, osCommerce is not a php tutorial and I think it's not made in the purpose to help self education in this matters. It's a selling tool made in the purpose to work.

 

For instance, there is a line at the top of the home page:

 

"Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?"

 

Which I have no idea where does it come from???

This question is not related to STS, so, in the future for general questions like this please find an older similar topic to ask, or open a new one. Lets keep this thread clean and strict STS related.

 

Anyway, for now:

 

In your index.php you will see near the bottom following line

            
<td class="main"><?php echo tep_customer_greeting(); ?></td>

This is calling a function. This function you will see in file includes/functions/general.php where it says

// Return a customer greeting
 function tep_customer_greeting() {
   global $customer_id, $customer_first_name;

   if (tep_session_is_registered('customer_first_name') && tep_session_is_registered('customer_id')) {
     $greeting_string = sprintf(TEXT_GREETING_PERSONAL, tep_output_string_protected($customer_first_name), tep_href_link(FILENAME_PRODUCTS_NEW));
   } else {
     $greeting_string = sprintf(TEXT_GREETING_GUEST, tep_href_link(FILENAME_LOGIN, '', 'SSL'), tep_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
   }

   return $greeting_string;
 }

 

The actual text is in file includes/languages/english.php

 

You need to invest some time to understand how everything works. Read the forum, most questions are already answered.

Edited by multimixer

Share this post


Link to post
Share on other sites

Hi,

 

This is a great contrib,I'm just new and try to figure out how is this work correctly.

I read the STS User Manual,but still get some confuse with it.

I have a clean Osc MS2 installed with STS4.6 ,the following is my setup:

 

1.Default - enable and select "test" as my template. There is only 1 file sts_template.html in the folder.

2.Product info - enable,the other parameters are all default setup.

 

So,here is my problem.I'm going to test the content page in product info,so i have a file product_info.php_3.html copy to my working template folder (catalog\includes\sts_templates\test\).

Then i run the browser to view my site,there is only ID=3 product apply this contant page,when i turn off this module "product info" in admin,the content page of ID=3 product looks like the rest of other pages,everything works fine.

 

But,when i rename product_info.php_3.html to product_info.php.html,even i turn off the module "product info" (still have "default" one on),but all content pages of my products still apply this content module.

 

I can't figure out what happened,is there any wrong in my install? or It just run like this...

(Sorry for my bad English grammar and spell..)

Share this post


Link to post
Share on other sites

Right I've pretty much got my site up and running but I have a small problem. Im just using one template file (for the moment) and with a $headercontent tag in the head section, a $breadcrumbs tag and a $content tag. Shop

 

Problem 1:

 

The page title in the header info generated by $headercontent is always the same, the shop name. I thought it would be the name of the product?

 

Problem 2:

 

This maybe related to the first problem, but the the breadcrumb navigation doesn't show the name of the products at all. It shows the categories names and then the seperator and then a blank.

 

Problem 3:

 

The new products table and the also purchased table are generated without a header eg on a default install you get the table that says "New products for..." on the index page. As im using the $content tag, I thought this would be pulled in automatically?

 

Sorry for the long post! Any help would be greatly appreciated.

 

My setup:

 

2.2rc2a

OptionTypes 2.1.3_1

STS 4.6

Share this post


Link to post
Share on other sites

Bill

 

with the supposedly impending release of v2.3 (which was going to be last month) will an update to STS be required to continue using it with this new version as i see it has seperated a lot of the html away from the php in the code i have seen.

Share this post


Link to post
Share on other sites

Bill

 

with the supposedly impending release of v2.3 (which was going to be last month) will an update to STS be required to continue using it with this new version as i see it has seperated a lot of the html away from the php in the code i have seen.

 

I just began playing with v2.3 last week and since then the code has already been changed regarding the tables....

 

 

So... Yes, STS will need to be updated to be used with v2.3. I have begun doing that but until the final release of v2.3, I really do not know what I will be working with.


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

Anyone got any idea about my problems (3 posts up)? I'm not 100% sure they are STS related, so I hope this is the right place.

Share this post


Link to post
Share on other sites

Hello Everyone,

 

Got a relatively new shop and have been looking for a new checkout process. I have found 2 one page processes that don't seem to work with STS. Does anyone know of a simple way to modify the checkout process so that it will work with STS? Is it just best to create a template for each page and keep the 4 steps or can it be done in one page?

 

Thanks in advance for any help.

 

Steve

Share this post


Link to post
Share on other sites

Hi Bill,

 

I would like to use CSS buttons, is it possible?

I downloaded the contribution Ultimate buttons http://addons.oscommerce.com/info/7307 and the buttons show when I deactivate sts template. If the template is activated some kind of basic css buttons can be seen, but not the ones from the contribution.

 

The instruction says:

Open includes/functions/html_output.php

Find:

function tep_image_submit($image, $alt = '', $parameters = '') { global $language; $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';
if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';
if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;
$image_submit .= '>';
return $image_submit;
}

 

Replace with:

/* BOF Ultimate Buttons */
function tep_image_submit($image, $value = '-AltValue-', $parameters = '') {
global $language;
$css_submit = '<div class="buttons"><input type="submit" class="buttons_submit" value="' . tep_output_string($value) . '" /></div>';
return $css_submit;
}
/* EOF Ultimate Buttons */

 

Find:

function tep_image_button($image, $alt = '', $parameters = '') { global $language;
return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters);
}

 

Replace with:

/* BOF Ultimate Buttons */
function tep_image_button($class, $value = '-AltValue-', $parameters = '' ) {
global $language;
$width = round((strlen($value) * 5.8),0) + 38;
$image = '<div class="buttons"><span>' . tep_output_string($value) . '</span></div>';
return $image;
}
/* EOF Ultimate Buttons */

 

but my html_output.php looks a bit different:

 

 function tep_image_submit($image, $alt = '', $parameters = '') {
   global $language;

	// START STS v4.4:
  global $sts;
	  $src = $sts->image_button($image,$language);
	  if ($src!='')
	    $image_submit = '<input type="image" src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';
		else 
  // END STS v4.4
   $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

   if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

   $image_submit .= '>';

   return $image_submit;
 }

 

and

  function tep_image_button($image, $alt = '', $parameters = '') {
   global $language;

// START STS v4.4:
  global $sts;
	$src = $sts->image_button($image, $language, true); // 3rd parameter to tell tep_image that file check has been already done
	if ($src!='') { // Take image from template folder if exists.
	  return tep_image ($src);
	}
// END STS v4.4

   return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters);
 }

 

Could you please give me advice how to change the code?

Thank you very much.

Share this post


Link to post
Share on other sites

Hi Bill,

 

I would like to use CSS buttons, is it possible?

I downloaded the contribution Ultimate buttons http://addons.oscommerce.com/info/7307 and the buttons show when I deactivate sts template. If the template is activated some kind of basic css buttons can be seen, but not the ones from the contribution.

 

but my html_output.php looks a bit different:

 

 function tep_image_submit($image, $alt = '', $parameters = '') {
   global $language;

	// START STS v4.4:
  global $sts;
	  $src = $sts->image_button($image,$language);
	  if ($src!='')
	    $image_submit = '<input type="image" src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';
		else 
  // END STS v4.4
   $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';

   if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';

   if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;

   $image_submit .= '>';

   return $image_submit;
 }

 

and

  function tep_image_button($image, $alt = '', $parameters = '') {
   global $language;

// START STS v4.4:
  global $sts;
	$src = $sts->image_button($image, $language, true); // 3rd parameter to tell tep_image that file check has been already done
	if ($src!='') { // Take image from template folder if exists.
	  return tep_image ($src);
	}
// END STS v4.4

   return tep_image(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image, $alt, '', '', $parameters);
 }

 

Could you please give me advice how to change the code?

Thank you very much.

 

Comment out the old function(both) you have completely, and use the code of the css addon. The STS code is looking to find image buttons in the template folder, where you probably have them

Share this post


Link to post
Share on other sites

Comment out the old function(both) you have completely, and use the code of the css addon. The STS code is looking to find image buttons in the template folder, where you probably have them

 

Thank you George,

 

but when I do that, website stops using template buttons, but it doesn´t use the new ones from images folder either. (New buttons should be placed to images folder according to stylesheet of the contribution):

.buttons_submit {

background: transparent url('images/button_left.png') no-repeat;

font-weight: normal;

 

When I comment the old code and replace it with the new one, buttons are probably created only by css (I don´t have buttons like them in any of my folders). If I deactivate STS, new buttons (from the contribution) show up... :(

Share this post


Link to post
Share on other sites

 

but when I do that, website stops using template buttons, but it doesn´t use the new ones from images folder either. (New buttons should be placed to images folder according to stylesheet of the contribution):

 

When I comment the old code and replace it with the new one, buttons are probably created only by css (I don´t have buttons like them in any of my folders). If I deactivate STS, new buttons (from the contribution) show up... :(

 

You can place the new button background images in any folder you like, since you refer to this folder directly in the css. And yes, if you do this, then none of your old image buttons will show up, just the css buttons

 

Example

 

1) My includes/html_output.php

//// ---------------------------------------------------------------------------------------------------------- ////
// The HTML form submit button wrapper function
// Outputs a button in the selected language
/* original
 function tep_image_submit($image, $alt = '', $parameters = '') {
   global $language;

	// START STS v4.4:
  global $sts;
	  $src = $sts->image_button($image,$language);
	  if ($src!='')
	    $image_submit = '<input type="image" src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';
		else 
  // END STS v4.4

   $image_submit = '<input type="image" src="' . tep_output_string(DIR_WS_LANGUAGES . $language . '/images/buttons/' . $image) . '" border="0" alt="' . tep_output_string($alt) . '"';
   if (tep_not_null($alt)) $image_submit .= ' title=" ' . tep_output_string($alt) . ' "';
   if (tep_not_null($parameters)) $image_submit .= ' ' . $parameters;
   $image_submit .= '>';
   return $image_submit;
 }
*/  

// BOF Ultimate Buttons 
//
function tep_image_submit($image, $value = '-AltValue-', $parameters = '') { // regular submit button
global $language;
$css_submit = '<div class="buttons"><input type="submit" class="buttons_submit" value="' . tep_output_string($value) . '" /></div>';
return $css_submit;
}

 

2) My CSS (Placed in folder /sts_templates/)

.buttons, .buttonsPIca {
background: url('images/buttons/black30_1_right.png') no-repeat scroll top right;
font: normal 12px Verdana, arial, sans-serif;
color: #eeeeee;
display: block;
height: 30px;
float: left;
text-decoration: none;
margin-right: 6px;
padding-right: 12px;
border: none;
   }

.... etc etc

 

3) The background images are placed in folder includes/sts_templates/images/buttons

 

If you have your mages in another folder, or your css ie in the root folder, you need to correct the paths accordingly

Share this post


Link to post
Share on other sites

Problem with just a single category for template.

Mr. Bill Kellum I've read just about all your topics and for the life of me I can't figure a way to do this.

I want to use a different category template for just 1 category only in my case this one patiodoorrepair.net Now using freeosc_60 template. All the images are the same for each product. Just need the pure listing with no images for products page. The one image for all the products would be under the category heading.

 

1. Would I use

Index.php_181_182_191.html or

product_info.php_181_182_191.html or

product_info.php-c-181_182_191.html

for new cat template? I tried all but can't get any to work or even show in the working store.

 

2. If I get a category page to work would I need to copy all the index.php code to this template to turn off product images or just a snippet for this category?

 

This can't be as hard as I'm making it. Maybe someone could just point me in the right direction if you would.

 

Thanks in advance.

Nick


"Do what I'm thinking Not what I said." https:windowanddoorparts.us

Share this post


Link to post
Share on other sites

 

Hi George,

Thank you for your time and your patience. I have modernrc2a template with grey buttons.

 

I placed the code in the includes/functions/html_output.php

I placed the code in the sts_templates/modernrc2a/stylesheet.css

and I saved my new images into sts_templates/modernrc2a/images (the new images are blue)

 

now I can see some kind of basic css beige (#ECE9D8) buttons on my website.

If I delete the code from the stylesheet.css and delete my blue buttons from images folder, the buttons that I see on my website don´t change (beige)

Does it mean that something in my sts_templates/modernrc2a/stylesheet.css interfere with the new code? Because, if I place the same code in my old catalog/stylesheet.css and then I save the file in sts_templates/modernrc2a folder, my blue buttons show up... But of course the look of modernrc2a template is gone. :'(

Share this post


Link to post
Share on other sites

 

 

Hi George, I compared the stylesheet files side by side and found what had caused the problem.

Thank you for your help :)

Share this post


Link to post
Share on other sites

Hello,

 

okay so really new to all this stuff but have powered my way through most of it till now, i've hit a wall,

 

Using a temple for sts and can't get the year make model contribution to work.

 

Everything shows up in the product info section properly but i can't get the drop downs which i want in the left column to show up at all. I have tried adding it as a box that didn't work just was hoping someone here could look at the code and see if it was possible. Thanks

 

year make model contribution:

http://addons.oscommerce.com/info/6684/v,22

Share this post


Link to post
Share on other sites

Hi,

 

I have my web still on localhost. Everything seems to work fine in Firefox and IE6.

In Opera, pages load a lot faster than in Firefox (I can´t imagine why). But it looks like they load so fast that sometimes I can see the page before the sts template loads.

 

Usually the top of the page and the left column stay (or at least it seems that they don´t load again and again), but every 5 - 20 clicks the whole page gets refreshed and I see what I am not supposed to see. The page has white background, buttons or menu are just underlined hyperlinks. It is just for a little moment, then the template appears. But it does look really bad. :'(

 

Do you know why this could happen please? Or is it normal behavior of Opera? It doesn´t depend on what I click on, it is totally random. And sometimes it is three times in row, sometimes just once in a while.

 

And one more question: the product_info.php is refreshed every time from top to bottom in IE6. In Opera and Firefox the top of the page and the left column stay. Is it IE problem? Can I do something about it please?

 

Thank you very much for any tip.

Share this post


Link to post
Share on other sites

I'm having a problem with the admin side that I can't figure out. I've narrowed it down to STS - meaning it works without STS and the only contribution I installed is STS and it has this problem.

 

My site worked fine on my local host - wamp server, Apache 2.2.11 (win32), php 5.2.11, and mysql 5.1.36.

My ISP is using Apache 1.3.41(Unix), PHP 5.2.6 and mysql 5.1.45.

 

Once I upload, the site admin/modules shows the modules I've installed but does not allow me to configure them. It has the install button and when pressed - looks like it is trying to process but nothing happens. The directory location for the module is shown in the center part of the screen.

 

I have started from a fress install twice now - works fine locally and when I move to the ISP - it dies. I have checked the permissions, directory structure, etc. several times and had my ISP check them. All seems ok. On the last fresh install it works with just OSc 2.2 and when I add in STS it has this problem.

 

My ISP is telling me that it is an issue with fastCGI. I'm not a php person so I would not know how to look at that. Has anyone else experienced this and have any idea how to solve it?

 

Thanks in advance for your help.

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

×