brough Posted February 18, 2011 Share Posted February 18, 2011 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"; ?> Quote Link to comment Share on other sites More sharing options...
bkellum Posted February 18, 2011 Share Posted February 18, 2011 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). Quote 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 More sharing options...
Peper Posted February 18, 2011 Share Posted February 18, 2011 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 Quote Getting the Phoenix off the ground Link to comment Share on other sites More sharing options...
bkellum Posted February 18, 2011 Share Posted February 18, 2011 (edited) 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 February 18, 2011 by bkellum Quote 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 More sharing options...
silklink Posted February 20, 2011 Share Posted February 20, 2011 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? Quote Link to comment Share on other sites More sharing options...
Peper Posted February 21, 2011 Share Posted February 21, 2011 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 Quote Getting the Phoenix off the ground Link to comment Share on other sites More sharing options...
matrix2223 Posted February 27, 2011 Share Posted February 27, 2011 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 Quote 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. Link to comment Share on other sites More sharing options...
Peper Posted February 27, 2011 Share Posted February 27, 2011 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 Quote Getting the Phoenix off the ground Link to comment Share on other sites More sharing options...
chinholee Posted March 6, 2011 Share Posted March 6, 2011 i need help trying to make sts template bigger to fit browser. Quote Link to comment Share on other sites More sharing options...
chinholee Posted March 8, 2011 Share Posted March 8, 2011 is sts template different in size than default osc webpage? Please can someone answer this question! Quote Link to comment Share on other sites More sharing options...
Guest Posted March 10, 2011 Share Posted March 10, 2011 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. Quote Link to comment Share on other sites More sharing options...
andy1024 Posted March 27, 2011 Share Posted March 27, 2011 I am download osCommerce Online Merchant v2.3.1 which file I should be use MS2 RC1 or RC2 thanks for helo Quote Link to comment Share on other sites More sharing options...
♥multimixer Posted March 29, 2011 Share Posted March 29, 2011 I am download osCommerce Online Merchant v2.3.1 which file I should be use MS2 RC1 or RC2 thanks for helo take a look here Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Bryan G Posted April 21, 2011 Share Posted April 21, 2011 Where can I download it from? Quote Link to comment Share on other sites More sharing options...
OBN_Dave Posted April 21, 2011 Share Posted April 21, 2011 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 Quote Link to comment Share on other sites More sharing options...
Shuen Posted April 22, 2011 Share Posted April 22, 2011 (edited) 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 April 22, 2011 by Shuen Quote Link to comment Share on other sites More sharing options...
OBN_Dave Posted April 22, 2011 Share Posted April 22, 2011 n/m got it figured. it was the sts_display_output.php file that I needed to add a line to Quote Link to comment Share on other sites More sharing options...
joey beans Posted April 23, 2011 Share Posted April 23, 2011 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 Quote Link to comment Share on other sites More sharing options...
joey beans Posted April 23, 2011 Share Posted April 23, 2011 could this be because i am running OSC2.3.1 and the install file is for OSC2.2 ?? Quote Link to comment Share on other sites More sharing options...
♥multimixer Posted April 29, 2011 Share Posted April 29, 2011 could this be because i am running OSC2.3.1 and the install file is for OSC2.2 ?? Read here Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Bryndog Posted May 9, 2011 Share Posted May 9, 2011 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. Quote Bryndog, a lone crusader charged with not messing up Thanks to any an all for your help and advice. Link to comment Share on other sites More sharing options...
poppomooora Posted June 7, 2011 Share Posted June 7, 2011 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 Quote Link to comment Share on other sites More sharing options...
♥multimixer Posted June 9, 2011 Share Posted June 9, 2011 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? Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
poppomooora Posted June 9, 2011 Share Posted June 9, 2011 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 :) Quote Link to comment Share on other sites More sharing options...
Lotti Posted June 14, 2011 Share Posted June 14, 2011 I have STS installed on my site. Not in any way related to STS which is the most helpful contribution in the world but because I had some problems iwth some other contributions - I ended up paying someone to work on my site - they did that and I paid up only to find they disabled STS and now it doesn't load in Admin. I'm an STS devotee so have no idea how to edit my site without it. I have offered the contractor money to fix it but he will not respond. Can anyone help fix this. The error in Admin when I selet the STS module is: Warning: main(/home/mette/public_html/catalog/includes/languages/english/modules/sts/sts_home.php) [function.main]: failed to open stream: No such file or directory in /home/mette/public_html/catalog/admin/modules.php on line 139 Warning: main(/home/mette/public_html/catalog/includes/languages/english/modules/sts/sts_home.php) [function.main]: failed to open stream: No such file or directory in /home/mette/public_html/catalog/admin/modules.php on line 139 Warning: main() [function.include]: Failed opening '/home/mette/public_html/catalog/includes/languages/english/modules/sts/sts_home.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/mette/public_html/catalog/admin/modules.php on line 139 Fatal error: Cannot redeclare class sts_index in /home/mette/public_html/catalog/includes/modules/sts/sts_index.php on line 15 If anyone can help I'd really appreciate it I'm totally stuck. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.