Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

We have been successfully using STS for quite some time and are changing up the look and feel of the site.

 

We sell dog treats and have a custom page for each category and everything works great.

An example of this would be http://www.bonesandbonbons.com/index.php?cPath=22

 

When you drill into an individual product, we see this:

http://www.bonesandbonbons.com/product_inf...;products_id=28

 

You can see on the left it is showing $categorybox instead of the content and the right it is showing $bestsellersbox instead of content.

 

 

Any suggestions?

Link to comment
Share on other sites

Hi,

 

I have a brandnew website with STS 4.5 and a dutch language package. Everything is working fine. But...I want to have some images different in the dutch version than in the english version. I know it is possible because of the buttons but how do I do it? I have a little html-knowledge but it is quite rusty as it has been a few years since I actually made a website....

 

Thanks for any pointers in the right direction!

 

Gina

Link to comment
Share on other sites

Hi,

 

I have a brandnew website with STS 4.5 and a dutch language package. Everything is working fine. But...I want to have some images different in the dutch version than in the english version. I know it is possible because of the buttons but how do I do it? I have a little html-knowledge but it is quite rusty as it has been a few years since I actually made a website....

 

Thanks for any pointers in the right direction!

 

Gina

 

Gina,

 

Take a look at the STS manual (STSv4_5.doc). The answer you need is there!

Link to comment
Share on other sites

We have been successfully using STS for quite some time and are changing up the look and feel of the site.

 

We sell dog treats and have a custom page for each category and everything works great.

An example of this would be http://www.bonesandbonbons.com/index.php?cPath=22

 

When you drill into an individual product, we see this:

http://www.bonesandbonbons.com/product_inf...;products_id=28

 

You can see on the left it is showing $categorybox instead of the content and the right it is showing $bestsellersbox instead of content.

Any suggestions?

 

Just a FYI if you run into this problem.

In the files where I had this problem I added:

require(DIR_WS_INCLUDES . 'column_left.php');

 

and all started working.

Link to comment
Share on other sites

Hi Bill,

 

I was wondering how would one know when to modify STS files when adding a contribution to ones store? The reason why I ask is because I want to Additional Images v2.0.0 Contrib 1032, and was not sure if I needed to modify anything in STS or not.

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

Just a FYI if you run into this problem.

In the files where I had this problem I added:

require(DIR_WS_INCLUDES . 'column_left.php');

 

and all started working.

Did you remove this prior to your issues? Otherwise, it is already in there in a stock osCommerce store.

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 Bill,

 

I was wondering how would one know when to modify STS files when adding a contribution to ones store? The reason why I ask is because I want to Additional Images v2.0.0 Contrib 1032, and was not sure if I needed to modify anything in STS or not.

Just a few tips on this...

  1. In general, the changes that a contribution makes in catalog/product_info.php must also be done in includes/modules/sts_inc/product_info.php when using content templates.
  2. Contributions that display error messages during checkout (including Authroize.Net, Discount Coupons, Gift Vouchers,etc.), you would need to modify the includes/classes/sts.php file as follows:
    In your catalog/includes/classes/sts.php,
    Find this:
    	// Add messages before the content
    if ($messageStack->size('header') > 0) {
      $this->template['content'] = $messageStack->output('header') . $this->template['content'];
    }


    And Replace it with this:

    	// Add messages before the content
    if ($messageStack->size('header') > 0) {
      $template['content'] = $messageStack->output('header') . $template['content'];
    }
    ////////Start Error Messages - Bill Kellum modified version of Tom Wojcik code for use with STS 4x
    if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
    $messageStack->add('error_message', $HTTP_GET_VARS['error_message']);
    $this->template['content'] =  $messageStack->output('error_message') . $this->template['content'];
    }
    ////// End Error Messages

    I really think this will work for you. Please let me know.
    Also see the following post:
    http://www.oscommerce.com/forums/index.php?s=&...t&p=1072621

  3. STS and Ultra Pics users should replace /includes/modules/sts_inc/popup_image.php with the following (compliments of my friend Iggy):
     <?php
    /*
     $Id: popup_image.php,v 1.18 2003/06/05 23:26:23 hpdl Exp $
    
     osCommerce, Open Source E-Commerce Solutions
     [url="http://www.oscommerce.com/"]http://www.oscommerce.com[/url]
    
     Copyright (c) 2003 osCommerce
    
     Released under the GNU General Public License
    */
    // Ultrapics mods
     $products_query = tep_db_query("select pd.products_name, p.products_model, p.products_image, p.products_image_lrg, p.products_image_xl_1, p.products_image_xl_2, p.products_image_xl_3, p.products_image_xl_4, p.products_image_xl_5, p.products_image_xl_6 from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$_GET['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'");
     $products = tep_db_fetch_array($products_query);
     $sts->template['productname'] = $products['products_name'];
     $sts->template['productmodel'] =  $products['products_model'];
    
    	   if ($_GET['image'] ==0) {
     $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_lrg'],'','','', 'name="prodimage"');
     } elseif ($_GET['image'] ==1) {
     $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_1'],'','','', 'name="prodimage"');
     } elseif ($_GET['image'] ==2) {
     $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_2'],'','','', 'name="prodimage"');
     } elseif ($_GET['image'] ==3) {
     $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_3'],'','','', 'name="prodimage"');
     } elseif ($_GET['image'] ==4) {
     $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_4'],'','','', 'name="prodimage"');
     } elseif ($_GET['image'] ==5) {
     $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_5'],'','','', 'name="prodimage"');
     } elseif ($_GET['image'] ==6) {
     $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_6'],'','','', 'name="prodimage"');
     } elseif ($_GET['image'] ==7) {
     $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image'],'','','', 'name="prodimage"');
     } ?>


