Jump to content
DiamondSea

[contribution] Simple Template System (sts)

Recommended Posts

I have STS active and like it. But I just discovered a problem with the "terms and conditions agreement" contribution I had installed. The check off box function that says the customer has read and understands the terms and conditions works, but the href right below this to the conditions.php doesn't, I don't know why. When mousing over the link to terms and conditions (.php) it shows a java script:void(0) error. I appreciate any suggestions. Thanks in advance.

 

Here's the english checkout_confirmation.php added definition for this contribution

      define('CONDITION_AGREEMENT', 'I read the <a href="conditions.php" target="_blank">conditions of use</a> and I agree to them');
     define('CONDITION_AGREEMENT_WARNING', 'Pleaser read our conditions of use and agree to them. If you do not so, we can not deliver to you.');

 

here's the last portion of the checkout_confirmation.php with this contributions edits:

         <tr>
           <td align="right" class="main"><br>

<!--Start AGB Agreement form -->

<?php echo CONDITION_AGREEMENT; ?> <input type="checkbox" value="0" name="agree">

<!--Ende AGB Agreement form -->


<?php
 echo tep_draw_hidden_field('prod', $HTTP_POST_VARS['prod']) .
      $payment_modules->process_button();

 if (!$checkout_form_submit) {
   echo tep_image_submit('button_confirm_order.gif', IMAGE_BUTTON_CONFIRM_ORDER);
 } else {
   echo $checkout_form_submit;
 }
?></td>
         </tr></form>
       </table></td>
     </tr>
     <tr>
       <td align="right" class="checkoutBar"><br>[ <?php echo CHECKOUT_BAR_DELIVERY_ADDRESS; ?> | <?php echo CHECKOUT_BAR_PAYMENT_METHOD; ?> | <span class="checkoutBarHighlighted"><?php echo CHECKOUT_BAR_CONFIRMATION; ?></span> | <?php echo CHECKOUT_BAR_FINISHED; ?> ]</td>
     </tr>
   </table></td>
<!-- body_text_eof //-->
   <td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </table></td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //-->
<br>
</body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites

ive searched around but found no answer... i need to be able to add my own php code into the template its self.

 

in the template i need to be able to write recordset queries and some other PHP code but it wont parse as its .html for the template, ive tried .php and still it wont parse, just errors. All the code needs to go above the <html> any tips?

Share this post


Link to post
Share on other sites

Hi all,

 

I'm new to osCommerce, and new to STS.

Few days ago I've downloaded the latest version of osCommerce. Today I succesfully installed osCommerce on the webserver, but I'm failing to install STS. As I have a fresh installation of osCommerce, I just copied (and replaced) all files from STS v4.5.8 (folder "Files for RC2") to the catalog folder, just as the manual says.

 

In the menu below "Modules" I now see the STS Module. However, when I click it I do not see anything that I could install. It just says "Module Directory: /............../includes/modules/sts/"

And there is an Install button.

 

I did some reading on this and I figured out that more people had the same problem; so called "refresh bug"

 

However, when I checked the 2 compatibility.php files the "reset($ar)" code is allready there:

 

  function do_magic_quotes_gpc(&$ar) {
if (!is_array($ar)) return false;

reset($ar);
while (list($key, $value) = each($ar)) {
  if (is_array($ar[$key])) {
	do_magic_quotes_gpc($ar[$key]);
  } else {
	$ar[$key] = addslashes($value);
  }
}
reset($ar);
 }

 

Is there anything else that I can try? Did I have to chmod something or whatever?

 

I hope someone can help me out here. I'm a php noob aswell :)

 

Regards, Marcel

Share this post


Link to post
Share on other sites
ive searched around but found no answer... i need to be able to add my own php code into the template its self.

 

in the template i need to be able to write recordset queries and some other PHP code but it wont parse as its .html for the template, ive tried .php and still it wont parse, just errors. All the code needs to go above the <html> any tips?

Sean,

 

As Burt stated above, you can add PHP code directly into the template with no issues. The issue must be within the code itself. I add PHP code all the time, especially if/else statements to call specific Flash files for specific categories. Works great!


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,

 

I'm new to osCommerce, and new to STS.

Few days ago I've downloaded the latest version of osCommerce. Today I succesfully installed osCommerce on the webserver, but I'm failing to install STS. As I have a fresh installation of osCommerce, I just copied (and replaced) all files from STS v4.5.8 (folder "Files for RC2") to the catalog folder, just as the manual says.

 

