Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Hi there,

 

I just did a clean install of OSC 2.2RC2, FEC 3.2 v5, and STS4.5.8 in that order. Everything seems to be working fine except the prettier parts of the check out pages of FEC.

 

I did find a similar post from 2 years ago, but with no resolution:

http://forums.oscommerce.com/index.php?s=&...st&p=906390

 

The problem I'm having is that FEC calls a toggle_collapse javascript function. However the "collapse" aspect doesn't work. The form that's supposed to be collapsed is already expanded. Is STS stripping javascripts from the page?

 

Thanks!

Share this post


Link to post
Share on other sites
Thanks, this did help! Now I just have to style it and set it up the way I want it.

 

However, I have another question. It may not be STS related, but you seem like a knowledgeable guy and you might know the answer.

 

Is there anyway to link the categories and manufacturers pulldown menus so they work together like a filter? Say someone pulls down the "Software" category in a default osC install, it shows all of the products under "Software." After that, the manufacturers' dropdown is pulled to "Sierra" and it shows just the Sierra products under the "Software" category. Ideally, my setup looks like this.

 

search box | category drop down menu | manufacturer drop down menu

 

I've used the Search Box Anywhere contribution to improve the default search and move it out of an infobox. I've got $catmenu for the drop down and the $manufacturerbox (unboxed like your reply) as the next drop down.

 

So, if a customer wants to quickly browse through categories or manufacturers, the dropdown takes care of that. But if they try to refine their category browsing and limit it by manufacturer, the category resets to all categories. I want it to stay on the selected category to allow further refinement by the manufacturer box.

Sorry for the long question! I hope it has a simple answer!

 

Yeah, I didn't realize until right now that the Show: on the product_info page already filters the results by category or manufacturer. So forget this post! I'll just customize the layout to get it looking the way I want.

Share this post


Link to post
Share on other sites
I have to say, the sts_user_code.php facility is quite fantastic! All those little PHP functions that I've written, I can just add them in there and call them anytime I like. During my first effort, I just copied my code, wrapped it in the hermetically sealed and approved STS format, gave it a name and wham - success! As I was doing it, I thought, "No way is this going to work on the first shot" but it did. Absolutely top notch. :thumbsup:

Pat, I would be interested (and so would the rest of the STS community) in seeing what kind of "little PHP functions" that you have created STS tags for. We have created a site called the STSv4 Power Pack that is a collection of custom addons for STS. Would you like to share? :thumbsup:

The link is in my signature below (STSv4 Power Pack).

Thanks!


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
Am I the only one who's OsCID gets blown away by the $catmenu? I'm trying it on just a stock install and each time I select something from the $catmenu drop down, the OsCID gets lost. The $manufacturerbox dropdown works fine. Just wondering if there's a problem on my side or if it's a universal thing. Thanks in advance...

Hi Pat, STS does not have any issues with the session ID and the $catmenu. I would have to say it is somenthing on your end. I just tested it out on several STS shops and all was well.


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

 

I just did a clean install of OSC 2.2RC2, FEC 3.2 v5, and STS4.5.8 in that order. Everything seems to be working fine except the prettier parts of the check out pages of FEC.

 

I did find a similar post from 2 years ago, but with no resolution:

http://forums.oscommerce.com/index.php?s=&...st&p=906390

 

The problem I'm having is that FEC calls a toggle_collapse javascript function. However the "collapse" aspect doesn't work. The form that's supposed to be collapsed is already expanded. Is STS stripping javascripts from the page?

 

Thanks!

STS pulls in the JavaScript from the default osCommerce procedure. If it is something custom, then you would need to inform STS about it.

 

Regarding your FEC, did you know that you could tell STS to ignore certain pages or scripts to not template them? See this post:

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

 

Hope that 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 (and others).

 

Hey, I have everything going now but I have just added in the secure server and it is coming up with the "some items are not secure" message (that windows spits out) - which is all the images. Even does this for the view cart page (none of my other OSC sites go secure for view cart). Anyhow, that is not a problem, so long as I can get rid of the non secure items. Is this STS? I am assuming it is cause this is the first time I have used STS (as if you had not figured that already!). I am using a shared SSL. Any advice?

 

Thanks again

Denise

