Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

do i have to download sts to acheive this kind (http://www.marlicards.com/) of design? i'm on the verge of giving up trying to edit the layout and overall look. i need drastic changes so editing just the stylesheets is not what i'm going to do.

 

btw are there any versions of sts that is able to work with register globals set to 1?

Version 4.5.2 is not effected by Register Global settings.

STS will allow you to do what you are wanting to do with your design. You will still need to know HTML, CSS and other web languages to totally customize your template pages. You can make it as "simple" or "advanced" as your skill level allows. :thumbsup:


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,

 

This is my first attempt at using STS, I was fine using the normal format and editing the code as I needed - but I am doing a site for a friend who wants quite a bespoke design and I thought STS would be able to help me achieve what I was looking to do.

 

Basically they don't want the products shown on a page in a list one under the other. But dotted around the page and you just click on the image to buy it.

 

Here is an example of the sort of layout I am hoping to acheive: http://www.windowcleanerhub.com/jpeg/necklaces.htm but I can see how I can distribute the products like that from what I have read

 

Is there a way to put $productsid_1 in one place $procuctsid_2 in another a so on? Total control of where the products are displayed.

 

Thanks in advance

Share this post


Link to post
Share on other sites
Hello,

 

This is my first attempt at using STS, I was fine using the normal format and editing the code as I needed - but I am doing a site for a friend who wants quite a bespoke design and I thought STS would be able to help me achieve what I was looking to do.

 

Basically they don't want the products shown on a page in a list one under the other. But dotted around the page and you just click on the image to buy it.

 

Here is an example of the sort of layout I am hoping to acheive: http://www.windowcleanerhub.com/jpeg/necklaces.htm but I can see how I can distribute the products like that from what I have read

 

Is there a way to put $productsid_1 in one place $procuctsid_2 in another a so on? Total control of where the products are displayed.

 

Thanks in advance

Elliot, If you do not have a lot of products, you could just create your own images and link them to your osC products using the following hyperlink:

 

<a href="<?php echo tep_href_link('product_info.php', 'products_id=53&', 'NONSSL'); ?>">Product Name Here</a>

 

Otherwise, if you have a lot of products or you just want to stick with the osC way of listing products, you could install a contribution that would alter the way products are listed. There are several available so take your pick. :thumbsup:


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

How can I add $addtocartbutton on a page which is not product_info template??

I did a search but i can't find an answer..

Thank you

You can try this (not tested):

Add the "button_in_cart.gif" image inside your template and then link it to your individual product by using the following link (changing the products id to the actual id being used): http://www.yourdomain.com/index.php?action...products_id=138

 

The problem I see by doing it this way is that you would have to create the link manually for each product outside of the product template pages.

Let me know if this was useful.


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

Im having issues installing the script. I have started from a clean install of OScommerce (twice now) and followed the install guide step by step, copying/overwriting the files as directed and when I log into the admin pannel and go to modules and click on the sts module, it shows the information for the payment options module. Im stumped on how to get this plugin going and iv got to get a custom skin I designed up for a client. It might be easiest to pm me as its probably something picky that I dont realize I did/didnt do.

Share this post


Link to post
Share on other sites
You can try this (not tested):

Add the "button_in_cart.gif" image inside your template and then link it to your individual product by using the following link (changing the products id to the actual id being used): http://www.yourdomain.com/index.php?action...products_id=138

 

The problem I see by doing it this way is that you would have to create the link manually for each product outside of the product template pages.

Let me know if this was useful.

Thanks Bill,

If I understood you corectly

I made a link to the product_info id page and it is useful,

But it does'nt linked to same page like $addtocartbutton does(shopping_cart page)

Share this post


Link to post
Share on other sites

Building A Placeholder for the Continue button and table.

 

I would like to build a STS placeholder for the standard Continue button and white table around it. I have found the code for the table and Continue button in a couple of the default OSC pages but I can't figure out how to turn the code into a STS placeholder. If anyone could give me some pointers on this issue, I would appreciate it.

 

I apologize if this has been covered before. This topic is so long it is challenging find information.

 

Thanks

Share this post


Link to post
Share on other sites

hi all, noob here..

 

may i know if it's safe to use div instead of tables. from what i know most of the codings were defaulted to <table> or <tr> or <td>. i remembered there was this line of code somewhere that removes codes before the tag and adds a <td> in front.

Share this post


Link to post
Share on other sites
April,

 

You should use the following for your category 21 link:

 

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

 

Hope this has helped,

 

Should I use this for all text links in the shop? For example Special and New products?

And should the cPath allways be 21? If not, how can find out witch number to use?

 

Br

Magnus in Sweden

Share this post


Link to post
Share on other sites

I am still having issues getting this to work. I removed all traces of my old STS version, I used beyond compare to merge all new changes into my existing files, and I still have problems. No errors come up but as I showed before the template just doesnt work properly. All elements are just displayed vertically, no columns show up.

 

I even tried overwriting all my files with the ones included with STS and it does the exact same thing, so I dont think it's somethign I did wrong.

 

I have alot of contributions installed, could this be an incompatibility issue? The old version of STS I had worked perfectly though, so i dont know why this one wont work with the same contributions if that is the case.

Share this post


Link to post
Share on other sites

I would have edited my post but the 5 min edit limit kicked in, lol.

I figured it out. In the previous version infoboxe templating was not included, so I had edited all my infoboxes, and I was using a table-less css design. apparently this didnt work too well with the new templating system. I replaced all my infoboxes with the older non modified versions and it seems to work fine now!

Share this post


Link to post
Share on other sites
I would have edited my post but the 5 min edit limit kicked in, lol.

I figured it out. In the previous version infoboxe templating was not included, so I had edited all my infoboxes, and I was using a table-less css design. apparently this didnt work too well with the new templating system. I replaced all my infoboxes with the older non modified versions and it seems to work fine now!

Good to hear you got things working. The table-less CSS design should have worked for you though but it would have taken a lot of tweaking. :-

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 information, the fix you had posted didn't seem to work for Protx and also didn't work for Discount Coupons? Seems strange if it does work with others?

 

I followed the link to the thread you'd put in, is it just a case of putting:

 

$sts->template['error'] = '<span class="headerError"><b>'. $HTTP_GET_VARS['error_message'].'</span></b>';

 

into sts/general.php and then putting $error$content into my template?

 

Many Thanks again

 

becki

 

Hi Bill,

 

I tried making this placeholder and that didn't work either! It did work for the discount coupons but didn't show up the credit card error. Have you got any more ideas as i really need to get this fixed? I have posted more details on the Protx V2.22 (http://forums.oscommerce.com/index.php?showtopic=195199&st=420) page 22 and original post on page 21. I don't know whether it's something to do with the actual error that is displayed - my post in protx is more informative if you have time to have a quick look :)

 

many thanks for any info/help

 

Becki

Share this post


Link to post
Share on other sites
Tracy, the changes mentioned in that thread were supposed to be in the application_top.php file already. That individual did not complete the STS installation so that is why he was having problems.

Now if you are not using STS v4.4 or above, you will not have that code either. I do suggest that you upgrade your STS4.2 to STSv4.5.2 since it adds new features but also corrects some bugs along the way.

 

Hi Bill,

I've not updated yet as we also use the DynaMenu, and I wasn't sure if all of the kinks have been worked out yet with getting the Vertical pop-out Dyanmenu working correctly with the new STS. At the moment my time has been very limited, and I'm simply attempting to get this form working. Any thoughts as to what code tweaks need to happen - or is the new STS working properly with Dynamenu now?

 

Thanks :blush:


~Tracy
 

Share this post


Link to post
Share on other sites
Hi Bill,

I've not updated yet as we also use the DynaMenu, and I wasn't sure if all of the kinks have been worked out yet with getting the Vertical pop-out Dyanmenu working correctly with the new STS. At the moment my time has been very limited, and I'm simply attempting to get this form working. Any thoughts as to what code tweaks need to happen - or is the new STS working properly with Dynamenu now?

 

Thanks :blush:

Yes, STSv4.5.2 does not have any issues with Dynamenu as the 4.4-4.5 versions did.

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
Yes, STSv4.5.2 does not have any issues with Dynamenu as the 4.4-4.5 versions did.

 

Thanks Bill - guess I'll be looking at updating soon! ;)


~Tracy
 

Share this post


Link to post
Share on other sites
Thanks Bill - guess I'll be looking at updating soon! ;)

 

Hi Bill,

 

I am using WinMerge to update to v4.5.2 and came accross a couple things I thought I would ask :blush:

 

In includes/classes/sts.php

 

Line 179 has two ; 's at the end - is this supposed to be this way?

 

Lines 122 & 123 are both break; - does it need two of them?

 

Thanks!! :lol:


~Tracy
 

Share this post


Link to post
Share on other sites

Hi Bill,

 

Ok - I am on catalog/includes/functions/html_ouput.php at the moment, and I'm stuck.

 

I have this for Ultimate SEO URL's contrib (and this is my whole link wrapper function)

////
// Ultimate SEO URLs v2.1
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
global $seo_urls;		
	if ( !is_object($seo_urls) ){
		if ( !class_exists('SEO_URL') ){
			include_once(DIR_WS_CLASSES . 'seo.class.php');
		}
		global $languages_id;
		$seo_urls = new SEO_URL($languages_id);
	}
return $seo_urls->href_link($page, $parameters, $connection, $add_session_id);
 }

 

You have:

////
// The HTML href link wrapper function
 function tep_href_link($page = '', $parameters = '', $connection = 'NONSSL', $add_session_id = true, $search_engine_safe = true) {
global $request_type, $session_started, $SID;

if (!tep_not_null($page)) {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine the page link!<br><br>');
}

if ($connection == 'NONSSL') {
  $link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
} elseif ($connection == 'SSL') {
  if (ENABLE_SSL == true) {
	$link = HTTPS_SERVER . DIR_WS_HTTPS_CATALOG;
  } else {
	$link = HTTP_SERVER . DIR_WS_HTTP_CATALOG;
  }
} else {
  die('</td></tr></table></td></tr></table><br><br><font color="#ff0000"><b>Error!</b></font><br><br><b>Unable to determine connection method on a link!<br><br>Known methods: NONSSL SSL</b><br><br>');
}

if (tep_not_null($parameters)) {
  $link .= $page . '?' . tep_output_string($parameters);
  $separator = '&';
} else {
  $link .= $page;
  $separator = '?';
}

while ( (substr($link, -1) == '&') || (substr($link, -1) == '?') ) $link = substr($link, 0, -1);

// Add the session ID when moving from different HTTP and HTTPS servers, or when SID is defined
if ( ($add_session_id == true) && ($session_started == true) && (SESSION_FORCE_COOKIE_USE == 'False') ) {
  if (tep_not_null($SID)) {
	$_sid = $SID;
  } elseif ( ( ($request_type == 'NONSSL') && ($connection == 'SSL') && (ENABLE_SSL == true) ) || ( ($request_type == 'SSL') && ($connection == 'NONSSL') ) ) {
	if (HTTP_COOKIE_DOMAIN != HTTPS_COOKIE_DOMAIN) {
	  $_sid = tep_session_name() . '=' . tep_session_id();
	}
  }
}

if ( (SEARCH_ENGINE_FRIENDLY_URLS == 'true') && ($search_engine_safe == true) ) {
  while (strstr($link, '&&')) $link = str_replace('&&', '&', $link);

  $link = str_replace('?', '/', $link);
  $link = str_replace('&', '/', $link);
  $link = str_replace('=', '/', $link);

  $separator = '?';
}

if (isset($_sid)) {
  $link .= $separator . tep_output_string($_sid); // Patch 2.2MS2-051113 added tep_
}

return $link;
 }

 

What do you think would be the best way to "merge" these two so that the new STS 4.5.2 and the SEO URL's contrib both function properly?

 

TIA :blush:


~Tracy
 

Share this post


Link to post
Share on other sites
Hi Bill,

 

Ok - I am on catalog/includes/functions/html_ouput.php at the moment, and I'm stuck.

 

I have a question on a bit of code in the same file - being I'm still learning php it's just a question about syntax.

 

I noticed in the HTML form submit button wrapper bit there is no { after the if statement, or a } { around the else statement, and I was wondering if they work properly without those little symbols? I just don't recall seeing and if or an else statement before that didn't have those little symbols :blush:

 

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


~Tracy
 

Share this post


Link to post
Share on other sites

One more item in the html_output.php file (last one in this file, I promise) ;)

 

I have this bit of code for the anti-robot registration just underneath the HTML image wrapper function. Do I need to make any changes to it for the new STS ?

 

////
// The HTML image wrapper function Modified for Anti Robot Registration Validation v2.5
 function tep_image_original($src, $alt = '', $width = '', $height = '', $parameters = '') {
if ( (empty($src) || ($src == DIR_WS_IMAGES)) && (IMAGE_REQUIRED == 'false') ) {
  return false;
}

// alt is added to the img tag even if it is null to prevent browsers from outputting
// the image filename as default
$image = '<img src="' . tep_output_string($src) . '" border="0" alt="' . tep_output_string($alt) . '"';

if (tep_not_null($alt)) {
  $image .= ' title=" ' . tep_output_string($alt) . ' "';
}

if ( (CONFIG_CALCULATE_IMAGE_SIZE == 'true') && (empty($width) || empty($height)) ) {
  if ($image_size = @getimagesize($src)) {
	if (empty($width) && tep_not_null($height)) {
	  $ratio = $height / $image_size[1];
	  $width = intval($image_size[0] * $ratio);
	} elseif (tep_not_null($width) && empty($height)) {
	  $ratio = $width / $image_size[0];
	  $height = intval($image_size[1] * $ratio);
	} elseif (empty($width) && empty($height)) {
	  $width = $image_size[0];
	  $height = $image_size[1];
	}
  } elseif (IMAGE_REQUIRED == 'false') {
	return false;
  }
}

if (tep_not_null($width) && tep_not_null($height)) {
  $image .= ' width="' . tep_output_string($width) . '" height="' . tep_output_string($height) . '"';
}

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

$image .= '>';

return $image;
 }


~Tracy
 

Share this post


Link to post
Share on other sites

STS v4.5.2 AND QT Pro

 

Already made posting on this subject but outside the STS v4 contribution pages so though some people have looked at that none has replied. I need to move on and need help asap!

 

I have had STS working well using single new design html template and very happy with results. Added QT Pro contribution carefully checking that no php file clashed in either contribution. QT Pro allows for multi-attribute stock tracking.

 

On returning to the catalogue(I have named it cart), I get the following error message:

 

Fatal error: Call to a member function on a non-object in /home/shapely/public_html/cart/includes/header.php on line 14

 

Lines 12-14 of header.php shows:

 

// START STS 4.1

$sts->restart_capture ('applicationtop2header'); // Capture header from the actual script, needed to take out javascript

// END STS 4.1

 

Can someone help me with this. Do you think this an STS problem or QT Pro? Many thanks in advance.

Share this post


Link to post
Share on other sites

Ok - my previous questions on STS v4.5.2 are still on "unanswered" status - but I do seem to be up and running with the new v4.5.2

 

So - I went back to installing the add-on to the Customer Testimonials contribution that adds a form to the bottom of the page that lists all of the testimonials so that people may submit a testimonial to us.

 

And I get the same error I got with STS v2. :huh:

 

Fatal error: Call to a member function on a non-object in /home/***/***/***/includes/classes/sts.php on line 185

 

Lines 184-187 are as follows

// Add messages before the content
if ($messageStack->size('header') > 0) {
  $this->template['content'] = $messageStack->output('header') . $this->template['content'];
}

 

I have the code that generates the message on successful submission a few pages back (that's what caused you tell me to update to v4.5.2 in the first place).

 

So now that I'm updated - any ideas?

 

I also noticed that my scrollbox for the Specials no longer works with the new 4.5.2 (I do not have Infobox Templates turned on) and that the heading "Specials" no longer shows up. Do I need to make special tweaks to get this infobox working properly with STS 4.5.2 ? The others are showing up just fine.

 

TIA


~Tracy
 

Share this post


Link to post
Share on other sites
... I do seem to be up and running with the new v4.5.2

 

Well - I'm confused now. It is all working properly on the live site, but I get a blank page on my localhost :huh:

 

Is there some trick to getting it to work properly on a localhost? I have found that if I make changes in the Admin on the live site the changes are saved, but if I make them on my local site it does not save the changes. It is the same exact files though :blink:

 

Any thoughts? V4.2 was working properly on both the local and the live sites. I don't understand why the same exact files aren't working properly on the local site now, but do work on the live site.

 

TIA


~Tracy
 

Share this post


Link to post
Share on other sites
Well - I'm confused now. It is all working properly on the live site, but I get a blank page on my localhost :huh:

 

Is there some trick to getting it to work properly on a localhost? I have found that if I make changes in the Admin on the live site the changes are saved, but if I make them on my local site it does not save the changes. It is the same exact files though :blink:

 

Any thoughts? V4.2 was working properly on both the local and the live sites. I don't understand why the same exact files aren't working properly on the local site now, but do work on the live site.

 

TIA

Tracy, check your admin settings as well as your configure.php settings (both of which does not have anything to do with the STS files. In you admin, you may have some errant global setting and in your configure.php files you may have a path out of whack. Also, just because they are the "same" files, your server enviroment is not necessarily the same. Check both servers PHP, MySQL and Apache versions.

 

A note on the Admin not saving changes: Check your osC version on each server. The 060817 version has a bug that causes the modules not to refresh. The bug fix is listed several times in this thread as well as all over the place in the forums.


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
STS v4.5.2 AND QT Pro

 

Already made posting on this subject but outside the STS v4 contribution pages so though some people have looked at that none has replied. I need to move on and need help asap!

 

I have had STS working well using single new design html template and very happy with results. Added QT Pro contribution carefully checking that no php file clashed in either contribution. QT Pro allows for multi-attribute stock tracking.

 

On returning to the catalogue(I have named it cart), I get the following error message:

 

Fatal error: Call to a member function on a non-object in /home/shapely/public_html/cart/includes/header.php on line 14

 

Lines 12-14 of header.php shows:

 

// START STS 4.1

$sts->restart_capture ('applicationtop2header'); // Capture header from the actual script, needed to take out javascript

// END STS 4.1

 

Can someone help me with this. Do you think this an STS problem or QT Pro? Many thanks in advance.

Michael, have you posted this in the QT Pro thread? This appears to be a QT Pro installation issue. I just quickly browsed that thread and noticed others with the same issue even without having STS installed. Try reinstalling the QT Pro contribution as that seems to have corrected this problem for the others.


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

×