In the menu below "Modules" I now see the STS Module. However, when I click it I do not see anything that I could install. It just says "Module Directory: /............../includes/modules/sts/"

And there is an Install button.

 

I did some reading on this and I figured out that more people had the same problem; so called "refresh bug"

 

However, when I checked the 2 compatibility.php files the "reset($ar)" code is allready there:

 

  function do_magic_quotes_gpc(&$ar) {
if (!is_array($ar)) return false;

reset($ar);
while (list($key, $value) = each($ar)) {
  if (is_array($ar[$key])) {
	do_magic_quotes_gpc($ar[$key]);
  } else {
	$ar[$key] = addslashes($value);
  }
}
reset($ar);
 }

 

Is there anything else that I can try? Did I have to chmod something or whatever?

 

I hope someone can help me out here. I'm a php noob aswell :)

 

Regards, Marcel

 

Marcel,

 

The "refresh bug" was related to an older version of osCommerce (060817) and not directly to STS. Since you are using osCommerce RC2a, the fix is already included.

 

Your issue is directly related to missing some of the STS files that are "exclusive" to STS. Again, as Burt mentioned above, you need to install both the files for RC2 and the STS files. It is split up this way so that users who have a highly modified shop can easily upload the STS files and then merge in the stock RC2 files. Very common with most contributions.


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

Nested forms with STS & Wishlist

 

Hi all

 

I'm using the latest STS and I have a product_info.php.html file in template folder. I've been adding a loadof contributions and one of those is Wishlist.

 

This adds an 'add to wishlist' button into product_info.php but this button simply acts as an 'add to cart' button due, I believe to nested forms.

 

I've looked at 'unnesting' them by adding extra <form> </form> tags in product_info.php but this breaks the page as STS stops adding to $content when it hits the first </form>

 

I've seen a number of posts going back 2-3 years on this but no remedy.

 

Any suggestions?

 

Graeme

Share this post


Link to post
Share on other sites

Hi

 

I was wondering if it is possible to have sts for the admin side is well?

so I can customise the admin look easily?

 

Thanks

 

MME

Share this post


Link to post
Share on other sites
Sean,

 

As Burt stated above, you can add PHP code directly into the template with no issues. The issue must be within the code itself. I add PHP code all the time, especially if/else statements to call specific Flash files for specific categories. Works great!

 

Bill,

Would you be able to tell me how to make a $dm_catagory file so I can get the fly out menu to work with STS4.5.8.

It will work when STS=false in admin but I have missed something somewhere?

What was it?

Auzy Jack.

Share this post


Link to post
Share on other sites
Hi

 

I was wondering if it is possible to have sts for the admin side is well?

so I can customise the admin look easily?

 

Thanks

 

MME

No, it currently does not. There are a few ADMIN mods available that you could possibly learn from to get the look that you are after.

 

There is another one that came out recently but I can't remember the name of it.

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

Share this post


Link to post
Share on other sites
Bill,

Would you be able to tell me how to make a $dm_catagory file so I can get the fly out menu to work with STS4.5.8.

It will work when STS=false in admin but I have missed something somewhere?

What was it?

Auzy Jack.

 

Jack,

 

Did you take a look at the STS Power Pack site for the Dynamenu/STS installation instructions that I have available?


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

 

Did you take a look at the STS Power Pack site for the Dynamenu/STS installation instructions that I have available?

 

Bill,

Yes about 6 times but I am a slow learner so I re read often.

I eventually added this line in includes/modules/sts_inc/sts_user_code.php

$sts->start_capture();

require(DIR_WS_BOXES . 'dm_categories.php');

$sts->stop_capture('dmcategories', 'box');

Then added $dmcatagories to includes/sts_templates/full/index.php.html

I eventually got it there but it does not pick up the footer.php file output to make the menu pop out work.

Share this post


Link to post
Share on other sites

Hi all,

 

I'm wondering if someone could please post some easy to follow instructions on how to add google analytics to my site.

 

I am using the latest versions of STS and HTC (all working fine) - so where should the google analytics code go (in the header / footer? just on the STS template page or across the site?)... and which analytics contribution to use (there are at least 3!)

 

I would be really grateful for a 1 2 3 on how to do this after spending days looking through the forum, there doesn't seem to be any straight-forward answers!

 