Share this post


Link to post
Share on other sites
Hi Bill (and others).

 

Hey, I have everything going now but I have just added in the secure server and it is coming up with the "some items are not secure" message (that windows spits out) - which is all the images. Even does this for the view cart page (none of my other OSC sites go secure for view cart). Anyhow, that is not a problem, so long as I can get rid of the non secure items. Is this STS? I am assuming it is cause this is the first time I have used STS (as if you had not figured that already!). I am using a shared SSL. Any advice?

 

Thanks again

Denise

 

I am having the same problem as you Denz.

All my image paths are "images/image.gif" they are not "www.mysite.com/catalog/images/image.gif" - I believe this is the most common cause of this.

Does this also apply to links?

Share this post


Link to post
Share on other sites

Hi guys,

 

I'm finally getting back to working on the re-build of our site to get rid of some of the errors we've had, and I've got a spot I'm stuck on :blush:

 

I am installing the Customer Testimonials 2.0 contrib, which should allow a person to submit a testimonial. All is working except this submission part. When I fill in the form and click submit I get the following error:

 

Fatal error: Call to a member function on a non-object in /home/.keg/tilaru/tcdataweb.com/osCtesting/includes/classes/sts.php on line 185

 

So - lines 184 to 187 are:

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

 

And the form portion of the code on the catalog/customer_testimonials.php page:

<tr><form name="customer_testimonial" method="post" action="<?php echo tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS, 'action=insert', 'NONSSL'); ?>"  >
	<td><table align="center" width="100%" border="0" cellspacing="0" cellpadding="2">
	  <tr>
		<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
	  <tr>
		<td class="main" align="center"><?php echo TEXT_TESTIMONIALS_INTRO; ?></td>
	   </tr>
	  <tr>
		<td class="main" align="center">************************</td>
	   </tr>
	   <tr>
		<td><table align="center" width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
		<td class="main"><?php echo TEXT_TESTIMONIALS_TITLE; ?></td>
		<td class="main"><?php echo tep_draw_input_field('testimonials_title',  $testimonials_title, '', true); ?></td>
	  </tr>
	  <tr>
		<td class="main"><?php echo TEXT_TESTIMONIALS_NAME; ?></td>
		<td class="main"><?php echo tep_draw_input_field('testimonials_name', $testimonials_name, '', true); ?></td>
	  </tr>
	  <tr>
		<td class="main"><?php echo TEXT_TESTIMONIALS_LAST_NAME; ?></td>
		<td class="main"><?php echo tep_draw_input_field('testimonials_last_name', $testimonials_last_name, '', true); ?></td>
	  </tr>
	  <tr>
		<td class="main"><?php echo TEXT_TESTIMONIALS_URL; ?></td>
		<td class="main"><?php echo tep_draw_input_field('testimonials_url', $testimonials_url); ?></td>
	  </tr>
	  <tr>
		<td colspan="2"><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
	  </tr>
	  <tr>
		<td valign="top" class="main"><?php echo TEXT_BANNERS_HTML_TEXT; ?></td>
		<td class="main"><?php echo tep_draw_textarea_field('html_text', 'soft', '130', '5', $html_text); ?></td>
	  </tr></table></td></tr></tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '1', '10'); ?></td>
  </tr>
  <tr>
	<td><table align="center" border="0" width="100%" cellspacing="0" cellpadding="2">
	  <tr>
		<td align="center" class="main"><?php echo tep_image_submit('button_submit.gif', IMAGE_BUTTON_INSERT). '  <a href="' . tep_href_link(FILENAME_CUSTOMER_TESTIMONIALS, '', 'NONSSL') . '"></a> <a href="' . tep_href_link(FILENAME_DEFAULT, '', 'NONSSL') . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a></td>'; ?>
	  </tr>
	</table></td>
  </form></tr>

 

Do you see any reason why this form and the "// Add messages before content" bit of script are not working together?

Is there some other bit of code I should be looking for that isn't in the above form?

 

Oh - it does submit correctly with STS turned off.

 

