Fredrik.r Posted February 12, 2004 Share Posted February 12, 2004 (edited) Hi there, I tried to use an index.php_0.html without the $content tag because I want to add my own content (flash) on the main catalog page. The problem is that the manufacturer box doesnt work any longer since there is no $content. I thought the index.php_0.html should ONLY affect my main catalog page.. Can I somehow use a different template for the categories? I also tried to upload an index.php.html (note that its a different file) WITH the $content tag but it still doesnt work. Please help me, the shop is supposed to be up and live in the weekend. Thanks! Edited February 12, 2004 by Fredrik.r Quote Link to comment Share on other sites More sharing options...
Fredrik.r Posted February 12, 2004 Share Posted February 12, 2004 It should have been "Can I somehow use a different template for the manufacturers?" I couldnt edit last message. Quote Link to comment Share on other sites More sharing options...
richm Posted February 12, 2004 Share Posted February 12, 2004 Hiya! I'm using the latest 2.01 version of STS. I was wondering if there was any way I could actually change the output of $myaccountlogoff to display images instead of text! My site is nettik.co.uk, and I was trying to add a login/logout button in the menu bar. I tried just coding PHP into the template, changing the file extension to .php and updating configure.php, but it merely printed out the php code instead of running it!! I'm a little stuck!! Thx in advance ;) Rich Quote Link to comment Share on other sites More sharing options...
Amy J Posted February 13, 2004 Share Posted February 13, 2004 Can anyone tell me if categories description works with STS? Quote Link to comment Share on other sites More sharing options...
Amy J Posted February 13, 2004 Share Posted February 13, 2004 For anyone who cares. Yes it does. Works nicely :D Quote Link to comment Share on other sites More sharing options...
SoundsAlarming Posted February 13, 2004 Share Posted February 13, 2004 I have a missing page in my store and I womder if its a bug in STS. If a guest clicks checkout, there is a line of text that tells you that your "visitor cart" and "member cart" will be merged, with a more info link. If I click that link I get a pop-up window containing just my STS template with no content. Also the window is fixed size so if there was any content you would need to scroll down and across to read it. Is this a problem with my store, STS or osCommerce? And how can I fix it. Thanks - Craig Quote Link to comment Share on other sites More sharing options...
SoundsAlarming Posted February 13, 2004 Share Posted February 13, 2004 (edited) Sorry I have more questions. Is there any way to have a static categories box? In my STS template I have included a static products box with a list of products which I had planned to use instead of the catagories box, the problem I have is that because the links are static and do not include session ID values my visitors are logged out when they click on them. My problem with $categorybox is that one of my catogries has so many sub catogries that it expands to far down the page. Is there any way to add session ID values to my links? My site can be seen Here I have included both boxes. Click on ProClips in the categories box to see the over expantion. Edited February 13, 2004 by SoundsAlarming Quote Link to comment Share on other sites More sharing options...
DiamondSea Posted February 13, 2004 Author Share Posted February 13, 2004 Sorry I have more questions. Is there any way to have a static categories box? In my STS template I have included a static products box with a list of products which I had planned to use instead of the catagories box, the problem I have is that because the links are static and do not include session ID values my visitors are logged out when they click on them. My problem with $categorybox is that one of my catogries has so many sub catogries that it expands to far down the page. Is there any way to add session ID values to my links? My site can be seen Here I have included both boxes. Click on ProClips in the categories box to see the over expantion. Yep, just use the $sid variable. at the end of your URL., like this: http://domain.com/catalog/script.php?$sid or http://domain.com/catalog/script.php?var=val&$sid if your URL already has parameters. - 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...
speed2 Posted February 14, 2004 Share Posted February 14, 2004 Hi, I Just downloaded the new version of STS, Good Job. COuld someone please tell me how to have a manufacture box (just a pull down menu only), like $category, only dispaly the category box? Quote Link to comment Share on other sites More sharing options...
chexter Posted February 14, 2004 Share Posted February 14, 2004 Ok new at this I installed a fresh copy of oscommerce and tried installing the newest sts. I installed my catalog into my root directory so that i wouldn't have to mess with redirects and stuff like that but now when i install sts it gives me this Fatal error: Call to a member function on a non-object in /home/chexter/public_html/includes/classes/shopping_cart.php on line 75 i am thinking this is because i do not have my files under the catalog folder but then again i could be wrong i did install those extra lines under the config.php so i don't know what else could be the problem. any help is appreciated thanks Quote Link to comment Share on other sites More sharing options...
speed2 Posted February 14, 2004 Share Posted February 14, 2004 hi, where is all the variable listed in sts_templates_html called from? how about making a new variable? Please help Quote Link to comment Share on other sites More sharing options...
Guest Posted February 15, 2004 Share Posted February 15, 2004 hi, where is all the variable listed in sts_templates_html called from? how about making a new variable? Please help Check out the following posts in this thread: http://www.oscommerce.com/forums/index.php?sho...ndpost&p=232735 http://www.oscommerce.com/forums/index.php?sho...ndpost&p=308077 http://www.oscommerce.com/forums/index.php?sho...ndpost&p=306849 You define custom boxes in sts_user_code.php. The readme file has more detailed info in it, but you essentially turn the capture on, call the code you want to capture, give it a variable name, turn off the capture and parse the variable. The variables are set in sts_display_output.php and in sts_user_code.php. It's possible to use the capture code framework used in sts_user_code.php elsewhere, as long as you're mindful of the capture flow described in the other post and change as needed. You can't add code to the template and change the extension to php and have it work because the template is never executed in the code - it's just loaded into a string variable and the variables are merged into it in sts_display_output.php. -C Quote Link to comment Share on other sites More sharing options...
eelyn Posted February 15, 2004 Share Posted February 15, 2004 Hi, I'm trying to user Ultrapics with STS. Basically, I've added new template variables into product_info.php.html template (because that's where the extra pics are supposed to appear). However, it isn't a straight <img> link because there is a javascript pop-up involved. I tried loading the code (the <a>, javascript, <img>) into a string variable for example called $image1, but when I load the page, even though with the debug on, it shows that $image1 = <a href="javascript:popupWindow('http://www.mydomain.com/popup_image.php?pID=29ℑ=1');"><img src="images/pl_62.jpg" border="0" alt="Bags 1" title=" Bags 1 " width="120" height="90" hspace="1" vspace="1"></a> on the page itself it is still printing $image1 instead of the string above. When it is a straight off image link, say $image2 = <img src="images/theflowerisattackingme.gif" border="0" alt="" width="600" height="600"> the picture loads. So it's not that the variables are not being captured. Any help with this would be MUCH appreciated Quote Link to comment Share on other sites More sharing options...
Guest Posted February 15, 2004 Share Posted February 15, 2004 Forgot to mention that you can also directly assign template variables by simply using $template['variablename'] = "Your Content Here"; for whatever you want placed in that space. My bad for omitting this. -C Quote Link to comment Share on other sites More sharing options...
Guest Posted February 15, 2004 Share Posted February 15, 2004 Hye guys , I using ultra pics withn sts too and my problem is : No addcional pics shown above description . You guys have any idea where can I start to serch for the error ? thanks very mush cass Quote Link to comment Share on other sites More sharing options...
helohelo Posted February 15, 2004 Share Posted February 15, 2004 sorry gues, Iread this whole post some time ago but could not remeber there was somethin in about the tell a friend box Its not in my template. how to add it? Quote Keesjan Link to comment Share on other sites More sharing options...
Guest Posted February 16, 2004 Share Posted February 16, 2004 Hi guys, I've tried running the template files as suggested, I'm getting the following message when I preview the web site... 1046 - No Database Selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] Any ideas? I Used the Easy Installation method. Any suggestions would be greatfully appreciated. Quote Link to comment Share on other sites More sharing options...
DiamondSea Posted February 16, 2004 Author Share Posted February 16, 2004 Hi guys, I've tried running the template files as suggested, I'm getting the following message when I preview the web site... 1046 - No Database Selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] Any ideas? I Used the Easy Installation method. Any suggestions would be greatfully appreciated. My guess is that you copied configure-SAMPLE.php over top of your configure.php file and clobbered all your database settings. You need to go to your configure.php file and reenter your database (and possibly directory and other) settings. You normally should only copy the STS stuff at the bottom of configure-SAMPLE.php to the bottom of your configure.php file. 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...
richm Posted February 16, 2004 Share Posted February 16, 2004 (edited) Hiya! I'm using the latest 2.01 version of STS. I was wondering if there was any way I could actually change the output of $myaccountlogoff to display images instead of text! My site is nettik.co.uk, and I was trying to add a login/logout button in the menu bar. I tried just coding PHP into the template, changing the file extension to .php and updating configure.php, but it merely printed out the php code instead of running it!! I'm a little stuck!! Thx in advance Rich Edited February 16, 2004 by richm Quote Link to comment Share on other sites More sharing options...
DiamondSea Posted February 16, 2004 Author Share Posted February 16, 2004 Hi, I'm trying to user Ultrapics with STS. Basically, I've added new template variables into product_info.php.html template (because that's where the extra pics are supposed to appear). However, it isn't a straight <img> link because there is a javascript pop-up involved. I tried loading the code (the <a>, javascript, <img>) into a string variable for example called $image1, but when I load the page, even though with the debug on, it shows that $image1 = <a href="javascript:popupWindow('http://www.mydomain.com/popup_image.php?pID=29ℑ=1');"><img src="images/pl_62.jpg" border="0" alt="Bags 1" title=" Bags 1 " width="120" height="90" hspace="1" vspace="1"></a> on the page itself it is still printing $image1 instead of the string above. When it is a straight off image link, say $image2 = <img src="images/theflowerisattackingme.gif" border="0" alt="" width="600" height="600"> the picture loads. So it's not that the variables are not being captured. Any help with this would be MUCH appreciated In the convergence of laziness and the fact that I hate pop-up windows the Product_Info templates do not support javascript, which may be part of your problem. To support popups, I would have to write code to parse through the script looking for any javascript functions in the output and move them to the $headercontent variable. I was trying to get STS 2.x out the door and didn't figure it would be a big deal. You can probably remove the javascript function call and make it work by doing something like this: Change <a href="javascript:popupWindow('http://www.mydomain.com/popup_image.php?pID=29ℑ=1');"><img src="images/pl_62.jpg" border="0" alt="Bags 1" title=" Bags 1 " width="120" height="90" hspace="1" vspace="1"></a> to this: <a href="javascript:window.open("http://www.mydomain.com/popup_image.php?pID=29ℑ=1","win",'toolbar=0,location=0,directories=0,status=1,menubar=1,scrollbars=1,resizable =1,width=600,height=450');"><img src="images/pl_62.jpg" border="0" alt="Bags 1" title=" Bags 1 " width="120" height="90" hspace="1" vspace="1"></a> I haven't tested this yet, but it could be a starting point to get you going. Sorry I don't have more details, but I haven't worked on Ultrapics yet. - 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 February 16, 2004 Author Share Posted February 16, 2004 Hiya! I'm using the latest 2.01 version of STS. I was wondering if there was any way I could actually change the output of $myaccountlogoff to display images instead of text! My site is nettik.co.uk, and I was trying to add a login/logout button in the menu bar. I tried just coding PHP into the template, changing the file extension to .php and updating configure.php, but it merely printed out the php code instead of running it!! I'm a little stuck!! Thx in advance Rich Around line 202 of sts_display_output.php you'll find this code: if (tep_session_is_registered('customer_id')) { $template['myaccount'] = '<a href=' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . ' class="headerNavigation">' . HEADER_TITLE_MY_ACCOUNT . '</a>'; $template['urlmyaccount'] = tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); $template['logoff'] = '<a href=' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . ' class="headerNavigation">' . HEADER_TITLE_LOGOFF . '</a>'; $template['urllogoff'] = tep_href_link(FILENAME_LOGOFF, '', 'SSL'); $template['myaccountlogoff'] = $template['myaccount'] . " | " . $template['logoff']; } else { $template['myaccount'] = '<a href=' . tep_href_link(FILENAME_ACCOUNT, '', 'SSL') . ' class="headerNavigation">' . HEADER_TITLE_MY_ACCOUNT . '</a>'; $template['urlmyaccount'] = tep_href_link(FILENAME_ACCOUNT, '', 'SSL'); $template['logoff'] = ''; $template['urllogoff'] = ''; $template['myaccountlogoff'] = $template['myaccount']; You'll want to change these lines in bold to show whatever image tags you want to use in your menu bar. FYI, You can't put PHP code in the template files. The template files are simply read in (as text files) by STS and then displayed to the browser after the variables are replaced. No code in them is actually executed anywhere. This help? - 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...
vintageland Posted February 16, 2004 Share Posted February 16, 2004 Is there a way to make a tempate for the pages relating to the Information Box different than your other template files. I know now with 2.0 you can do this with categories but can you do it with shipping.php, conditions.php, etc? Quote Link to comment Share on other sites More sharing options...
DiamondSea Posted February 16, 2004 Author Share Posted February 16, 2004 Is there a way to make a tempate for the pages relating to the Information Box different than your other template files. I know now with 2.0 you can do this with categories but can you do it with shipping.php, conditions.php, etc? Yep. Just make a shipping.php.html file or whatever you want and it should use it automatically. Just name the template after the script file (scriptfilename.php.html) and it should work. - 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...
vintageland Posted February 16, 2004 Share Posted February 16, 2004 Where would this file be placed? I can't seem to get it to work although something might be wrong with my upgrade from 1.8 to 2.01. Quote Link to comment Share on other sites More sharing options...
vintageland Posted February 16, 2004 Share Posted February 16, 2004 Another followup to my above question: Does anything new need to be changed to the configure.php file? 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.