soulfain Posted December 22, 2008 Share Posted December 22, 2008 Hello, I got a simple question. I've been using the "$myaccount" and "$myaccountlogoff" tags and it works good but when the user is logged in, it doesn't switches to "log off" (it's still "my account"). Is it possible to make a customer links like these: 1. Log in (when not logged in) / Log off (when logged in). 2. My account (when not logged in redirects to login page, when logged in redirects to my account page). 3. Create an account (disappers when logged in). Please help. Cheers, Soulfain. Quote Link to comment Share on other sites More sharing options...
bkellum Posted December 22, 2008 Share Posted December 22, 2008 Hello, I got a simple question. I've been using the "$myaccount" and "$myaccountlogoff" tags and it works good but when the user is logged in, it doesn't switches to "log off" (it's still "my account"). Is it possible to make a customer links like these: 1. Log in (when not logged in) / Log off (when logged in). 2. My account (when not logged in redirects to login page, when logged in redirects to my account page). 3. Create an account (disappers when logged in). Please help. Cheers, Soulfain. The STS User Manual gives a brief describtion of each tag that comes with STS. $myaccountlogoff If the customer is logged in: text link to the My Account page followed by a separator and then by a text link to the logoff page. Same as $myaccount | $logoff If customer is not logged in: same as $myaccount. Use SSL if available. Created in: includes/modules/sts_inc/general.php Possible use: text link in header. See also: $myaccount , $logoff . 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...
soulfain Posted December 25, 2008 Share Posted December 25, 2008 Thanks, it was helpful. Another problem is how to style these file previews on the homepage? Can it be as simple as editing the template files in STS or I have to deep inside the PHP files? Quote Link to comment Share on other sites More sharing options...
bkellum Posted December 26, 2008 Share Posted December 26, 2008 Thanks, it was helpful. Another problem is how to style these file previews on the homepage? Can it be as simple as editing the template files in STS or I have to deep inside the PHP files? You can do this with STS in one of two ways: Create a home page template named index.php_0.html and add a static image of the product and then link to it. Install the Individual Boxes for Products in Central Module add-on.http://www.oscommerce.com/community/contributions,4491 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...
Shuey Posted December 29, 2008 Share Posted December 29, 2008 for a new site I am designing using STS, I want to move the page heading into the blue line above. So in this example, move "Specials This Month" into the blue line above and delete the corny image all together. How can I go about this? As well, how can I remove the border on the categories box on the left? Thanks, Dale I hope everyone is having a great holiday. Does anyone know how I can move the line "Specials This Month" into the blue line I made above? Thanks, Dale Quote Link to comment Share on other sites More sharing options...
bkellum Posted December 29, 2008 Share Posted December 29, 2008 I hope everyone is having a great holiday. Does anyone know how I can move the line "Specials This Month" into the blue line I made above? Thanks, Dale Dale, 1. Remove the blue box and then add a blue box/border to the CSS class "pageTitle" in your stylesheet. If you only want the blue box for the specials title but leave all of the other page titles untouched, create a new CSS class in your stylesheet and edit the name of the CSS class in specials.php to reflect the new class name. For example: Find: <td class="pageTitle" id="pageTitle"><h1><?php echo HEADING_TITLE; ?></h1></td> Change it to something else such as: <td class="pageTitleSpecials" id="pageTitle"><h1><?php echo HEADING_TITLE; ?></h1></td> 2. Remove the image call in specials.php: Find: <td class="pageHeading" align="right"><?php echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> Comment out the echo statement: <td class="pageHeading" align="right"><?php // echo tep_image(DIR_WS_IMAGES . 'table_background_specials.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> 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...
Rebellion1986 Posted December 29, 2008 Share Posted December 29, 2008 i was asked to post my comment here thanks in advance for the help! :) i have created a html layout and sucessfully installed STS. in adobe photoshop i created a layout for my website, and then imported it into dreamweaver. I centered the image for the website and added a new layer (To add the website content such as $cart etc). when i compiled my website on my 13" macbook everything looks perfect although when i use another computer with a larger screen my background image centers itself but my layered objects stay where they are (to the left) and everything looks terrible! how do i align the layer to move with the centered background image. sad.gif cheers, Rebellion1986. Quote Link to comment Share on other sites More sharing options...
Shuey Posted December 30, 2008 Share Posted December 30, 2008 Dale, 1. Remove the blue box and then add a blue box/border to the CSS class "pageTitle" in your stylesheet. If you only want the blue box for the specials title but leave all of the other page titles untouched, create a new CSS class in your stylesheet and edit the name of the CSS class in specials.php to reflect the new class name. For example: Find: <td class="pageTitle" id="pageTitle"><h1><?php echo HEADING_TITLE; ?></h1></td> Change it to something else such as: <td class="pageTitleSpecials" id="pageTitle"><h1><?php echo HEADING_TITLE; ?></h1></td> I want the blue box for every Page Title, not just Specials. How would I go about doing that? Thanks, Dale Quote Link to comment Share on other sites More sharing options...
bkellum Posted December 30, 2008 Share Posted December 30, 2008 I want the blue box for every Page Title, not just Specials. How would I go about doing that? Thanks, Dale Do the same thing for the index.php as well as simply modify the pageTitle class in your stylesheet or create a pageTitle class in your custom stylesheet. 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...
TracyS Posted December 31, 2008 Share Posted December 31, 2008 Hi guys, I'm stumped again - LOL I've tried searching and just haven't seemed to find the answer. Our credit card entry is now on the order_confirmation.php page (due to security modifications from osC to upgrade the store). If someone tries to use a credit card that we don't accept, they get booted back to the login screen with no error message. There is no error message in the URL either :blink: I tried these instructions: http://www.oscommerce.com/forums/index.php?s=&...t&p=1071646 but it didn't fix anything. Anybody know how to get it to show the TEXT_CCVAL_ERROR_INVALID_NUMBER message when the customer enters a cc number we don't accept? I have been wracking my brain going through all of the checkout pages I can find and I can't see any reason this wouldn't show up. I'm hoping someone here has run into this one already :blush: Quote ~Tracy Link to comment Share on other sites More sharing options...
Guest Posted January 1, 2009 Share Posted January 1, 2009 Hi, i hope this is the right place for STS support. I have a text link for logging in "<a href="/login.php">Login</a> however when the customer has used this to log into their account, i need this to change to "Logoff". Somone in the main support section gave me the following code: <?php if ( tep_session_is_registered('customer_id') ) { echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">Logout</a>'; // simple text link } else { echo '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">Login</a>'; // another simple text link } ?> However im not sure if this will work with STS. Please help. Many thanks! Quote Link to comment Share on other sites More sharing options...
celina2007 Posted January 2, 2009 Share Posted January 2, 2009 Hey guys i want a centered site, i am using STS now, how can i center it please? Quote Link to comment Share on other sites More sharing options...
bkellum Posted January 2, 2009 Share Posted January 2, 2009 Hi, i hope this is the right place for STS support. I have a text link for logging in "<a href="/login.php">Login</a> however when the customer has used this to log into their account, i need this to change to "Logoff". Somone in the main support section gave me the following code: <?php if ( tep_session_is_registered('customer_id') ) { echo '<a href="' . tep_href_link(FILENAME_LOGOFF, '', 'SSL') . '">Logout</a>'; // simple text link } else { echo '<a href="' . tep_href_link(FILENAME_LOGIN, '', 'SSL') . '">Login</a>'; // another simple text link } ?> However im not sure if this will work with STS. Please help. Many thanks! Yes, this is the correct thread to ask STS related questions. If you ask outside of this thread, you will end up with answers like the one you got above. STS already comes with a pre-defined tag that will do exactly what you are wanting (see the STS User Manual for a list of all of the pre-defined tags and what they do). See post# 4631 just a few posts up from yours. 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...
celina2007 Posted January 2, 2009 Share Posted January 2, 2009 (edited) To center the page, i did this: Using a div tag just before the body tag as so:CODE <div align="center"> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> **HTML code for the body goes here** </body> </div> </html> But it didn't work, only the upper part of the header is centered. :unsure: . Edited January 2, 2009 by celina2007 Quote Link to comment Share on other sites More sharing options...
bkellum Posted January 2, 2009 Share Posted January 2, 2009 Hey guys i want a centered site, i am using STS now, how can i center it please? The beauty of STS is that you use standard web practices such as CSS to do these type of tasks. Wrap your content and then assign a CSS class to it. Then in your stylesheet, add the CSS code to center the wrapped content. For example: Wrap your content in a div: <div class="page_wrap"> Your content here </div> Then define the new CSS class "page_wrap" in your stylesheet: .page_wrap { /* includes the header, main body content and the footer */ margin:0 auto; padding:0 0 0 0; width:780px; /* use what ever width you want */ background: url('images/body_bg.jpg') repeat-y; /* use any background color or image that you want or leave out */ text-align:center; } 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...
celina2007 Posted January 2, 2009 Share Posted January 2, 2009 worked :) thank you Quote Link to comment Share on other sites More sharing options...
Guest Posted January 2, 2009 Share Posted January 2, 2009 Hey guys, I am not sure if there are a solution for it, but we seams quite a few having the same problem. The Ajax shopping cart doesn't work correctly with STS. Some asked questions here (ajax shopping cart) but no one had a solution. I try a post here and see if any of you guys got it to work with STS? In such case what kind of adjustments are needed? Cheers Hakan Quote Link to comment Share on other sites More sharing options...
celina2007 Posted January 2, 2009 Share Posted January 2, 2009 Hey please how to delete the header of categories infobox in STS? Quote Link to comment Share on other sites More sharing options...
bkellum Posted January 2, 2009 Share Posted January 2, 2009 Hey please how to delete the header of categories infobox in STS? If I remember correctly, you are using the Modern Template RC2a that was converted to an STS template (by me). This template also uses the CSS Category Menu in which I created a specific infobox template for it named "infobox_categories_cssmenu.php.html" in the boxes folder of the template folder. I created this infobox template to have a static header in a table cell: <td width="100%" height="14" class="infoBoxHeading">Categories</td> You will simply need to edit that line of HTML. You can also use a dynamic heading using the STS tag "$headertext" such as the following example: <td background="images/infobox_03.gif" class="infoBoxHeading" width="1428">$headertext</td> I chose to use the static header text instead as it matched the design of the original Modern Template RC2 better. ;) 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...
catalepticstate Posted January 2, 2009 Share Posted January 2, 2009 So how can I get different index pages to work properly? Homepage should have a picture, the rest should contain content. I have a problem getting this working properly. Quote Link to comment Share on other sites More sharing options...
bkellum Posted January 2, 2009 Share Posted January 2, 2009 (edited) So how can I get different index pages to work properly? Homepage should have a picture, the rest should contain content. I have a problem getting this working properly. See the following post (#3755 in this thread): http://www.oscommerce.com/forums/index.php?sho...p;#entry1226986 See post #4326 as well: http://www.oscommerce.com/forums/index.php?s=&...t&p=1303555 Also, for a home page template, create a template named index.php_0.html and leave out the $content tag and insert your image instead. Edited January 2, 2009 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...
Guest Posted January 2, 2009 Share Posted January 2, 2009 Hi, Another problem im having with sts is im tyring to link to custom category templates from my menu. My menu is made using javascript due to the expanding submenus etc.... When i use the $urlcat_122 as the link in the javascript, it only links to the category template when the javascript is in the actual template the menu is on. When i try using an external .js file the link does not work. Is there a way to get this to work using an external .js file as there is quite a lot of javascript which i dont really want to include in the template files. Many thanks Quote Link to comment Share on other sites More sharing options...
bkellum Posted January 2, 2009 Share Posted January 2, 2009 Hi,Another problem im having with sts is im tyring to link to custom category templates from my menu. My menu is made using javascript due to the expanding submenus etc.... When i use the $urlcat_122 as the link in the javascript, it only links to the category template when the javascript is in the actual template the menu is on. When i try using an external .js file the link does not work. Is there a way to get this to work using an external .js file as there is quite a lot of javascript which i dont really want to include in the template files. Many thanks Lee, First off, I wouldn't use the $urlcat tag as it is a resource hog and it left over from the early days of STS. A better way would be to make a direct link as so: STS Link to a category: <a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a> Also, regarding the extra javascript files... There are a couple ways of doing this: $extracss You can use this placeholder if you want to dynamically add something in the html header, like an extra css file or external JavaScript file to load, depending on the page viewed. How to Use: place <!--$extracss--> between <head> and </head> of your template. It is important to keep the comment chars before and after $extracss, otherwise it won't work. Code example: simple example to dynamically add a stylesheet to the template. This stylesheet is located in the same folder as the template itself. This code can be placed in includes/modules/sts_inc/sts_user_code.php for example.$sts->template['extracss'].= '<link rel="stylesheet" type="text/css" href="' . STS_TEMPLATE_DIR .'stylesheet2.css">'; Create a STS module for it: See Post #4608 in this thread: http://www.oscommerce.com/forums/index.php?s=&...t&p=1343201 Hope this helped you out, 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...
Guest Posted January 2, 2009 Share Posted January 2, 2009 Yes, this is the correct thread to ask STS related questions. If you ask outside of this thread, you will end up with answers like the one you got above. STS already comes with a pre-defined tag that will do exactly what you are wanting (see the STS User Manual for a list of all of the pre-defined tags and what they do). See post# 4631 just a few posts up from yours. Hi, thanks for the reply. Il use this post for future support. I did consider the $logoff and $myaccountlogoff tags however they dont do exactly what im after. Rather than the having my account when the user is logged out and then my account | log off when the user is logged in, im after my account | login and then my account | logoff. The $loginofflogo tag sounds perfect however i need it to be text links rather than images. Is there a way to do this? Many thanks. Quote Link to comment Share on other sites More sharing options...
Guest Posted January 2, 2009 Share Posted January 2, 2009 Lee, First off, I wouldn't use the $urlcat tag as it is a resource hog and it left over from the early days of STS. A better way would be to make a direct link as so: STS Link to a category: <a href="<?php echo tep_href_link('index.php', 'cPath=21&', 'NONSSL'); ?>">Category Name Here</a> Also, regarding the extra javascript files... There are a couple ways of doing this: $extracss You can use this placeholder if you want to dynamically add something in the html header, like an extra css file or external JavaScript file to load, depending on the page viewed. How to Use: place <!--$extracss--> between <head> and </head> of your template. It is important to keep the comment chars before and after $extracss, otherwise it won't work. Code example: simple example to dynamically add a stylesheet to the template. This stylesheet is located in the same folder as the template itself. This code can be placed in includes/modules/sts_inc/sts_user_code.php for example.$sts->template['extracss'].= '<link rel="stylesheet" type="text/css" href="' . STS_TEMPLATE_DIR .'stylesheet2.css">'; Create a STS module for it: See Post #4608 in this thread: http://www.oscommerce.com/forums/index.php?s=&...t&p=1343201 Hope this helped you out, Hi, thanks again, The code for my menu is as follows: <div id="menu"> <img style="position:absolute; top:0px; left:0px;" src="$templatedir/images/menu/menu_top.jpg" /> <script type="text/javascript" src="http://www.game101.co.uk/includes/sts_templates/test/data.js"></script> <img style="position:absolute; bottom:0px; left:0px;" src="$templatedir/images/menu/menu_bottom.jpg" /> </div><!--menu end--> As you can see the link to the external .js file is not in the head it is in the actual content of the page. Does this mean it is not possible to get it to work? Also the javascript code that links to the categories is as follows: ["DS","", "", "", "", "", "", "0", "", "", ], ["|View All","http://www.game101.co.uk/ds/all.html", "", "", "", "", "", "12", "", "", ], ["|Action","http://www.game101.co.uk/ds/action.html", "", "", "", "", "", "12", "", "", ], ["|Activity","http://www.game101.co.uk/ds/activity.html", "", "", "", "", "", "12", "", "", ], ["|Adventure","http://www.game101.co.uk/ds/adventure.html", "", "", "", "", "", "12", "", "", ], ["|Classic","http://www.game101.co.uk/ds/classic.html", "", "", "", "", "", "12", "", "", ], ["|Fighting","http://www.game101.co.uk/ds/fighting.html", "", "", "", "", "", "12", "", "", ], ["|Hardware","http://www.game101.co.uk/ds/hardware.html", "", "", "", "", "", "12", "", "", ], ["|Platform","http://www.game101.co.uk/ds/platform.html", "", "", "", "", "", "12", "", "", ], ["|Point and Click","http://www.game101.co.uk/ds/pointclick.html", "", "", "", "", "", "12", "", "", ], ["|Puzzle","http://www.game101.co.uk/ds/puzzle.html", "", "", "", "", "", "12", "", "", ], ["|Racing","http://www.game101.co.uk/ds/racing.html", "", "", "", "", "", "12", "", "", ], ["|Role Playing","http://www.game101.co.uk/ds/roleplaying.html", "", "", "", "", "", "12", "", "", ], ["|Sport","http://www.game101.co.uk/ds/sport.html", "", "", "", "", "", "12", "", "", ], ["|Strategy","http://www.game101.co.uk/ds/strategy.html", "", "", "", "", "", "12", "", "", ], Please could you tell me how to intergrate the link into that. Thanks so much your help is really appreciated! Top Man! 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.