Jump to content
rigadin2

[Contribution] STS v4

Recommended Posts

Hey Bill,

 

Long time no chat- LOL Got a question for ya- have you ever considered setting up a WYSIWYG editor on the admin side for those non-programmers/coders to be able to edit the look/feel of the STS Templates? Does this exist and I just don't know it? I have a marketing dept. that would love to be able to make adjustments to the products and to the templates via a WYSIWYG in the admin section. I can find contributions for setting up the products this way - but I haven't seen one yet for the templates. Since we run STS for our templates (and I LOVE it!!) I thought I'd see if you have anything already setup or have any ideas on this one ;-) Thanks!


~Tracy
 

Share this post


Link to post
Share on other sites

I am using sts templating for my site that I converted over from interspire to Oscommerce because it has SO MANY more modules and abilities:)

 

Anyways, I have searched this forum and cannot find a suitable answer, so please excuse this post if its a duplicate or if the answer is in plain site!!

 

With that said I am trying to include a header.php file for use in my templates, so that I can change the header once and be done. I have tried to include a header.php file into my index.php.html, but it does not work.

 

Anyone have any suggestions?

 

Thanks in advance!!

 

I'm using a very old version of STS so I'm not sure if the setup is still the same, but...

In sts_templates/mysite/templatename.html

add beneath <body>

<? include"/home/path/path/catalog/includes/sts_templates/mysite/header.html"; ?>

Share this post


Link to post
Share on other sites

I'm using a very old version of STS so I'm not sure if the setup is still the same, but...

In sts_templates/mysite/templatename.html

add beneath <body>

<? include"/home/path/path/catalog/includes/sts_templates/mysite/header.html"; ?>

 

 

