Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] STS v4


Guest

Recommended Posts

Hi,

 

I had just installed the STS contribution on a basic oscommerce ms2 version. I've a little problem with the images loaded in the template. They are always loaded on the default images folder of the catalogue, even I create an images folder on my folder template and copy picture with the same name that in the default image folder of the catalogue.

There is an activation or configuration I have to do ?

 

Thanks

 

PS : Is it possible to create for each template ( each template folder ) a specific css ?

The image folder should work by default. Check your installation as well as how you have osCommerce configured.

Yes, you can link to any css file in any directory that you wish.

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 been searching up and down the net trying to fix this problem:

 

i have a clean install of osc and sts4. all the lastest versions.

 

Im trying to create a new template but everytime i put the $content placeholder the contents drop to the bottom of the page and doesnt get put in the table i put the place holder in.

 

<table width="900" border="0" align="center" cellpadding="0" bordercolor="#99CC66" bgcolor="#CC0033">
 <tr>
<td width="138"><p> $breadcrumbs </p>
  <table border="0" width="125" cellspacing="0" cellpadding="2">
	<tr>
	  <td>$catmenu</td>
	</tr>
	<tr>
	  <td>$categorybox</td>
	</tr>
  </table>
  <p> </p>
<td width="756">$content  </tr>
</table>

You can see what im talking about at http://www.winecabinet-vinotemp.com/

i made the table that i want it in as pink but as u can see the content is not in table that i want it to be.

 

ps. this also happends with the default template that comes with sts4.

 

thanks in advance

robbie

 

i figured it out, i guess i was missing files or something i just reinstalled everything.

Link to comment
Share on other sites

I have been trying to make the expiration date "year" list menu a bit wider on our site - but I'm having a tough time figuring out where to do this. I think I've narrowed it down to this bit of code in checkout_payment.php:

<?php
  for ($j=0, $n2=sizeof($selection[$i]['fields']); $j<$n2; $j++) {
?>
				  <tr>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
					<td class="main"><?php echo $selection[$i]['fields'][$j]['title']; ?></td>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
					<td class="main"><?php echo $selection[$i]['fields'][$j]['field']; ?></td>
					<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				  </tr>

 

I'm not sure - but if I change the first line that seems to be doing the math for the sizes of the fields, would that widen the year dropdown list?

 

The other option is in includes/modules/payments/cc.php in this bit of code:

array('title' => MODULE_PAYMENT_CC_TEXT_CREDIT_CARD_EXPIRES,
											 'field' => tep_draw_pull_down_menu('cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('cc_expires_year', $expires_year))));

 

Currently the list only shows the first 3 digits of the year and then the arrow - I'd like it to show all 4 digits. There is room in the table for it to do this, and I have tried adjusting the table size to 100% width as well as the <tr> and <td> sizes - but it makes no difference to the size of the dropdown menu. It seems something else tells the dropdown how wide to be in comparison to the list menu items.

 

anybody have any thoughts on this? :blush:

Edited by TracyS

~Tracy
 

Link to comment
Share on other sites

Hi all :)

 

I'm using STS 4.5.2 with Worldpay 4 1.9 and have run into the callback template problem.

 

I've read many posts, the most recent of which was someone on page 70-something here asking if it had been resolved. I've seen code from 2002 - does this work with STS 4.5.2, or is there a newer known fix to disable STS for the callback?

 

Thanks in advance and for the great contribs :)

 

Adam

Link to comment
Share on other sites

Hi all :)

 

I'm using STS 4.5.2 with Worldpay 4 1.9 and have run into the callback template problem.

 

I've read many posts, the most recent of which was someone on page 70-something here asking if it had been resolved. I've seen code from 2002 - does this work with STS 4.5.2, or is there a newer known fix to disable STS for the callback?

 

Thanks in advance and for the great contribs :)

 

Adam

Adam, upgrade to STSv4.5.8 and that should take care of your issue.

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

Thanks for the insanely fast response :)

 

The store is live, and I'm using an additional menu mod "Show Sub-Categories", is there anything I should watch for?

 

Adam

Save your templates, sts_user_code.php and any other custom STS files that you may have added since you last installed STSv4.5.2.

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 have a problem, whats should i write in the /includes/modules/sts/sts_index.php

if i want to change template for each category i know i need to make some templates and name them by the category but what should i write in the sts_index.php file? i need to list the pages but how?

 

( List the files to include when displaying “index.php”, separated by semicolons. Those files must be located in “catalog/includes/modules/sts_inc” folder and generally contains code to build extra placeholders. )

 