Sorry - just a bit lost here :(

 

If it helps, on the rebuild I have currently installed and working properly:

Osc 2.2MS2-060817

STS 4.5.8

HTC 2.6.3

Master Products 1.2

SPPC 4.1.5 (and Hide Products for SPPC 2.0.2)

Dynamenu 1.11 (and Products in Dynamenu Too)

Discount Coupon Codes 3.31 (and exclude customer groups for DCC)

All Products 4.4b

Tell Friend About Site Too 2.3

Ultimate SEO URL's 2.2.2

Product Sort 1.6

Embed Links w/SID in Description 1.1

Edited by TracyS

~Tracy
 

Share this post


Link to post
Share on other sites
I am having the same problem as you Denz.

All my image paths are "images/image.gif" they are not "www.mysite.com/catalog/images/image.gif" - I believe this is the most common cause of this.

Does this also apply to links?

Not an STS issue but rather how you are coding your image paths. You must use Relative links in order to prevent the "items not secure" message in the browser.

 

If you place your template images in your template folder, you can use the following as your image source:

<img src="$templatedir/images/logo.gif">

DON'T FORGET TO CHECK YOUR STYLESHEET LINK AS WELL...

 

<link rel="stylesheet" type="text/css" href="$templatedir/stylesheet.css">

 

If the above is not the issue, then search your PHP pages for a hard coded absolute link or your certificate itself is not setup correctly.


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
Oh - it does submit correctly with STS turned off.

 

Sorry - just a bit lost here :(

Tracy, the reason it works without STS is because the author of the Testimonials contribution did not follow osC standards for creating the form. I know this has already been addressed in the forums but do not have that information available to me at the moment (maybe a search will locate it). Have you tried adding the file to the list of files to exclude from STS?

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,

How can I turn off the "New Products" list? it is in $content on my shopping cart. I don't want to have that in there but I can't take it off the website.

 

Thank you

 

SXM

Share this post


Link to post
Share on other sites
Hello,

How can I turn off the "New Products" list? it is in $content on my shopping cart. I don't want to have that in there but I can't take it off the website.

 

Thank you

 

SXM

Jesse, I think the best way to do this is to actually install a box that "replaces" the New Products box.

Featured Products contribution.

 

It allows you to completely turn off the box or have the box but controll what goes in the box.

:thumbsup: I also created a step by step on how to install onto an STS shop (look for my contribution on the Featured Products download site).

 

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


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 All!

When I try to validate my store, the validating services tell me there is no source code to validate... Is this a STS-specific problem or what is it?

(And how in the world can there ever be a store without source code?)

Try to run my page through any of those tools and you'll find they report no source to validate... or am I just beeing "iurhtg"?

//Micke

Share this post


Link to post
Share on other sites

Ok, Thank you, I am going to try that, but I don't understand why I can't just erase something in an archive and thats it. Because even if I change the New product box I will have the message that says:

 

What's New Here?

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

New Products For February

 

And I don't want any of those messages. Sorry for bothering you

 

Thank you :thumbsup:

 

SXM

Share this post


Link to post
Share on other sites

SXM, I just deleted those lines, I think from the index.php? I just deleted the whole <TD> area from memory. Sorry cannot tell you exaclty where cause I removed it :D

 

Sorry not much help, but play around and see if you can remove it.

Share this post


Link to post
Share on other sites

Thank you but I couldn't do it. I am trying but I don't find the part

Share this post


Link to post
Share on other sites
Ok, Thank you, I am going to try that, but I don't understand why I can't just erase something in an archive and thats it. Because even if I change the New product box I will have the message that says:

 

What's New Here?

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

New Products For February

 

And I don't want any of those messages. Sorry for bothering you

 

Thank you :thumbsup:

 

SXM

Jesse,

Regarding the "What's New Here?", take a peek at the suggestion made for this in the STS User Manual. It opts to replace that text as well as "Let's see what we have here" with the name of the category/product dynamically.

 

Regarding the welcome guest string, it is as simple as modifying the catalog/index.php file.

 

Try this:

In catalog/index.php, find:

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

Change it to (comment it out):

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

or like this:

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

Now if you want to place the welcome string in your STS Template where you want the $greeting string (that is called in general.php) just add the following:

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

 

Also: You will need to modify the HTML Table tags above to meet your needs in your template.

NOTE: Since version 4, STS Templates can now include PHP coding that is why I suggested commenting the tag in index.php and relocating it in your template if you wanted to.

 

Hope 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

STS won't allow left column box width change

 

I have been chasing this little problem for sometime now and not able to figure it out. My left column box widths are to wide, if I cange them via application_top the right column will resize okay but the left won't. I can make it larger but not smaller. I've dug through just about every template and php file and can't see where the problem is. Anyone have some ideas or had this problem?

 

Thanks,

Nx

Share this post


Link to post
Share on other sites
STS won't allow left column box width change

 

I have been chasing this little problem for sometime now and not able to figure it out. My left column box widths are to wide, if I cange them via application_top the right column will resize okay but the left won't. I can make it larger but not smaller. I've dug through just about every template and php file and can't see where the problem is. Anyone have some ideas or had this problem?

 

Thanks,

Nx

Never had this problem. Are you looking in the right place?

Look in:

 

/includes/application_top.php around line 79.

 

Find:

 

// customization for the design layout
define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125)

 

And modify to suit your needs.

 

Are you sure you do not have some custom CSS modifying your box widths? Do you have either the left or right columns "commented out" which would cause STS to ignore them?

 

Since you have had this problem for a while and not found the solution, maybe a file comparison to a stock osC shop would be in order. At least it would point out any differences in the right and left columns if any.


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
Never had this problem. Are you looking in the right place?

Look in:

 

/includes/application_top.php around line 79.

 

Find:

 

// customization for the design layout
define('BOX_WIDTH', 125); // how wide the boxes should be in pixels (default: 125)

 

And modify to suit your needs.

 

Are you sure you do not have some custom CSS modifying your box widths? Do you have either the left or right columns "commented out" which would cause STS to ignore them?

 

Since you have had this problem for a while and not found the solution, maybe a file comparison to a stock osC shop would be in order. At least it would point out any differences in the right and left columns if any.

 

Well checked app_top and double checked, still no go, I can enlarge left col but not shrink (right column just fine) But I haven't checked css yet, good idea thanks. Well look into comparison and see what I find. Thanks for the pointers.

NX

Share this post


Link to post
Share on other sites
Well checked app_top and double checked, still no go, I can enlarge left col but not shrink (right column just fine) But I haven't checked css yet, good idea thanks. Well look into comparison and see what I find. Thanks for the pointers.

NX

 

 

Nuts, compared css, left_column, app_top all looks good. I do have another contrib called extrainfopages installed. Removed from left_column but still no change. (sigh) perhaps I should treat it like windows do another virgin install and go from there. See if my other contribs are causing the prob...

Share this post


Link to post
Share on other sites
Nuts, compared css, left_column, app_top all looks good. I do have another contrib called extrainfopages installed. Removed from left_column but still no change. (sigh) perhaps I should treat it like windows do another virgin install and go from there. See if my other contribs are causing the prob...

 

ahahahaha damn ID10T error... heheh catergories are dynamically resized according to length of text in them... so longer text wider column, pushed it off my background... and wouldn't decrease in size because of it.

 

Its just shameful, all that troubleshooting for that.... jeezzz

Nx

Share this post


Link to post
Share on other sites
If you place your template images in your template folder, you can use the following as your image source:

<img src="$templatedir/images/logo.gif">

 

 

Hi Bill,

 

I am still getting the non-secure error. I have trolled through code but found nothing. The error is for places like inlcudes/languages/english/images/buttons/button_continue.gif and images/table_background.gif

 

It is happening on all the cart pages. Are you able to help or do you want code, I could PM you the site if you want to take a look. I know this is not your 'specialty' but you are very knowledgable!

 

Thanks in advance,

Denise

Share this post


Link to post
Share on other sites
Hi Bill,

 

I am still getting the non-secure error. I have trolled through code but found nothing. The error is for places like inlcudes/languages/english/images/buttons/button_continue.gif and images/table_background.gif

 

It is happening on all the cart pages. Are you able to help or do you want code, I could PM you the site if you want to take a look. I know this is not your 'specialty' but you are very knowledgable!

 

Thanks in advance,

Denise

Denise,

I do not think this is a STS issue but if you want to PM me your site that is fine. I am bogged down at the moment with some other osC projects but will give it a quick look.


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

×