:thumbsup: Well, anyone else is welcome to add to this if they wish.

Hope this was helpful,

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've got it working - thank you so much!

Lotti,

For the benefit of all STS users, did you have to do anything out of the ordinary install of both of these cotributions to get it to work?

Thanks,

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'm currently trying to use the Service Form contribution, where someone can fill out a form with personal information, and then mail a printed copy to me with their product for servicing. The basic form works great with STS, but when I click "continue" the completed form should show as a printer ready document. Instead, I get my template with all the placeholder names showing such as $categories, etc. You can see what I mean here: Visit My Website

 

How can I generate a printer friendly version of this form, please?

 

Thank you for your help.

 

Colin.

Colin,

Since I do not use that contribution I can't give you a "detailed" answer but I will try to point you in the right direction...

 

I would suggest adding the file (the one produced by the form) to the list of files for STS to exclude from using a template for. Here is how to do it:

 

How to exclude a page from being templated in STSv4.5.2:

 

In the sts_default.php file, find the following code:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

Add your php file that you want STS to exclude and it will not template that file. Note: Add the script name as follows:

if (strstr($scriptbasename, "popup") || strstr($scriptbasename, "your_script_here")|| strstr($scriptbasename, "info_shopping_cart"))
  return ''; // We don't use template for these scripts

That should do the trick for you.

Hope this helped,

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

Upper case in infobox header?

 

Hi,

 

I'd like to know if it's possible to change infoboxes header text to upper case, just using the template file (without changing STS module code).

 

I've tried to change $headertext to <?php echo strtoupper($headertext) ?> in infobox_header.php.html file but obviously it didn't work.

 

I know I can change this directly in languages' files but I prefer asking before making any changes.

 

Best Regards,

Joaquim.

You would most likely want to do this by modifying your stylesheet...

Open your catalog/stylesheet.css file and look for the following style:

TD.infoBoxHeading

Now add the following attribute to it:

 text-transform: uppercase;

That should do the trick!

Hope this helped,

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

Lotti,

For the benefit of all STS users, did you have to do anything out of the ordinary install of both of these cotributions to get it to work?

Thanks,

 

I'm not sure, but will be trying again on another site and will post if I did anything different, I tried so many things!

 

Probably just down to user error! :blush:

Link to comment
Share on other sites

Thanks for the quick reply, one last question before I attempt the install. reading over the instructions for other Contribs for STS, and reading the User Manual, I have come to the conclusion that I should create a file named after the contrib with the required code inside and then add this file in the section in the STS Admin of files to be included.

 

Is my assumption correct?

 

  $sts->start_capture();
 if ( file_exists(DIR_WS_INCLUDES . 'file_name.php') ) {
require(DIR_WS_FUNCTIONS . 'file_name.php');
require(DIR_WS_INCLUDES . 'file_name.php');
 } 
 $sts->stop_capture('????');

 

One last thing I can not figure out is the section where I have the 4 question marks what exactly is suppose to go there?

 

I took this example from the headertags.php file found in includes/sts_inc/ folder.

 

Thank you for your time and patience.

Edited by Eighteen48

Powered By osC 2.2RC2a STS 4.5.8 - HTC 2.6.3 - FP 1.5.9 - BCH 1.0.0

Link to comment
Share on other sites

Bill

 

For reference firstly let me give you these links...

 

Catalogue Opening Page - COP

First Layer Down Sub Category - SUB

Products in Sub Category - PRODLIST

Products Page

 

...it will save on words. Contribution 2125 works as in COP but has issues in that colour changes to match background only partially work when hover on etc (STS clash?). I need to progress downward via SUB and PRODLIST to actual product page with image links as shown. You can, of course, access all the above directly via the URL shown on those page images.

 