2. Check for category specific templates, based on the category ID. (Example below with category 33, located in category 22, located in category 11)

 

2.1 Use index.php_11_22_33.html if exists.

 

 

hope someone have a tip for me beacuse i dont get it where or what i should write

 

/Tony

Link to comment
Share on other sites

...and one more thing, I'm using MS2.2, not RC1. I've just looked at the packages and it seems 4.5.3 was RC1 only, but 4.5.4 and higher will work on my MS2.2 as well as RC1?

 

Thanks again for all your help :)

 

Correct...STSv4.5.8 has instructions (and files) for 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

Hi!

i have a problem, whats should i write in the /includes/modules/sts/sts_index.php

if i want to change template for each category i know i need to make some templates and name them by the category but what should i write in the sts_index.php file? i need to list the pages but how?

 

( List the files to include when displaying “index.php”, separated by semicolons. Those files must be located in “catalog/includes/modules/sts_inc” folder and generally contains code to build extra placeholders. )

 

2. Check for category specific templates, based on the category ID. (Example below with category 33, located in category 22, located in category 11)

 

2.1 Use index.php_11_22_33.html if exists.

 

 

hope someone have a tip for me beacuse i dont get it where or what i should write

 

/Tony

 

Tony, your logic is incorrect here.

You do not need to include any "template pages" in that field. STS will automatically find the template pages for each category as long as you have named them correctly.

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

Tony, your logic is incorrect here.

You do not need to include any "template pages" in that field. STS will automatically find the template pages for each category as long as you have named them correctly.

Hi!

and how do i named them correctly in the file?

 

example i have a template for the category 27

i named that page to index.php_27.html

 

is that correctly?

 

and how would STS find that i mean that this page would be used if they click on category 27

 

Dont i need to write in the /includes/modules/sts/sts_index.php that this page exists?

 

Regards Tony

Link to comment
Share on other sites

Have you tried making the changes directly in the database?

 

I've been searching in the database and I don't see where I would make that change. It seems to do with the difference in size between Firefox browsers and IE browsers. In IE you can see all 4 numbers in the year to the left of the dropdown arrow, but in Firefox you can only see 3 numbers before the arrow. Once you click on the arrow you can see all 4, but thought it would be nice for those who like to tab and use the up/down arrows to select from a list box, if they could see all 4 in Firefox too. Otherwise you have to click the arrow with your mouse in order to see the 4th digit in the year. :blush:

~Tracy
 

Link to comment
Share on other sites

I'm also trying to add an image from our SLL provider that will showup in the footer when the customer is logged in. I know what code to use (got it working so it only shows when logged in if I put it on a template) - but I can't seem to find where to place the code so it shows up where I want it in the footer. The new STS doesn't use the sts_footer file anymore :huh:

 

I tried in includes/languages/english.php - but of course it didn't like having php script in there.

I then tried in the includes/footer.php - didn't work

