Guest Posted January 9, 2004 Share Posted January 9, 2004 Ok, I uploaded that file, and now I get: Warning: main(STS_USER_CODE): failed to open stream: No such file or directory in /home/gtsweb/public_html/newcat/includes/sts_display_output.php on line 93 Fatal error: main(): Failed opening required 'STS_USER_CODE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gtsweb/public_html/newcat/includes/sts_display_output.php on line 93 So, I put up STS_USER_CODE, and I still get the same message. Any more advice? Quote Link to comment Share on other sites More sharing options...
TheComputerGuy Posted January 9, 2004 Share Posted January 9, 2004 I am trying to edit the boxes and the way they look is there anyway to do this using this template system. Any help with this problem would be great. http://alleywaymusic.com/index.php Is the link to the site so you can see the problem. Quote Link to comment Share on other sites More sharing options...
trendyfashion Posted January 9, 2004 Share Posted January 9, 2004 Kevin, If this is on a clean install of Osc2.2 MS2 then all you have to do is upload ALL the files that are in the zip and edit the configure.php the way shown and it should work fine. Don't leave any extra space before the ?> after you paste the config stuff. Quote The Wiki Docs: Read them, live them and be thankful for them! Link to comment Share on other sites More sharing options...
madmike Posted January 9, 2004 Share Posted January 9, 2004 Chris, Maybe u can use this add-on : Graphical Boxes v1_00 But if u find solution i'm interested to have answer about template for box too. Regards, Mike Quote Link to comment Share on other sites More sharing options...
DiamondSea Posted January 9, 2004 Author Share Posted January 9, 2004 Ok, I uploaded that file, and now I get: Warning: main(STS_USER_CODE): failed to open stream: No such file or directory in /home/gtsweb/public_html/newcat/includes/sts_display_output.php on line 93 Fatal error: main(): Failed opening required 'STS_USER_CODE' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/gtsweb/public_html/newcat/includes/sts_display_output.php on line 93 So, I put up STS_USER_CODE, and I still get the same message. Any more advice? It looks like you don't have STS_USER_CODE defined in your configure.php file. Copy the definitions from the configure-SAMPLE.php file and it should fix it. - Brian Quote Simple Template System (STS) Layout your site with 1 (or more) HTML file! Download STS: http://www.oscommerce.com/community/contributions,1524 Support: http://www.oscommerce.com/forums/index.php?showtopic=58541 Link to comment Share on other sites More sharing options...
DiamondSea Posted January 9, 2004 Author Share Posted January 9, 2004 I am trying to edit the boxes and the way they look is there anyway to do this using this template system. Any help with this problem would be great. http://alleywaymusic.com/index.php Is the link to the site so you can see the problem. STS doesn't let you change the content of boxes, just move them whereever you want them. Sorry! :( - Brian Quote Simple Template System (STS) Layout your site with 1 (or more) HTML file! Download STS: http://www.oscommerce.com/community/contributions,1524 Support: http://www.oscommerce.com/forums/index.php?showtopic=58541 Link to comment Share on other sites More sharing options...
helohelo Posted January 9, 2004 Share Posted January 9, 2004 (edited) hello, I installed your very promissing STS 1.8 version, the way you say in the instructions. I also (earlier) installed the affiliate plugin... nothing happens... What to do? Edited January 9, 2004 by helohelo Quote Keesjan Link to comment Share on other sites More sharing options...
innovations Posted January 9, 2004 Share Posted January 9, 2004 Brian, I am wanting to re-arrange the boxes in the right colum but I there is no variable for the notifications box as far as I know. Can you give me instructions on how to add a variable for it so that I can move it around in my sts_template.html page? Quote If only I was the one helping you... .:::::For complete data-driven and multi-media website creations:::::. http://www.innocentinnovations.com ------------------------ Get instructions, visit the documentation site: http://wiki.oscommerce.com/Top Link to comment Share on other sites More sharing options...
trendyfashion Posted January 11, 2004 Share Posted January 11, 2004 So everone on this post asks to see examples of the simple template system. Here is mine..still a few bugs to work out. Whats up with the tell a friend adding to cart? anyone figure this out yet? I didnt have this problem till I used this contribution. My simple template system site. Quote The Wiki Docs: Read them, live them and be thankful for them! Link to comment Share on other sites More sharing options...
RobLum Posted January 11, 2004 Share Posted January 11, 2004 Hi, nice contribution before i begin :) This is probably a very basic question, but im looking to create a completely customised shop. I need to be able to edit the $content variable.. Currently I have: "HEADING_TITLE Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account? Sample text in here TABLE_HEADING_NEW_PRODUCTS" and all the new products. "sample text in here" is my attempt to modify the content on the index page. (via the english language page) However, I wish to remove (at least temporarily) the "HEADING TITLE" "Welcome Guest" and entire new products section.. I have been searching around the files and havent been able to do this. Obviously, to make things easier to change, it would be ideal if i could delete this stuff by commenting out code from the sts files, but have tried various things in these files to no avail.. I assume I will be wanting to comment out from the Display HTML part of sts_display_output.php ? I am at a loss to understand what part of these files control the $content variable.. I suspect $template['content'] = strip_content_tags($sts_block['columnleft2columnright'], 'content'); has something to do with it, but i am not sure what 'columnleft2columnright' is (or even what these lines of code do.. (presumably they are reading through something in the original installation, stripping code, and modifying the string ?) In which case, what do i need to edit? any help on this would be greatly appreciated.. Rob http://www.luminate.org.uk/ Quote Link to comment Share on other sites More sharing options...
hansosc Posted January 11, 2004 Share Posted January 11, 2004 Hello osCommerce community, I am in the process of setting up my first osCommerce store and am constantly amazed by what it can do. I am no good with PHP and so was very glad to be able to use the Simple Template System which seems to work wonders on my very clean installation. So far I have encountered only one problem: At the complete bottom of my page (underneath the copyright notice) I have the following text: </ I have no idea where this came from and where I can find it. I know for sure it is not in the sts_template file. I hope anybody can help me solve this minor problem? Kind regards, Hans de Zwart Quote Link to comment Share on other sites More sharing options...
Fredrik.r Posted January 12, 2004 Share Posted January 12, 2004 Hi there, Thanks for a great contribution. Some questions... 1, I've made a menu in sts_template.html with some rollovers and links and I wonder if it's possible to modify STS to use the default template for my html-files? I would like the left column to show up even in my own pages (about us, contact us..) See early version (100Kb JPG) 2, I'm aware of that my graphical menu (in swedish) will show up even when changning language. Is it possible to use different STS templates for different languages? 3, Im not sure i understood how to modify the head controller in the readme-file. Is it possible for the head controller to change the title on each page? (like Store name - Product name or Store name - Category - Product). 4, Can I change the catmenus first value "Catalog" to whatever i want, like for example "Choose category"? Thanks again!! Quote Link to comment Share on other sites More sharing options...
trendyfashion Posted January 12, 2004 Share Posted January 12, 2004 Here is a way to make your store index.php template without having to use the $content command. The catalog/index.php = catalog/includes/sts_template.html, then under catalog/includes/sts_templates/ you can have a template for any .php file in the catalog/ directory by calling it ????.php.html. So if you leave the $content out of the sts_template.html you won't see any products. I didn't want the $content on my index and didnt want to remove all that code for welcome guest and stuff like that so here is what I did. Edit the catalog/includes/filenames.php and change the FILENAME_DEFAULT from index.php to whatever you want. Copy your index.php and rename to new name and upload to your catalog/ Now you don't have to have the $content there. Surfer starts on your index page but when they click to go to products they switch to new page. Only major change was to some of the back buttons. Had to edit to reflect which homepage I wanted them at. Still working on the contact us continue button. Here is what it looks like..watch your browsers url status bar for changes. My Webpage Quote The Wiki Docs: Read them, live them and be thankful for them! Link to comment Share on other sites More sharing options...
DiamondSea Posted January 12, 2004 Author Share Posted January 12, 2004 Hi, nice contribution before i begin :) This is probably a very basic question, but im looking to create a completely customised shop. I need to be able to edit the $content variable.. Currently I have: "HEADING_TITLE Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account? Sample text in here TABLE_HEADING_NEW_PRODUCTS" and all the new products. "sample text in here" is my attempt to modify the content on the index page. (via the english language page) However, I wish to remove (at least temporarily) the "HEADING TITLE" "Welcome Guest" and entire new products section.. I have been searching around the files and havent been able to do this. Obviously, to make things easier to change, it would be ideal if i could delete this stuff by commenting out code from the sts files, but have tried various things in these files to no avail.. I assume I will be wanting to comment out from the Display HTML part of sts_display_output.php ? I am at a loss to understand what part of these files control the $content variable.. I suspect $template['content'] = strip_content_tags($sts_block['columnleft2columnright'], 'content'); has something to do with it, but i am not sure what 'columnleft2columnright' is (or even what these lines of code do.. (presumably they are reading through something in the original installation, stripping code, and modifying the string ?) In which case, what do i need to edit? any help on this would be greatly appreciated.. Rob http://www.luminate.org.uk/ The $content variable will contain whatever is in the main part of the page (the middle square between the header, footer, left column and right column) where the actual main user-interaction takes place STS does not modify the content area, it only captures it from whatever script is being called and maps it to the $content variable. If you want to know how to change the main content stuff in the middle of the pages, STS has nothing to do with it. Take a look in some of the other customization discussions and you'll find your answers there. In the case you mentioned, the text is generated by the index.php file and the text is found in the language directories. No settings that are part of STS control the text you are trying to change. Disabling the $content variable will simply keep your main content area from ever displaying. Hope this helps! - Brian Quote Simple Template System (STS) Layout your site with 1 (or more) HTML file! Download STS: http://www.oscommerce.com/community/contributions,1524 Support: http://www.oscommerce.com/forums/index.php?showtopic=58541 Link to comment Share on other sites More sharing options...
DiamondSea Posted January 12, 2004 Author Share Posted January 12, 2004 Hello osCommerce community, I am in the process of setting up my first osCommerce store and am constantly amazed by what it can do. I am no good with PHP and so was very glad to be able to use the Simple Template System which seems to work wonders on my very clean installation. So far I have encountered only one problem: At the complete bottom of my page (underneath the copyright notice) I have the following text: </ I have no idea where this came from and where I can find it. I know for sure it is not in the sts_template file. I hope anybody can help me solve this minor problem? Kind regards, Hans de Zwart I'm pretty sure it's a bug in older versions of PHP. Get your webmaster or hosting company to upgrade to a current version of PHP and it will magically go away. - Brian Quote Simple Template System (STS) Layout your site with 1 (or more) HTML file! Download STS: http://www.oscommerce.com/community/contributions,1524 Support: http://www.oscommerce.com/forums/index.php?showtopic=58541 Link to comment Share on other sites More sharing options...
trendyfashion Posted January 12, 2004 Share Posted January 12, 2004 Brian, What about the tell a friend button going to shopping cart? How can I seperate the t.a.f and the specials? Me no like specialfriendbox......lol Great contrib by the way you are the man! Quote The Wiki Docs: Read them, live them and be thankful for them! Link to comment Share on other sites More sharing options...
Guest Posted January 12, 2004 Share Posted January 12, 2004 (edited) Trendy (and others)... adding new boxes is simple. It's all in sts_user_code.php ... just change "newbox" to what you want to name it/reference it by, and "new_box.php" to the infobox code in your boxes/ dir. Generic Example: $sts_block_name = 'newbox'; require(STS_START_CAPTURE); require(DIR_WS_BOXES . 'new_box.php'); require(STS_STOP_CAPTURE); $template['newbox'] = strip_unwanted_tags($sts_block['newbox'], 'newbox'); So, if you figure the infobox is product_notifications.php, you'd add to sts_user_info.php: // $notificationbox -- product notifications $sts_block_name = 'notificationbox'; require(STS_START_CAPTURE); require(DIR_WS_BOXES . 'product_notifications.php'); require(STS_STOP_CAPTURE); $template['notificationbox'] = strip_unwanted_tags($sts_block['notificationbox'], 'notificationbox'); Then use $notificationbox wherever you want it to appear in your template(s). Remember that the box will only show on a product_info page (it's coded that way in product_notifications.php). Edited January 12, 2004 by JnGDotCom Quote Link to comment Share on other sites More sharing options...
trendyfashion Posted January 12, 2004 Share Posted January 12, 2004 I know how to add a new box but thanks for the info. That still doesnt address the not using the $content call. Or am I just missing something? Quote The Wiki Docs: Read them, live them and be thankful for them! Link to comment Share on other sites More sharing options...
babeskidoodle Posted January 12, 2004 Share Posted January 12, 2004 I love STS I stayed away from oscommerce for along time because it was so bloody difficult to change the interface IMHO, but no longer! I'm running it and love it, thanks. Now on to my problem, I'm in the camp that says you need Search engine friendly URL. When I turn them on in the admin screens none of the links work. so I tryed the "SEF Link Transformer" contribution and had all kinds of problems because I think STS and the SEF contrib are both trying to capture and process the output buffer :o . Has anyone been sucessful with a Safe URL in oscommerce or a Safe URL contribution working with STS? thanks charlie Quote Link to comment Share on other sites More sharing options...
helohelo Posted January 13, 2004 Share Posted January 13, 2004 (edited) hello, Iam interested in Search engine friendly url's too. Meanwhile I have 3 questions about this great add-on!: Q1: Do I or do I not have to install header tag controller also to see automatc tag controll? Q2: do anyone knows why in the first url the boxes on the right are placed good and on the second url not(way to far to the right)? This all is created with STS_1.8 http://www.optimizekit.com/shop/oscommerce...dex.php?cPath=2 http://www.optimizekit.com/shop/oscommerce-2.2ms2/catalog/ Q3: Why is the backgroundimage for the page not displayed? Like on http://www.optimizekit.com ? Q4: I only plan to sell 4 subscriptions. How can I make the entry page for the shop start with this 4 products? Edited January 13, 2004 by helohelo Quote Keesjan Link to comment Share on other sites More sharing options...
synthetic.bear Posted January 13, 2004 Share Posted January 13, 2004 Hi. I know this is a retarded question, so try not to ridicule me too much. ;) When I view sts_template.html, all I get are the boxes with the "$" words in them. And that's viewing them with a browser. I'm confused as to how to get the "$" to actually turn into the OSC graphics and words and the like. I followed the instructions, copied the files into the catalog/includes, modded my configuration.php, but there, the instructions end, and it just says to modify the template as you see fit. Well I can modify it all day but all I see are $this and $that. I thought those were just variables that call in the code from OSC. I'm so confused. Quote Link to comment Share on other sites More sharing options...
trendyfashion Posted January 13, 2004 Share Posted January 13, 2004 Dude thats the sts system the "$content" $cartbox...put those where you want them to show up on your page and tada there they are! Load it on your website to see it work. call index.php and the sts_tempate.html with generate the page. Quote The Wiki Docs: Read them, live them and be thankful for them! Link to comment Share on other sites More sharing options...
synthetic.bear Posted January 13, 2004 Share Posted January 13, 2004 Ok. By that logic, I could just use the sts_template.html without changing anything, right? Do I have to make an empty index.php? I tried www.mysite.com/index.php, and since I have no index.php there, I just got a 404 error. What do you mean call index.php? Quote Link to comment Share on other sites More sharing options...
synthetic.bear Posted January 13, 2004 Share Posted January 13, 2004 Oh, I see, I had to call /catalog/index.php Ok, so since by default when someone types my sitename into their browser, it searches for an index in the root folder, how do I get them automatically to /catalog/index.php? Quote Link to comment Share on other sites More sharing options...
updmike Posted January 13, 2004 Share Posted January 13, 2004 you could use this code as your index.php in your top level directory <?php header("Location: http://www.mysite.com/catalog/"); /* Redirect browser */ /* Make sure that code below does not get executed when we redirect. */ exit; ?> 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.