The solution is listed in the STS User Manual as well as examples in the STS Power Pack download site (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

Share this post


Link to post
Share on other sites

Please anyone, after reading post after post, user manual, google you name it.. I'm lost

 

How exactly is a box added to the columns?

I know you need to define it but yes

 

Asking is free right?

 

So in my old column left I had

  // Custom Product Builder
 if (substr(basename($PHP_SELF), 0, 12) != 'builder_main') {
   include(DIR_WS_BOXES . 'builder.php');
 }

 

My new sts_column_left.php I've made

  // Custom Product Builder
   require(DIR_WS_BOXES . 'builder.php');
$sts->restart_capture ('builderbox', 'box'); // Get Builder box

 

and then sts_template.html I insert $buiderbox$

 

On viewing my page there shows on the left $buiderbox$ between all the working other boxes.

Now this got me baffled, I need to do another 4 more boxes and is stump with the first one

 

Please could someone tell me in detail how this is done


Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites

Please anyone, after reading post after post, user manual, google you name it.. I'm lost

 

How exactly is a box added to the columns?

I know you need to define it but yes

 

Asking is free right?

 

So in my old column left I had

  // Custom Product Builder
 if (substr(basename($PHP_SELF), 0, 12) != 'builder_main') {
   include(DIR_WS_BOXES . 'builder.php');
 }

 

My new sts_column_left.php I've made

  // Custom Product Builder
   require(DIR_WS_BOXES . 'builder.php');
$sts->restart_capture ('builderbox', 'box'); // Get Builder box

 

and then sts_template.html I insert $buiderbox$

 

On viewing my page there shows on the left $buiderbox$ between all the working other boxes.

Now this got me baffled, I need to do another 4 more boxes and is stump with the first one

 

Please could someone tell me in detail how this is done

 

/* The following code is a sample of how to add new boxes easily.
 Use as many blocks as you need and just change the block names.
  $sts->start_capture();
  require(DIR_WS_BOXES . 'new_thing_box.php');
  $sts->stop_capture('newthingbox', 'box');  // 'box' makes the system remove some html code before and after the box. Otherwise big mess!

Note: If $sts->stop_capture('newthingbox', 'box') is followed by $sts->start_capture, you can replace both by $sts->restart_capture('newthingbox', 'box')

 

Also, make sure if you are using stop end characters as you stated above, $builderbox$, that all of your tags are using them as well. Otherwise, simply use $builderbox instead.

 

Also, See this post:

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

Share this post


Link to post
Share on other sites

Hi

 

I need to add some javascript code into the template but the code varies depending upon the data - the code sets a season dependent theme. I notice in the template that the $naming convention is used which seems to be related to defined constants in PHP. I wondered if I could use something similar to place a block of code.

 

I have my catalog set as one level down from root with my home page and a few other pages at root level. For these pages they 'include' a Themes function which determines the javascript to return along with a couple of other variables - like what folder to take the store's logo from, along with texts like, 'Merry Christmas' or 'Mothers Day'. I then set these into the page and never have to bother redressing my site for Christmas or Mother's Day and so on.

 

However, I have to do it manually for OSC and STS at the moment. So how could I define say $themeJava, $themeDir and $themeText to bring back the required blocks of javascript of text?

Share this post


Link to post
Share on other sites

Thanks Bill

 

I tried varies scenarios to add the code, still unable to get this right

 

I've added the following:

sts_column_left.php

// Custom Product Builder

require(DIR_WS_BOXES . 'builder.php');

$sts->restart_capture ('builderbox', 'box'); // Get Builder box

 

sts_user_code.php - restart tried as well

$sts->start_capture();

require(DIR_WS_BOXES . 'builder.php');

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

 

and to sts_template.html $builderbox$

 

With the above edits I get error - Cannot redeclare _disable_builds() (previously declared in C:\xampp\htdocs\shop\includes\functions\builder.php:15)

 

or page display correct except is just showing me below manufacturers box - $builderbox$

 

The builder is from custom pc creator addon


Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites

Thanks Bill

 

I tried varies scenarios to add the code, still unable to get this right

 

I've added the following:

sts_column_left.php

// Custom Product Builder

require(DIR_WS_BOXES . 'builder.php');

$sts->restart_capture ('builderbox', 'box'); // Get Builder box

 

sts_user_code.php - restart tried as well

$sts->start_capture();

require(DIR_WS_BOXES . 'builder.php');

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

 

and to sts_template.html $builderbox$

 

With the above edits I get error - Cannot redeclare _disable_builds() (previously declared in C:\xampp\htdocs\shop\includes\functions\builder.php:15)

 

or page display correct except is just showing me below manufacturers box - $builderbox$

 

The builder is from custom pc creator addon

 

Skip all that code, please try this: (add before the final ?>)

  require(DIR_WS_BOXES . 'builder.php');
 $sts->restart_capture ('builderbox', 'box'); // Get builder box

Then where ever you would like the contents of the box to be displayed use

$builderbox


Eric

 

Keep up on osCommerce changes and updates at

Github | Understand osCommerce a little further at OsCommerce Documentation | Copy and paste your error message in Google add "in osCommerce" at the end to get relevant answers to most issues.

Share this post


Link to post
Share on other sites

Skip all that code, please try this: (add before the final ?>)

  require(DIR_WS_BOXES . 'builder.php');
 $sts->restart_capture ('builderbox', 'box'); // Get builder box

Then where ever you would like the contents of the box to be displayed use

$builderbox

 

Thanks for suggestion, still no luck getting builder to work - still getting $builderbox


Thanks to all source contributors, 2.3.4 Edge just works fine

https://github.com/gburton/Responsive-osCommerce/archive/master.zip

Share this post


Link to post
Share on other sites

I have just installed Advanced Specials v1.3.3 Contribution on a live site designed using STS 4.6. Installation was simple and the specials contribution works fine in two out of three page generated within the STS template...

 

[A] FINE - Product listing in subcategories. Price is struck through in red and new special price shown

 

NOT WORKING - Product description page. Price remains as before contribution, no special change

 

[C] FINE - Shopping cart. Price is correct as special in [A] above.

 

Have reverted to non-STS shop and the product description page does reflect changed price, so issue is with STS.

 

Can anyone advise solution. Happy to PM php where necessary.

 

Thanks.

Share this post


Link to post
Share on other sites

I am having problems incorporating a section on the home page:

 

Here is my code inside sts_user_code.php:

$sts->start_capture();
 include(DIR_WS_MODULES . FILENAME_FEATURED);
 $sts->stop_capture('featuredproducts');

 $sts->start_capture();
 include(DIR_WS_MODULES . FILENAME_FEATURED_C);
 $sts->stop_capture('featuredcategory');

 

For some reason, having $featuredproducts in the html will make featured.php(FILENAME_FEATURED) show up on the home page, but when I have $featuredcategory or $featuredcategory$, all that shows up is that text, not the featured_c.php file that I would like. If I used the 'featuredproducts' to show featured_c.php, that works as well, so it is not my php file that is the problem, it seems that it is the 'featuredcategory' alias itself, or that I need to declare it somewhere else so that the template system will read it properly.

 

Does anyone know of something that I'm missing? thank you

Share this post


Link to post
Share on other sites

I'm upgrading my shop to OSC2.3.1, now trying to add the STS4.6.

But I meet a problem.

I didn't find the "switch ($set) {" in the catalog/admin/modules.php

and there are no '<a href="' . tep_href_link(FILENAME_MODULES, 'set=payment', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_MODULES_PAYMENT . '</a><br>' . in catalog/admin/includes/boxes/modules.php

 

there are no column_left.php and column_right.php in the catalog/include folder

 

Now where can I put these stuff?

// START STS 4.1

case 'sts':

$module_type = 'sts';

$module_directory = DIR_FS_CATALOG_MODULES . 'sts/';

$module_key = 'MODULE_STS_INSTALLED';

define('HEADING_TITLE', HEADING_TITLE_MODULES_STS);

break;

// END STS 4.1

 

// START STS 4.1

'<a href="' . tep_href_link(FILENAME_MODULES, 'set=sts', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_MODULES_STS . '</a><br>' .

// END STS 4.1

Edited by Shuen

Share this post


Link to post
Share on other sites

installing sts4.6 locally using xampp...

 

on the install.html it says to find --- switch ($set) { -- in admin/modules.php - and replace it/add some code to the end .... i am editing the file in text edit, and i cannot find this code anywhere.

 

thanks in advance

-joe

Share this post


Link to post
Share on other sites

Hi,

I posted about this in the other STS thread - apologies if it's in the wrong place, there's 2!

 

My STS installation works fine up until checkout_confirmation.php where the template seems to just break.

I cant find out why. I've tried forcing the table widths, some css but to no avail.

I have installed Agree2terms1.7 on the checkout_confirmation page, but I don't see this to be the issue as its displaying in the correct space - just the center content seems to have 60 or 70px padding either side that is coming from nowhere and pushing out the side of my template and making things a little messy.

I implemented this bug fix but it didn't work for me :

 

Here is a quick fix for your checkout_confirmation.php file that is causing the problem with this particular template set (freeosc_009):

 

Backup your website before making any changes.

 

Download a copy of your current checkout_confirmation.php file and open it using your favorite PHP Editor.

 

Find the following code around line 111:

 

<!-- body_text //-->

<td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td>

<?php

if (isset($payment->form_action_url)) {

$form_action_url = $payment->form_action_url;

} else {

$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');

}

 

echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');

?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

 

 

And replace it with the following:

 

 

 

<!-- body_text //-->

<td width="100%" valign="top">

<?php /* BOF: STS checkout page break fix */

if (isset($payment->form_action_url)) {

$form_action_url = $payment->form_action_url;

} else {

$form_action_url = tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');

}

 

echo tep_draw_form('checkout_confirmation', $form_action_url, 'post');

?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td>

<?php /* EOF: STS checkout page break fix */ ?>

<table border="0" width="100%" cellspacing="0" cellpadding="0">

<tr>

<td class="pageHeading"><?php echo HEADING_TITLE; ?></td>

 

 

Save the file and upload it to your server, replacing the old checkout_confirmation.php file.

 

 

As mentioned above this does not work for me at all.

As there was a fix for this, can anyone tell me what the issue is so I can try to get around it, or does anyone know of abother fix or work around for this.

 

Any help on this matter would be greatly appreciated as its driving me mental now.


Bryndog, a lone crusader charged with not messing up

Thanks to any an all for your help and advice.

Share this post


Link to post
Share on other sites

Hello. I just tried today to upload the STS v4.6 for MS2 for the first time so i don't have much experience about it. after i uploaded all the files, i found an error when i tried to load my website, here is the error ( Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.)

 

how can i fix that because i'm really curious to try to STS :) thanks in advance

Share this post


Link to post
Share on other sites

Hello. I just tried today to upload the STS v4.6 for MS2 for the first time so i don't have much experience about it. after i uploaded all the files, i found an error when i tried to load my website, here is the error ( Server Requirement Error: register_globals is disabled in your PHP configuration. This can be enabled in your php.ini configuration file or in the .htaccess file in your catalog directory.)

 

how can i fix that because i'm really curious to try to STS :) thanks in advance

 

I don't think this is related to STS. Was your store working before installing STS?

 

And why please do you use MS2? Do you have any archeological interest?

Share this post


Link to post
Share on other sites

yes my store is working normally without STS.

 

i don't know why im using MS2, i'm new to those stuff and i don't know if i can upgrade to something new or not. i hope that you can give me your advice :)

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

×