I then tried the includes/modules/sts_inc/general.php - still no dice :(

 

Am I adding it incorrectly - or am I adding it to the wrong place to have it included in the footer? Here is what I have in the general.php file listed above:

$sts->template['footer_text']= FOOTER_TEXT_BODY;
?>
 <p align="right"><?php 
 if (tep_session_is_registered('customer_id')) {
 ?>
 <!-- GeoTrust QuickSSL [tm] Smart Icon tag. Do not edit. -->
<script LANGUAGE="JavaScript" TYPE="text/javascript" SRC="//smarticon.geotrust.com/si.js"></SCRIPT>
<!-- end GeoTrust Smart Icon tag -->
<?php
}
?>
 </p>
 <p align="right">Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a></p>
<?php

 

I was hoping to be able to just add it to one file for the footer rather than having to add it to every single template file as I have about 87 of those :blush:

~Tracy
 

Link to comment
Share on other sites

I'm also trying to add an image from our SLL provider that will showup in the footer when the customer is logged in. I know what code to use (got it working so it only shows when logged in if I put it on a template) - but I can't seem to find where to place the code so it shows up where I want it in the footer. The new STS doesn't use the sts_footer file anymore :huh:

 

I tried in includes/languages/english.php - but of course it didn't like having php script in there.

I then tried in the includes/footer.php - didn't work

I then tried the includes/modules/sts_inc/general.php - still no dice :(

 

Am I adding it incorrectly - or am I adding it to the wrong place to have it included in the footer? Here is what I have in the general.php file listed above:

$sts->template['footer_text']= FOOTER_TEXT_BODY;
?>
 <p align="right"><?php 
 if (tep_session_is_registered('customer_id')) {
 ?>
 <!-- GeoTrust QuickSSL [tm] Smart Icon tag. Do not edit. -->
<script LANGUAGE="JavaScript" TYPE="text/javascript" SRC="//smarticon.geotrust.com/si.js"></SCRIPT>
<!-- end GeoTrust Smart Icon tag -->
<?php
}
?>
 </p>
 <p align="right">Powered by <a href="http://www.oscommerce.com" target="_blank">osCommerce</a></p>
<?php

 

I was hoping to be able to just add it to one file for the footer rather than having to add it to every single template file as I have about 87 of those :blush:

Tracy,

:thumbsup: Look in the STSv4 Power Pack site as I have written a step by step on how to use PHP Includes with STS.

 

Using PHP Includes, you can create a template for the footer.php file and then include that in your STS templates. I use a header and a footer includes just for the reason that you stated (did not want to have to edit all my templates just to add or remove something from the header or footer).

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

 

example i have a template for the category 27

i named that page to index.php_27.html

 

is that correctly?

Yes, this is correct.

 

and how would STS find that i mean that this page would be used if they click on category 27

 

STS finds them automatically if you have the STS Index Module enable and set to use Index Templates.

Dont i need to write in the /includes/modules/sts/sts_index.php that this page exists?
NO!!!!! This field is for adding PHP files that my contain custom code such as extra STS tags that you have created.

 

:thumbsup: TIP: Change all of your STS Modules to their default settings except for selecting TRUE to use each module. The default settings is the best setting in most cases.

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

Yes, this is correct.

STS finds them automatically if you have the STS Index Module enable and set to use Index Templates.

NO!!!!! This field is for adding PHP files that my contain custom code such as extra STS tags that you have created.

 

:thumbsup: TIP: Change all of your STS Modules to their default settings except for selecting TRUE to use each module. The default settings is the best setting in most cases.

Thank you!

I finally got it in my head :blush:

Now its working :thumbsup:

Link to comment
Share on other sites

Hello everyone! (and especially Bill :D ),

 

What's the best way to go to use HTC & STS? I've got a fresh install of RC1 and I'm tempted to use the STS Power Pack I saw, but I'd like to use the latest and greatest 4.5.8 STS (longtime fan from the very first version). I tried HTC 2.63 first and then STS 4.5.3? on top of it and it kinda blew up in my face. :-"

 

So I'm asking for some advice instead of trying to hammer another (incompatible?) pair together.

Link to comment
Share on other sites

Hello everyone! (and especially Bill :D ),

 

What's the best way to go to use HTC & STS? I've got a fresh install of RC1 and I'm tempted to use the STS Power Pack I saw, but I'd like to use the latest and greatest 4.5.8 STS (longtime fan from the very first version). I tried HTC 2.63 first and then STS 4.5.3? on top of it and it kinda blew up in my face. whistling.gif

 

So I'm asking for some advice instead of trying to hammer another (incompatible?) pair together.

Hello Mason,

 

I would strongly suggest using my step by step to get HTC and STS installed (link in my signature below).

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

Hello Mason,

 

I would strongly suggest using my step by step to get HTC and STS installed (link in my signature below).

 

Bill,

 

I had your guide printed out before I posted, but I wanted to ask first. So I'll go HTC 2.6.3 with STS 4.5.8 using those steps. In my opinion, STS is the greatest contrib ever developed. I couldn't imagine trying to design (and optimize) osC without it. Thanks a million to Brian, Rigadin, and you!

Link to comment
Share on other sites

I use the contrib "Switch between Displaying Prices Inc./Ex. VAT http://www.oscommerce.com/community/contri...ch,switch"

 

I get duplicate content from the shoppingcart when using it in a STS enabled shop. Using it in a non-sts shop doesn´t pose any problems.

 

Here´s how it looks:

dubbel-varukorg.jpg

 

the second "i din varukorg" ("in your shopping cart") shouldn't be there. But it works fine if I dont use STS?

 

Here is the code from sopping_cart.php:

 

<?php
/*
$Id: shopping_cart.php,v 1.18 2003/02/10 22:31:06 hpdl Exp $

osCommerce, Open Source E-Commerce Solutions
http://www.oscommerce.com

Copyright (c) 2003 osCommerce

Released under the GNU General Public License
*/
?>
<!-- shopping_cart //-->
	 <tr>
	   <td>
<?php
$info_box_contents = array();
$info_box_contents[] = array('text' => BOX_HEADING_SHOPPING_CART);

new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_SHOPPING_CART));