TIA

 

SSNB

Edited by ssnb

Share this post


Link to post
Share on other sites
Bill,

Yes about 6 times but I am a slow learner so I re read often.

I eventually added this line in includes/modules/sts_inc/sts_user_code.php

$sts->start_capture();

require(DIR_WS_BOXES . 'dm_categories.php');

$sts->stop_capture('dmcategories', 'box');

Then added $dmcatagories to includes/sts_templates/full/index.php.html

I eventually got it there but it does not pick up the footer.php file output to make the menu pop out work.

 

Try adding this just before the last closing tag (?) in application_bottom.php:

 

	// Output the footer for Dynamenu for osCommerce
echo $GLOBALS['dmfooter'];


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

 

I recently installed STS with a clean version of OsC. I used the instructions provided with the Sts Power pack. After I copied over the files that were in the .zip I accessed the database file that I was told to and everything seemed fine. I then proceded to access /catalog/admin, but I get a 404 error. Is there anyone who can lead me in the right direction to correct this error.

 

Thanks.

Share this post


Link to post
Share on other sites
Hello all,

 

I recently installed STS with a clean version of OsC. I used the instructions provided with the Sts Power pack. After I copied over the files that were in the .zip I accessed the database file that I was told to and everything seemed fine. I then proceded to access /catalog/admin, but I get a 404 error. Is there anyone who can lead me in the right direction to correct this error.

 

Thanks.

What instructions did you follow that were in the STSv4 Power Pack site? That site is for STS addons to be used AFTER you have STS installed.

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
Try adding this just before the last closing tag (?) in application_bottom.php:

 

	// Output the footer for Dynamenu for osCommerce
echo $GLOBALS['dmfooter'];

 

Yes this script is already installed and working.

But the fly outs stop functioning with sts turned on.

Share this post


Link to post
Share on other sites

Hello

 

I have STS 4.5.8 & Fancier Packing Slip Installed.

 

They both work well together.

 

Except on print_my_invoice.php where the default STS template is coming and not the order to print.

 

Can you please help me to make it work as it's a big problem for me.

 

Any help welcome

 

Best regards

 

Florent

Share this post


Link to post
Share on other sites

Hello

 

I have STS 4.5.8 & Fancier Packing Slip Installed.

 

They both work well together.

 

Except on print_my_invoice.php where the default STS template is coming and not the order to print.

 

Can you please help me to make it work as it's a big problem for me.

 

Any help welcome

 

Best regards

 

Florent

Share this post


Link to post
Share on other sites

I'm trying add the google checkout code into sts. And i'm getting this error

 

[function.require-once]: failed to open stream: No such file or directory in /home2/user/public_html/future/shop/catalog/googlecheckout/gcheckout.php on line 35

 

In googlecheckout/gcheckout.php

 

require_once('includes/languages/'. $language .'/modules/payment/googlecheckout.php');

 

When I'm using sts this file isn't getting $language. I'm not sure why this happend but I can temporary remove $language.

Share this post


Link to post
Share on other sites

Hi there,

 

I am having a difficulty installing STS, I have copied in all the files yet it is not showing in my admin panel. Any help would be much apriciated.

 

Simon

Share this post


Link to post
Share on other sites

Hi there,

 

I am having a difficulty installing STS, I have copied in all the STS files yet it is not showing in my admin panel.

 

I think the problem could be to do with copying in the MS2 files.

 

"The following osCommerce files are modified by STS. If you have a fresh install of osCommerce 2.2MS2, you can take the files from the "Files for MS2" folder and copy them over your installation"

 

I am unsure of where to copy these files to?

 

Any help would be much appreciated.

 

Simon

Share this post


Link to post
Share on other sites
Hi there,

 

I am having a difficulty installing STS, I have copied in all the STS files yet it is not showing in my admin panel.

 

I think the problem could be to do with copying in the MS2 files.

 

"The following osCommerce files are modified by STS. If you have a fresh install of osCommerce 2.2MS2, you can take the files from the "Files for MS2" folder and copy them over your installation"

 

I am unsure of where to copy these files to?

 

Any help would be much appreciated.

 

Simon

 

Simon,

 

You have to upload both STS files as well as stock osC files that are modified (Files for MS2). If you have osCommerce version MS2, then you need to upload these files over your existing files of the same name, keeping the folder structure in tact. If you have osCommerce version RC2, then use those files instead.


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

×