ACE99 Posted June 12, 2004 Share Posted June 12, 2004 Using session ID's with STS and creating links: To keep the session ID, add it to the end of any link using the $sid variable, like this: http://www.domyownpestcontrol.com/index.php?$sid or like this if the link is going to a product page: http://www.mywebsite.com/product_info.php/cPath/1/products_id/44?$sid or like this if you want to link to a category page: http://www.mywebsite.com/index.php/cPath/1?$sid **The session id always comes after the "?". You can also use these variables in STS to link to categories: $urlcat_XX (where XX is the name of the category or the number (ID) of the category). In this case the $sid is included automatically. Quote Link to comment Share on other sites More sharing options...
eTiMaGo Posted June 12, 2004 Share Posted June 12, 2004 (edited) Double post.. Bad Opera! :rolleyes: Edited June 12, 2004 by eTiMaGo Quote Link to comment Share on other sites More sharing options...
eTiMaGo Posted June 12, 2004 Share Posted June 12, 2004 Hi everyone, I've read through this thread for the past few hours trying to figure this out, managed to solve a couple problems, but still stuck on one thing, I cannot get the product_info template to work. I basically used the same HTML template as the main template, but replaced $content with the contents of that area from the sample template, so the extra text would show up. But nothing does... the default template works fine, but the product information is still stuck as the default... this is my template: <HTML> <HEAD> <!--$headcontent--> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </HEAD> <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 > <table border="0" width="775" id="table3" cellspacing="0" align=center> <tr> <td colspan="4" background="images/main.jpg" height="126" align="left" valign="bottom"> <p><font size="1" face="Arial, Helvetica, sans-serif"> $date</font></td> </tr> <tr> <td colspan="4" background="images/sts_template_02.gif" height="40"> <div align="center"> <table border="0" width="92%" id="table4" cellspacing="0" cellpadding="0"> <tr> <td width="447"> <font size="1" face="Arial, Helvetica, sans-serif"> $breadcrumbs</font></td> <td> <p align="right"><font size="1" face="Arial, Helvetica, sans-serif"> $myaccountlogoff | $cartcontents | $checkout</font></td> </tr> </table> </div> </td> </tr> <tr> <td width="141" bgcolor="#B8BECE" valign="top"> <p align="center"> <font size="5" color="#FFFFFF" face="Lucida Console">Main Menu<br> </font><font size="1" face="Arial, Helvetica, sans-serif">$categorybox</font><p align="center"><font size="1" face="Arial, Helvetica, sans-serif"> $whatsnewbox</font></p> <p align="center"><font size="1" face="Arial, Helvetica, sans-serif">$searchbox</font></p> <p align="center"> <font size="1" face="Arial, Helvetica, sans-serif">$cartbox</font></p> <p align="center"> <font size="1" face="Arial, Helvetica, sans-serif">$bestsellersbox</font></p> <p align="center"><font size="1" face="Arial, Helvetica, sans-serif">$orderhistorybox</font></p> <p align="center"> <font size="1" face="Arial, Helvetica, sans-serif">$currenciesbox</font></p> <p align="center"><font size="1" face="Arial, Helvetica, sans-serif"> $informationbox</font></td> <td width="9" valign="top"> </td> <td width="568" valign="top"> <p>$content <p> </td> <td width="51" valign="top"> <p> </td> </tr> <tr> <td colspan="4" height="15" valign="bottom" background="images/footer.gif"> <p align="center"> <font size="1"><font color="#FFFFFF"> </font><font face="Arial, Helvetica, sans-serif"><font color="#FFFFFF">Copyright 2004 ThaiDVD. Powered by </font><a href="http://www.oscommerce.com"><font color="#FFFFFF">osCommerce</font></a><font color="#FFFFFF">. Simple Template System by </font><a href="http://www.diamondsea.com"><font color="#FFFFFF">DiamondSea.com</font></a></font></font></td> </tr> </table> </div> </BODY> </HTML> and this is the testing product_info.php.html file in the sts_templates directory: <HTML> <HEAD> <!--$headcontent--> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </HEAD> <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 > <table border="0" width="775" id="table3" cellspacing="0" align=center> <tr> <td colspan="4" background="images/main.jpg" height="126" align="left" valign="bottom"> <p><font size="1" face="Arial, Helvetica, sans-serif"> $date</font></td> </tr> <tr> <td colspan="4" background="images/sts_template_02.gif" height="40"> <div align="center"> <table border="0" width="92%" id="table4" cellspacing="0" cellpadding="0"> <tr> <td width="447"> <font size="1" face="Arial, Helvetica, sans-serif"> $breadcrumbs</font></td> <td> <p align="right"><font size="1" face="Arial, Helvetica, sans-serif"> $myaccountlogoff | $cartcontents | $checkout</font></td> </tr> </table> </div> </td> </tr> <tr> <td width="141" bgcolor="#B8BECE" valign="top"> <p align="center"> <font size="5" color="#FFFFFF" face="Lucida Console">Main Menu<br> </font><font size="1" face="Arial, Helvetica, sans-serif">$categorybox</font><p align="center"><font size="1" face="Arial, Helvetica, sans-serif"> $whatsnewbox</font></p> <p align="center"><font size="1" face="Arial, Helvetica, sans-serif">$searchbox</font></p> <p align="center"> <font size="1" face="Arial, Helvetica, sans-serif">$cartbox</font></p> <p align="center"> <font size="1" face="Arial, Helvetica, sans-serif">$bestsellersbox</font></p> <p align="center"><font size="1" face="Arial, Helvetica, sans-serif">$orderhistorybox</font></p> <p align="center"> <font size="1" face="Arial, Helvetica, sans-serif">$currenciesbox</font></p> <p align="center"><font size="1" face="Arial, Helvetica, sans-serif"> $informationbox</font></td> <td width="9" valign="top"> </td> <td width="568" valign="top"> <p>Formatted variables go here:<br> $startform Regular Price: $regularprice<br> Special Price: $specialprice<br> Product Name: $productname<br> Product Model: $productmodel<br> Image Small: $imagesmall<br> Image Large: $imagelarge<br> Product Desc: $productdesc<br> Option Header: $optionheader<br> <table border=1 id="table5"><tr><td>Option Names:</td><td>Option Choices</td></tr> <tr><td> $optionnames </td><td> $optionchoices </tr></table> Reviews: $reviews<br> Reviews Link:<br> MoreInfo Label: $moreinfolabel<br> MoreInfo URL: <a href=sts_templates/$moreinfourl>$moreinfourl</a><br> ProductDate Label: $productdatelabel<br> ProductDate: $productdate<br> Reviews URL: <a href=sts_templates/$reviewsurl>$reviewsurl</a><br> Reviews Button: $reviewsbutton<br> AddToCart Button: $addtocartbutton<br> Using any image (such as the logo) as an AddToCart button: <input type=image src="sts_templates/images/oscommerce.gif" name="I1"><p> <p> </td> <td width="51" valign="top"> <p> </td> </tr> <tr> <td colspan="4" height="15" valign="bottom" background="images/footer.gif"> <p align="center"> <font size="1"><font color="#FFFFFF"> </font><font face="Arial, Helvetica, sans-serif"><font color="#FFFFFF">Copyright 2004 ThaiDVD. Powered by </font><a href="http://www.oscommerce.com"><font color="#FFFFFF">osCommerce</font></a><font color="#FFFFFF">. Simple Template System by </font><a href="http://www.diamondsea.com"><font color="#FFFFFF">DiamondSea.com</font></a></font></font></td> </tr> </table> </div> </BODY> </HTML> Don't mind the stylesheet link in the HEAD, it was the only way I could get it to work :wacko: the only other catalog modification I am using is the image_resize version 1.5, but I do not see how that could affect it... Sorry I don't have a live shop to show, I am doing this on PHPtriad on my PC. So if anyone has any insight, it will be greatly appreciated! :lol: Quote Link to comment Share on other sites More sharing options...
byps Posted June 12, 2004 Share Posted June 12, 2004 Hi Philip, many. many thanks for your quick and helpful answer. Seems I?m getting closer to solve my problem ! I?d like to ask some further questions: My links are inside the sts-templates and they look at the moment like this: index.php?cPath=36_38 (for a categorie and I use this page for other purpose). For the index.php for example, I think I have to to put it like this: index.php?$sid. But how to overcome with a cPath ? Moving with the curser on the link it shows the ID. But after klicking and entering the new page the session ID is gone. Do I to set the link in another way ? (It?s working as long as I?m not leaving to a cPath !) ---------------------------------------------------------------- Another subject is the $urlcat_XX_YY. To link like you see here is not working because I get the error: "session_start(): The session id contains invalid characters, valid characters are only a-z, A-Z and 0-9 in C:\apache\htdocs\catalog\includes\functions\sessions.php on line 67" and this is how it looks like in the adress of the browser: http://localhost/catalog/index.php?cPath=33&osCsid=7154ccec9fb1e600486d732a2c7556b9_41 Do you have any ideas about my questions ? best regards from cologne-Germany Rolf Quote Link to comment Share on other sites More sharing options...
byps Posted June 12, 2004 Share Posted June 12, 2004 @etiMaGo, Hi Thomas, are sure to add all lines to the different files ? Normally there shouldn?t be a problem if you did it 100%. I?m running poduct_info.php and it?s working great. byps Quote Link to comment Share on other sites More sharing options...
byps Posted June 12, 2004 Share Posted June 12, 2004 @ Philip, if I use it like: index.php/cPath/XX?$sid I only get the index page. Rolf Quote Link to comment Share on other sites More sharing options...
kkkqqq Posted June 13, 2004 Share Posted June 13, 2004 I have STS installed on MS2.2. It works great on anything. Except when I enable low order fee for the admin/module/order total, the low order fee did not kick in. Is STS do anything which effect the low order fee to function? Thanks. Anybody would test the "low order fee" from the admin area (admin/module/total order) from your site. Let me know if it will work or not. Please help me to square this out. Thank you in advance. Quote Link to comment Share on other sites More sharing options...
rajeevk Posted June 13, 2004 Share Posted June 13, 2004 I read through as many posts on this topic as I could and still didn't find an answer: When I use $content in template page it does not display anything. Looking at the source code, not code for the content section was inserted. Has anyone had this problem? Thanks Quote your source for custom hand-knotted rugs from Nepal. A part of family of companies. Link to comment Share on other sites More sharing options...
eTiMaGo Posted June 13, 2004 Share Posted June 13, 2004 Well, I managed to work around my problem by just manually editing the product_info.php... I had to add some new information fields anyway, and the result does not look too bad... It'll do! Quote Link to comment Share on other sites More sharing options...
byps Posted June 13, 2004 Share Posted June 13, 2004 (edited) @ Brian ( Diamond Sea) Hi Brian, The following line is shown in my browser after using the $urlcat_33_41 template: http://localhost/catalog/index.php?cPath=33&osCsid=5b431942e3ccdd0238536f7c051c140b_41 ( and of course a parse error) What can I do to fix it and to use this categorie link to get to such a deep categorie ? thanks in advance byps Edited June 13, 2004 by byps Quote Link to comment Share on other sites More sharing options...
byps Posted June 13, 2004 Share Posted June 13, 2004 @ ACE99 hI; Did you also try to use the $urlcat_XX_YY (a deeper cPath) and does it work ? Rolf Quote Link to comment Share on other sites More sharing options...
Guest Posted June 13, 2004 Share Posted June 13, 2004 I posted this before but I have not gotten any help... any ideas on this one... I've tried several things but none have had any success. ----------------------------------------------------------------------------------------------- Great Template System... Seems to work great on the index.php page but when I click on something like 'My Account' the template "explodes". Heres an example... www.golfsbestdeal.com/wed (this is my testing site). (And yes I know it looks like crap right now just trying to get sts working correctly) Click on the above link then click on 'my account'... Can anyone direct me to the answer? I installed the latest version of sts and I'm only using 1 template. Thanks in advance! Quote Link to comment Share on other sites More sharing options...
chrisstylez Posted June 14, 2004 Share Posted June 14, 2004 ////SPECIAL PRICE/// does any one have an idea of how to get the same effect from a special price as on the default product info page. Regular Price $0.00 (strikethrough) Special Price $0.00 for some reason I am unable to create that output, especially in the template itself. becuase if I add Special Price it will remain there even if there isnt a special price. If someone knows that Im talking about. Please respond TIA :-) Quote Link to comment Share on other sites More sharing options...
byps Posted June 14, 2004 Share Posted June 14, 2004 I posted this before but I have not gotten any help... any ideas on this one... I've tried several things but none have had any success. ----------------------------------------------------------------------------------------------- Great Template System... Seems to work great on the index.php page but when I click on something like 'My Account' the template "explodes". Heres an example... www.golfsbestdeal.com/wed (this is my testing site). (And yes I know it looks like crap right now just trying to get sts working correctly) Click on the above link then click on 'my account'... Can anyone direct me to the answer? I installed the latest version of sts and I'm only using 1 template. Thanks in advance! Hi, tried your site but everything went OK ! I also installed an account (Rolf Schmitz) and got forward until the last process in buying... So what?s your problem ? byps Quote Link to comment Share on other sites More sharing options...
ACE99 Posted June 14, 2004 Share Posted June 14, 2004 @ ACE99 hI; Did you also try to use the $urlcat_XX_YY (a deeper cPath) and does it work ? Rolf Rolf - I tried it but I can't get it to work either. I know how to jump to the page, for example using a link like: http://www.mywebsite.com/index.php/cPath/1_34? (if the subcategory were 34, under main category 1) which works, but then all the links on that page going elsewhere are messed up. I don't have an answer yet. Anyone else? Quote Link to comment Share on other sites More sharing options...
byps Posted June 14, 2004 Share Posted June 14, 2004 Philip, which works, but then all the links on that page going elsewhere are messed up. I don't have an answer yet. Anyone else? Think I solved the problem. If you stay inside the site you can use the link as follows: "index.php?cPath=33_41&$sid" (with &$sid you get the session id) or <a href="product_info.php?products_id=37"><link> So far in my site it works 100% and nothing is mixed up ore lost. The $urlcat seems to have a bug.... Would be interesting if it?s also working in your site :-) rolf Quote Link to comment Share on other sites More sharing options...
tayl1684 Posted June 14, 2004 Share Posted June 14, 2004 Hi all Installed this excellent contribution some time ago and its both powerfull and easy to use, wanted to say thanks to the contributor. While im here though, anyone know why it leaves a gap when a particular infobox is not bieng displayed by oscommerce, Like so: When all the Infoboxes are visable there is only the standard gap, have played around with the sts template endlessly and cannot get rid of it. Any ideas??? Thanks in advance Ian Quote Link to comment Share on other sites More sharing options...
DVBHardware Posted June 15, 2004 Share Posted June 15, 2004 Did you use a Paragraph return between $whatsnewbox and $reviewsbox instead of non break space ?? Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
chrisstylez Posted June 15, 2004 Share Posted June 15, 2004 i think its just a simple problem with the way you have the tables setup, instead of using different cells within a table you should use different tables all together. this way the content of one cell wont cuase the entire table to stretch. I hope you understand what I mean by this. If not just holla maybe i can help, chris@chrisstylez.com Quote Link to comment Share on other sites More sharing options...
tayl1684 Posted June 15, 2004 Share Posted June 15, 2004 (edited) Cheers for your reply's, Am using (I think) paragraph returns like so: $whatsnewbox<br>$maninfobox<br> $bestsellersbox<br> $reviewsbox<br> $specialfriendbox<br> Do I Want to get rid of the <br>? Also I've not tried putting them in seperate cells or tables (I figured since it was'nt like that in the original template I would'nt need to). So I'll give that a try later. While I'm on the subject does STS cause a problem with putting images on the footer of an infobox. I've added this to the box files: </td></tr> <TR> <TD> <IMG SRC="images/info_box_right_shadow.gif" WIDTH=100% HEIGHT=13></TD> </TR> Which is supposed to work. But nothing shows up. Thanks again for your help. Ian Edited June 15, 2004 by tayl1684 Quote Link to comment Share on other sites More sharing options...
Guest Posted June 15, 2004 Share Posted June 15, 2004 (edited) Justa quick problem I seem to be having at http://www.elwynsbits.co.uk/basic if you click on products and go into product info the tables all go to pot, any idea where this is comin from or how to fix it plz, I have master products installed could it be this? regards, thx for any help. :D Edited June 15, 2004 by j0ker Quote Link to comment Share on other sites More sharing options...
DVBHardware Posted June 15, 2004 Share Posted June 15, 2004 I think you have this problem is because the way your tables are nested, I spent 2 days on mine to get it correct Quote I'm not a coder just a splicer. Link to comment Share on other sites More sharing options...
Guest Posted June 15, 2004 Share Posted June 15, 2004 Point me plz to where it may be fixed. Quote Link to comment Share on other sites More sharing options...
kylef Posted June 16, 2004 Share Posted June 16, 2004 Hi I can't get the $banner string to work. The banner doesn't show, but in admin the banner control counts views on the banner. The site is http://www.trafikknett.com/demo and this is the standard layout nothing is changed. Quote Link to comment Share on other sites More sharing options...
mark27uk3 Posted June 16, 2004 Share Posted June 16, 2004 Hi Guys, I have just installed sts and I would like to know how I can incorporate this contrib Login Box v5.4 in header I have tried cutting and pasting the code into the header.php but nothing gets displayed. Can anyone help me on this one? Thanks in advance Mark Quote Lifes a bitch, then you marry one, then you die! 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.