$cart_contents_string = '';
if ($cart->count_contents() > 0) {
  $cart_contents_string = '<table border="0" width="100%" cellspacing="0" cellpadding="0">';
  $products = $cart->get_products();
  for ($i=0, $n=sizeof($products); $i<$n; $i++) {
 $cart_contents_string .= '<tr><td align="right" valign="top" class="infoBoxContents">';

 if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
   $cart_contents_string .= '<span class="newItemInCart">';
 } else {
   $cart_contents_string .= '<span class="infoBoxContents">';
 }

 $cart_contents_string .= $products[$i]['quantity'] . ' x </span></td><td valign="top" class="infoBoxContents"><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $products[$i]['id']) . '">';

 if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
   $cart_contents_string .= '<span class="newItemInCart">';
 } else {
   $cart_contents_string .= '<span class="infoBoxContents">';
 }

 $cart_contents_string .= $products[$i]['name'] . '</span></a></td></tr>';

 if ((tep_session_is_registered('new_products_id_in_cart')) && ($new_products_id_in_cart == $products[$i]['id'])) {
   tep_session_unregister('new_products_id_in_cart');
 }
  }
  $cart_contents_string .= '</table>';
} else {
  $cart_contents_string .= BOX_SHOPPING_CART_EMPTY;
}

$info_box_contents = array();
$info_box_contents[] = array('text' => $cart_contents_string);

if ($cart->count_contents() > 0) {
  $info_box_contents[] = array('text' => tep_draw_separator());
  $info_box_contents[] = array('align' => 'right',
							'text' => $currencies->format($cart->show_total()));
}

new infoBox($info_box_contents);
 // ==== START CONTRIBUTION  "Switch between displaying prices Inc./Ex. VAT"
 $info_box_contents = array();
if ($vat_disp == '1') {
$info_box_contents[] = array('align' => 'left', 'text' => SWITCHING_VAT_DISPLAYED . '<br><b>' . SWITCHING_VAT_INC . '</b><br>frakt 35 kr tillkommer' );
} else {
$info_box_contents[] = array('align' => 'left', 'text' => SWITCHING_VAT_DISPLAYED . '<br><b>' . SWITCHING_VAT_EX . '</b><br>frakt tillkommer');
}

if ($vat_disp == '1') {
$info_box_contents[] = array('align' => 'left', 'text' =>  '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency', 'vat_disp')) . 'vat_disp=0') . '">' . tep_image_button('button_inc_ex_vat.gif', SWITCHING_VAT_CHANGE_TO_EX) . '</a>');
} else {
$info_box_contents[] = array('align' => 'left', 'text' =>  '<a href="' . tep_href_link(basename($PHP_SELF), tep_get_all_get_params(array('language', 'currency', 'vat_disp')) . 'vat_disp=1') . '">' . tep_image_button('button_inc_ex_vat.gif', SWITCHING_VAT_CHANGE_TO_INC) . '</a>');
}

 new infoBox($info_box_contents);
// ==== FINISH CONTRIBUTION  "Switch between displaying prices Inc./Ex. VAT"

?>
	   </td>
	 </tr>
<!-- shopping_cart_eof //-->

 

 

When I remove the stuff in the "// ==== START CONTRIBUTION "Switch between displaying prices Inc./Ex. VAT"" it works. But then the contrib doesnt show...

 

Any help is appreciated!

 

/Mattias

Link to comment
Share on other sites

Enahncement idea:

 

It hink it would be good if admins could choose an installed template from drop down list (with all saved parameters for the selected template).

 

Perhaps in next version ?

OSC Webmakers Edition modiefied with many other contribs and enhancements.

+ STS 4.5.7 for 2.2MS2 and RC1

Link to comment
Share on other sites

Lotti,

I would suggest you install the IE Developers Toolbar. It has several options to assist you in finding things such as what is causing the "white space" on your web page. It will let you know if it is CSS related (most likely), if a transparent image is the culprit (good possibility) or if a table/cell is the issue.

 

The toolbar will also inform you of any CSS in your stylesheet that could be effecting your text.

 

Here is the link.

http://www.microsoft.com/downloads/details...;displaylang=en

 

Good luck,

 

Many thanks

Link to comment
Share on other sites

Thanks for the instructions Bill! :thumbsup:

 

I do have one question left - do I replace the $footer_text with the <?php include("footer.php.html"); ?> or do I need to have both in my template? :blush:

 

 

Tracy,

:thumbsup: Look in the STSv4 Power Pack site as I have written a step by step on how to use PHP Includes with STS.

 

Using PHP Includes, you can create a template for the footer.php file and then include that in your STS templates. I use a header and a footer includes just for the reason that you stated (did not want to have to edit all my templates just to add or remove something from the header or footer).

~Tracy
 

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