Clearly whilst osC Admin>Config>Images allows me to play with COP image sizes which is fine for purpose on that page, I do not want them anywhere else or image sizes in SUB dictated by that same control. Hence my original comments as to whether STS can give me a SUB page as illustrated?

 

Grateful for any guidance or help you may be able to offer and response to my original query on $manufacturerbox and $reviewsbutton link - see http://www.oscommerce.com/forums/index.php?sho...381&st=2431

 

Michael

Michael,

My first suggestion to modify/remove the "New Products For Month" box would be to install the "Featured Products" contribution. This would give you complete control over the New Products for Month module by having one to many Featured Products or none at all. You would also have the option of turning it off completely in the admin. I added a STS version on the Featured Products page.

http://www.oscommerce.com/community/contri...atured+products

 

Regarding the spotty colors around the box, It appears to be either a stylesheet issue or you have "Use Infobox Templates" set to true in the STS Default Module and the infobox template is bringing in those colors or shadows as you put it.

It "may" be in the stylesheet....check

TD.infoBoxHeading {

class. If it is in the template, just remove the cell background colors to "none".

 

The other issues would require you to either edit the PHP code directly or add aditional contributions such as one or more of the following for your product displays:

http://www.oscommerce.com/community/contri...g+Column+Format

http://www.oscommerce.com/community/contributions,4491

 

Hope this helped,

Edited by bkellum

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

ok, I got a question how do I fix this http://js-supplies.com/catalog/index.php . . .

Not sure...what are you referring to? Are you pointing to the distorted graphic on the left? Is it supposed to look like this?

http://js-supplies.com/catalog/index.php?cPath=3

 

My guess would be that your template has either some table issues or css issues or both.

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

Not sure...what are you referring to? Are you pointing to the distorted graphic on the left? Is it supposed to look like this?

http://js-supplies.com/catalog/index.php?cPath=3

 

My guess would be that your template has either some table issues or css issues or both.

yes thats the problem and yes, that what it's supposed to look like.

 

ok, I will look and play around with it until I get it figured out

Link to comment
Share on other sites

Hi Bill,

 

I was the person having problems getting customer_testimonials.php to work getting errors on line 185 of sts.php.

 

I have been playing around and it turns out that the problems only happen when the url customer_testimonials.php?action=insert is used (eg customer_testimonials.php?action=12345 returns no errors).

 

Therefore I believe this code is conflicting with STS.

 

if ($HTTP_GET_VARS['action']) {
switch ($HTTP_GET_VARS['action']) {
  case 'insert':
	$testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);
	$testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);
	$testimonials_url = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url']);
	$testimonials_url_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url_title']);
	$testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);
	$testimonials_location = tep_db_prepare_input($HTTP_POST_VARS['testimonials_location']);
	$html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);

	$testimonials_error = false;
	$messageStack = ERROR_HEADER;
	if (empty($testimonials_title)) {
	  $messageStack .= '['.ERROR_TESTIMONIALS_TITLE_REQUIRED.']';
	  $testimonials_error = true;
	}
	if (empty($testimonials_name)) {
	  $messageStack .= '['.ERROR_TESTIMONIALS_NAME_REQUIRED.']';
	  $testimonials_error = true;
	}
	if (empty($html_text)) {
	  $messageStack.= '['.ERROR_TESTIMONIALS_DESCRIPTION_REQUIRED.']';
	  $testimonials_error = true;
	}

	if (!$testimonials_error) {
	  $sql_data_array = array('testimonials_title' => $testimonials_title,
							  'testimonials_url' => $testimonials_url,
							  'testimonials_url_title' => $testimonials_url_title,
							  'testimonials_name' => $testimonials_name,
							  'testimonials_location' => $testimonials_location,
							  'testimonials_html_text' => $html_text);
	 if ($HTTP_GET_VARS['action'] == 'insert') {
	   $insert_sql_data = array('date_added' => 'now()',
								 'status' => '0');
		$sql_data_array = array_merge($sql_data_array, $insert_sql_data);
		tep_db_perform(TABLE_CUSTOMER_TESTIMONIALS, $sql_data_array);
		$testimonials_id = tep_db_insert_id();
	  }
	  echo '<tr><td colspan="2">' . tep_draw_separator('pixel_trans.gif', '1', '10') .' </td></tr>';
	  echo '<tr><td class="main">'. TEXT_TESTIMONIALS_SUCCESSFUL .'</td><td class="main"></td></tr>';
	  $testimonials_id = '';
	   $testimonials_title = '';
	   $testimonials_url = '';
	   $testimonials_url_title = '';
	   $testimonials_name = '';
	   $testimonials_location = '';
	   $html_text = '';
	} else {
	   echo '<tr><td colspan="2">' . tep_draw_separator('pixel_trans.gif', '1', '10') .' </td></tr>';
	   echo '<tr><td class="main">'. $messageStack .'</td><td class="main"></td></tr>';

	   $testimonials_id = tep_db_prepare_input($HTTP_POST_VARS['testimonials_id']);
	   $testimonials_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_title']);
	   $testimonials_url = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url']);
	   $testimonials_url_title = tep_db_prepare_input($HTTP_POST_VARS['testimonials_url_title']);
	   $testimonials_name = tep_db_prepare_input($HTTP_POST_VARS['testimonials_name']);
	   $testimonials_location = tep_db_prepare_input($HTTP_POST_VARS['testimonials_location']);
	   $html_text = tep_db_prepare_input($HTTP_POST_VARS['html_text']);
	}
	break;
}
 }

 

Would appreciate it if you could give me some pointers of this code that may be causing the problems?

 

Cheers

 

Ryan

Link to comment
Share on other sites

Ok i have now found a fix. I tried cutting the action code to the top of the page, this then caused errors on header.php on line 55 which is the exact same conflict code with sts.php.

 

I then pasted the action code to the last line in customer_testimonials.php.

 

Seems to be working fine :D

Link to comment
Share on other sites

Ryan, I agree with the assesment that Chris came up with in the following post regarding this issue:

http://www.oscommerce.com/forums/index.php?s=&...t&p=1114742

This appears to be a problem with how Customer Testimonials does not have the proper PHP code regarding messagestack in the customer_testimonials.php file.

Edited by bkellum

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

Ok i have now found a fix. I tried cutting the action code to the top of the page, this then caused errors on header.php on line 55 which is the exact same conflict code with sts.php.

 

I then pasted the action code to the last line in customer_testimonials.php.

 

Seems to be working fine :D

Ryan, It might be a good idea to post your fix on the Customer Testimonials forum for other STS users having the same issue or post it as a contribution to the STS4 Power Pack site.

 

Thanks,

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

You would most likely want to do this by modifying your stylesheet...

Open your catalog/stylesheet.css file and look for the following style:

TD.infoBoxHeading

Now add the following attribute to it:

 text-transform: uppercase;

That should do the trick!

Hope this helped,

 

Hey, you right!!

Link to comment
Share on other sites

Hi,

 

I asked for a pointer how to add images/buttons that show differently in diferent languages and got referred to the manual. Allthough I have read it and tried a few things, those don't seem to be working for me. I have added a few lines (based on the cataloglogo) to general.php in catalog/includes/modules/sts_inc, but all it showed was $new_button in my website.

I think I want to make a new placeholder, but would like to know in what files I should add what?

 

I know this is a noob-question, but unfortunately that is what I am.

 

TIA

Gina

Link to comment
Share on other sites

Hi,

 

I asked for a pointer how to add images/buttons that show differently in diferent languages and got referred to the manual. Allthough I have read it and tried a few things, those don't seem to be working for me. I have added a few lines (based on the cataloglogo) to general.php in catalog/includes/modules/sts_inc, but all it showed was $new_button in my website.

I think I want to make a new placeholder, but would like to know in what files I should add what?

 

I know this is a noob-question, but unfortunately that is what I am.

 

TIA

Gina

 

You don't need anything as complex as that :) What you do is make a folder in the folder where your template is, called images, and then one within that with the language name that you're using, and put your buttons in there. You can also add your logo to this folder and use the $header_logo placeholder to have your logo display differently for different languages, like perhaps your tagline is in your image and this should change with the language. STS automatically checks for the folder's presence and then the required filename in the folder, and if it's not there it heads for the regular language/image/buttons folder.

 

Or you can add the CSS Buttons Everywhere contribution and have text/CSS buttons instead of images.

Edited by trogette
Link to comment
Share on other sites

You don't need anything as complex as that :) What you do is make a folder in the folder where your template is, called images, and then one within that with the language name that you're using, and put your buttons in there. You can also add your logo to this folder and use the $header_logo placeholder to have your logo display differently for different languages, like perhaps your tagline is in your image and this should change with the language. STS automatically checks for the folder's presence and then the required filename in the folder, and if it's not there it heads for the regular language/image/buttons folder.

 

Or you can add the CSS Buttons Everywhere contribution and have text/CSS buttons instead of images.

 

that would be too good to be true :)

 

this is my html-code:

<a href="products_new.php"><img border="0" src="images/button_header_newproducts.gif"></a>

 

The image is in /catalog/includes/sts_templates/mytemplate/images/dutch/

 

but it is not showing. I have chmodded the images dir to 777. Did I misunderstand you?

 

Gina

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