dehuszar Posted February 2, 2007 Posted February 2, 2007 Sam, I do not recommend putting the SESSIONID in the link. You should just follow the guidelines as posted in that knowledge base article. Also, you can include PHP code in your STS template which is one of the reasons STS is so simple to use with osCommerce. :thumbsup: One way I take advantage of this is using the PHP include statement so that I can have one header.php.html and one footer.php.html template for all of my pages in my site. :thumbsup: So far so good. I'll have to replace all my links with this method... which is a bit of a pain. But overall less of a pain than it not working. :) Note to all who aren't php geniuses. When using these tep_href_link php anchors with javascript (like mouseovers etc.) be sure to use escape characters where javascript requires single quotes. An example from the site I'm working on.... <?php echo '<p><a href="' . tep_href_link('product_info.php', 'cPath=1&products_id=29') . '" onmouseover="changeImages(\'nav_longsleeve\', \'images/nav_longsleeve-over.gif\'); return true;" onmouseout="changeImages(\'nav_longsleeve\', \'images/nav_longsleeve.gif\'); return true;"><img src="images/nav_longsleeve.gif" alt="Long Sleeve Tees" name="nav_longsleeve" width="143" height="24" border="0"></a></p>'; ?> If you notice the backslashes before the single quotes, those are necessary, otherwise the php parser will think you are closing the string statement. The JavaScript parser will then get really confused and not behave properly. Just a heads up. Also, I thought I'd quickly bump one of my previously unanswered question. I hope no one minds... If I wanted to layout the $content materials for all of the account_edit, account_history, account_newsletters, etc. so that it adheres to custom css, would I have to go through and manually make $variables for each field and each piece of text in each of those pages? If so, has anyone done this already? If yes, can they share their sts_user_code.php? I'd hate to reinvent this particular wheel. I know from previous responses that they'd end up in the /content/ folder, I just want to make sure I know what I have to do before I start trying to move mountains. Thanks again for everyone's help. Sam Quote
Guest Posted February 2, 2007 Posted February 2, 2007 Basically that's the idea about the content templates. You must create a module for each page that uses content template. This module takes care of finding the right template and content template. Check the product info module for example. Then you need an extra file where all the $ variables are defined. Quote
star8 Posted February 2, 2007 Posted February 2, 2007 Hi! I am using the sts pack v4.3.2 . I can see the HTC : page control, text control, fill tags on the admin side. But now I come to see on file manager, under folder catalog/admin that the HT_C, HT_english, HT_fill_tags, and HT_popup_fills has mods only for user > read and write, and for groups and others> read. Should'nt the execute mod be turned on to user, groups and others? Thanks! :rolleyes: Quote
Iggy Posted February 2, 2007 Posted February 2, 2007 Hey there Rigadin and Bill, Just got through upgrading to 4.4 and it works extra nice :thumbsup: As always thanks for your work on this. I have a quick question on the procedure for integrating something like ultrapics into the popup template; as in how might that be done (in broad terms). Ultrapics adds this bit of code to the popup html to iterate through the various options. <?php if ($_GET['image'] ==0) { echo tep_image(DIR_WS_IMAGES . $products['products_image_lrg'], $products['products_name']); } elseif ($_GET['image'] ==1) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_1'], $products['products_name']); } elseif ($_GET['image'] ==2) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_2'], $products['products_name']); } elseif ($_GET['image'] ==3) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_3'], $products['products_name']); } elseif ($_GET['image'] ==4) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_4'], $products['products_name']); } elseif ($_GET['image'] ==5) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_5'], $products['products_name']); } elseif ($_GET['image'] ==6) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_6'], $products['products_name']); } elseif ($_GET['image'] ==7) { echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); } ?> Any tips on capturing this in STS? I'm hoping it's obvious and it's just too early in the morning :rolleyes: Thanks, Iggy Quote Everything's funny but nothing's a joke...
Guest Posted February 2, 2007 Posted February 2, 2007 Hello Iggy, I have done something related to popup and extra images (More Pics 6 + ACA). It won't work out of the box for you but it's a good start. It adds Next and Previous buttons to go through the images. Check the STS Power Pack contribution (link in my signature). - Rigadin Quote
StormIT Posted February 2, 2007 Posted February 2, 2007 Hello all, I've just updated my site with STS v4 and getting the following on the first page: "Fatal error: Call to a member function on a non-object in /home/fhlinux176/s/seasonsofkent.com/user/htdocs/catalog/includes/functions/html_output.php on line 78" This is on www.seasonsofkent.com/catalog This is the code in question: 76 // START STS v4.4: 77 global $sts; 78 $sts->image($src); // Take image from template folder if exists. 79 // END STS v4.4 Please help! Quote
JGreenlees Posted February 2, 2007 Posted February 2, 2007 I have installed STS 4.4 on a clean install No mods besides this. Settings: Default template (v2.0.0) Use Templates? true Code for debug output debug Files for normal template sts_user_code.php Base folder includes/sts_templates/ Template folder full Default template file sts_template.html Use template for infoboxes true Index template (v2.0.0) Use template for index page true Files for index.php template sts_user_code.php Check parent templates true Product info templates and content templates (v2.0.0) Use template for product info page true Enable STS3 compatibility mode true Files for normal template sts_user_code.php Files for content template sts_user_code.php;product_info.php site I am working on is here: http://midwayproductions.com/oscom/ Problem: The $content tag is not showing up no matter what I do. Can someone explain in clear english (i am blond sooooo :) ) What i need to do to get this working? Thanks JG Quote
star8 Posted February 2, 2007 Posted February 2, 2007 Hi I updated my STS V4.3.3 to V4.4. But I got this message on top of the heading inside the body of my website. Template file does not exist: [MODULE_STS_TEMPLATES_FOLDER full/index.php.html]. What did I do wrong? Any suggestions will be appreciated. Thanks! :rolleyes: Quote
star8 Posted February 2, 2007 Posted February 2, 2007 Hi! This is in accordance to the message I posted before this. I think I know what's the problem. Under the default, I am lacking the field "Base folder", I can see only the box without the text on top. What did I miss doing? I copied only files under "new files" and I checked it again. Thanks! Quote
Iggy Posted February 2, 2007 Posted February 2, 2007 Hi! This is in accordance to the message I posted before this. I think I know what's the problem. Under the default, I am lacking the field "Base folder", I can see only the box without the text on top. What did I miss doing? I copied only files under "new files" and I checked it again. Thanks! Ran into that. Since the base folder is a new db item, uninstall the module in the admin then reinstall it and it will populate the db. HTH, Iggy Quote Everything's funny but nothing's a joke...
bkellum Posted February 2, 2007 Posted February 2, 2007 I have installed STS 4.4 on a clean install No mods besides this. Settings: Default template (v2.0.0) Use Templates? true Code for debug output debug Files for normal template sts_user_code.php Base folder includes/sts_templates/ Template folder full Default template file sts_template.html Use template for infoboxes true Index template (v2.0.0) Use template for index page true Files for index.php template sts_user_code.php Check parent templates true Product info templates and content templates (v2.0.0) Use template for product info page true Enable STS3 compatibility mode true Files for normal template sts_user_code.php Files for content template sts_user_code.php;product_info.php site I am working on is here: http://midwayproductions.com/oscom/ Problem: The $content tag is not showing up no matter what I do. Can someone explain in clear english (i am blond sooooo :) ) What i need to do to get this working? Thanks JG Hello JG, I know you mentioned this is a store with no other contributions installed but is it really a clean osC? For example, did you comment out any code in the index.php file regarding column_left or column-right? Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
Iggy Posted February 3, 2007 Posted February 3, 2007 Hey there Rigadin and Bill, Just got through upgrading to 4.4 and it works extra nice :thumbsup: As always thanks for your work on this. I have a quick question on the procedure for integrating something like ultrapics into the popup template; as in how might that be done (in broad terms). Ultrapics adds this bit of code to the popup html to iterate through the various options. <?php if ($_GET['image'] ==0) { echo tep_image(DIR_WS_IMAGES . $products['products_image_lrg'], $products['products_name']); } elseif ($_GET['image'] ==1) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_1'], $products['products_name']); } elseif ($_GET['image'] ==2) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_2'], $products['products_name']); } elseif ($_GET['image'] ==3) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_3'], $products['products_name']); } elseif ($_GET['image'] ==4) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_4'], $products['products_name']); } elseif ($_GET['image'] ==5) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_5'], $products['products_name']); } elseif ($_GET['image'] ==6) { echo tep_image(DIR_WS_IMAGES . $products['products_image_xl_6'], $products['products_name']); } elseif ($_GET['image'] ==7) { echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); } ?> Any tips on capturing this in STS? I'm hoping it's obvious and it's just too early in the morning :rolleyes: Thanks, Iggy Thanks Rigadin for the heads up on the power pack. Just in case anyone out there is using Ultrapics here's some code that works for /includes/modules/sts_inc/popup_image.php. <?php // Ultrapics mods $products_query = tep_db_query("select pd.products_name, p.products_image, p.products_image_lrg, p.products_image_xl_1, p.products_image_xl_2, p.products_image_xl_3, p.products_image_xl_4, p.products_image_xl_5, p.products_image_xl_6 from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$_GET['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'"); $products = tep_db_fetch_array($products_query); $sts->template['productname'] = $products['products_name']; $sts->template['productmodel'] = $products['products_model']; if ($_GET['image'] ==0) { $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_lrg'],'','','', 'name="prodimage"'); } elseif ($_GET['image'] ==1) { $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_1'],'','','', 'name="prodimage"'); } elseif ($_GET['image'] ==2) { $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_2'],'','','', 'name="prodimage"'); } elseif ($_GET['image'] ==3) { $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_3'],'','','', 'name="prodimage"'); } elseif ($_GET['image'] ==4) { $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_4'],'','','', 'name="prodimage"'); } elseif ($_GET['image'] ==5) { $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_5'],'','','', 'name="prodimage"'); } elseif ($_GET['image'] ==6) { $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image_xl_6'],'','','', 'name="prodimage"'); } elseif ($_GET['image'] ==7) { $sts->template['popupimage'] = tep_image(DIR_WS_IMAGES . $products['products_image'],'','','', 'name="prodimage"'); } ?> Dead simple. Really have to start in on these things before 2am. :rolleyes: Hope this comes in handy for someone else and thanks! Iggy Quote Everything's funny but nothing's a joke...
rumi Posted February 3, 2007 Posted February 3, 2007 Does anyone know if STSv4.3.3 works with the Virtual Mall contribution? Quote
star8 Posted February 4, 2007 Posted February 4, 2007 Hi! This is the more specific detailed problem. I have been mailing this problem, I guess nobody really understands the problem. Product name not showing after entering at product title tag at meta tag information. Under catalog at admin side: Press New product > Meta tag information: Product title tag: Product Description Tag: Product Keywords Tag: After entering these tags, press preview, preview shows the product description, the picture, ID. Then update, showing a picture with product Id but not the product name. At the website, the pictures is showing and only the price showing under it, without the product name. When pressed on the product to have more product info, the product name still does'nt show and the header *breadcrumbs" points to product ID. Now what's going on here. Where is the product name? It's been a week trying to solve this problem. Hopefully somebody can tell. Thanks! Quote
Guest Posted February 5, 2007 Posted February 5, 2007 Just one note: the title/information/keywords tags have nothing to do with the display of the product name. These tags are placed in the header of the page so Google and other crawles can read them, but they are never display to customers. Product name is one of the first field in the product editor: have you fill it? If yes but it does not appear in the preview, then you have a problem in admin/categories.php. If it's not in the preview, it won't be in database and won't be on your product info page. - Rigadin Quote
stubob65 Posted February 6, 2007 Posted February 6, 2007 Hi can anyone help please, I'm having a problem enabling STS 4.4. I seem to have installed it successfully, in admin under module is the STS link and when I click on it I have four modules, so far so good. But, when I install any of the module and change the parameters after updating there are no changes and it always reverts back to the default setting ie the default in Use Templates? is always false An ideas what I’ve done wrong? many thanks Stu Quote
bkellum Posted February 6, 2007 Posted February 6, 2007 Hi can anyone help please, I'm having a problem enabling STS 4.4. I seem to have installed it successfully, in admin under module is the STS link and when I click on it I have four modules, so far so good. But, when I install any of the module and change the parameters after updating there are no changes and it always reverts back to the default setting ie the default in Use Templates? is always false An ideas what I’ve done wrong? many thanks Stu Hello my friend, Try this: Go to the STS Contribution download page and download the STS osCommerce 060817 module patch. I know that it says it is for STS 4.2 and 4.3 but it will also help you out with 4.4. Hope this helped you out, Bill Kellum Quote Bill Kellum Sounds Good Productions STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE
artico Posted February 6, 2007 Posted February 6, 2007 (edited) Hi I'm still having the same prob :( :'( javascript error when trying to popup a window. this is the source of the product page as it shows on the store it starts like this: <html dir="LTR" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Store</title><base href="store/catalog/"> <!-- start get_javascript(applicationtop2header) //--> <!-- end get_javascript(applicationtop2header) //--> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0"> and this is the popup part: <script language="javascript"><!-- document.write('<a href="java script:popupWindow(\'store/catalog/popup_image.php?pID=33\')"><img src="images/gold_1.jpg" border="0" alt="Gold 1" title=" Gold 1 " width="100" height="80" hspace="5" vspace="5"><br>Click to enlarge</a>'); //--></script> <noscript> my guess is that something is wrong with the header cus' it showes the start get (javascript) and the end get (javascript), line after like and not including the body between those lines. I just dont know how to fix this or where to look for, my header have this code in it: <?php /* $Id: header.php,v 1.42 2003/06/10 18:20:38 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions [url=http://www.oscommerce.com]http://www.oscommerce.com[/url] Copyright © 2003 osCommerce Released under the GNU General Public License */ // START STS 4.1 $sts->restart_capture ('applicationtop2header'); // Capture header from the actual script, needed to take out javascript // END STS 4.1 and i dont know if its wrong or not any idea ? Tnx :rolleyes: Edited February 6, 2007 by artico Quote
Guest Posted February 6, 2007 Posted February 6, 2007 Look the page in debug mode (add sts_debug=debug in the URL) and scroll down the page until you see what is inside the applicationtop2header placeholder. There should be some js code. No? Quote
banGbro Posted February 6, 2007 Posted February 6, 2007 (edited) deleted by author Edited February 6, 2007 by banGbro Quote
banGbro Posted February 6, 2007 Posted February 6, 2007 For some reason Im getting extract space between shopping car & reviews info boxes. :'( Why is this? http://www.agcssautomotive.com/shop/ Quote
artico Posted February 7, 2007 Posted February 7, 2007 Look the page in debug mode (add sts_debug=debug in the URL) and scroll down the page until you see what is inside the applicationtop2header placeholder. There should be some js code. No? Hi rigadin2 here is the code as shown in the debug mode, there is no js code between those lines, any suggestions ? $sts->template['headcontent']<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Mstudio</title><base href="http://www.mstudio.co.il/store/catalog/"> <!-- start get_javascript(applicationtop2header) //--> <!-- end get_javascript(applicationtop2header) //--> Quote
artico Posted February 7, 2007 Posted February 7, 2007 Never mined my last topic, I got it fixed :lol: I had those lines in the wrong place (header.php file) // START STS 4.1 $sts->restart_capture ('applicationtop2header'); // Capture header from the actual script, needed to take out javascript // END STS 4.1 Quote
otherworld Posted February 7, 2007 Posted February 7, 2007 I'm brand new to OSC, STS and coding in general so please excuse my general ignorance. A friend of mine designed a web template for an old site I was working on and I want to use it for my store. I was hoping I could simply upload the HTML and CSS files, add in the STS codes for OSC content and make any further adjustments as needed. But that doesn't work. What can I do to keep the styling of my old site in OSC? Quote
sosij Posted February 7, 2007 Posted February 7, 2007 Thank you, this was just what I was looking for as well! In catalog/includes/classes/sts.php, find the following code: // If script name contains "popup" then turn off templates and display the normal output // This is required to prevent display of standard page elements (header, footer, etc) from the template and allow javascript code to run properly // Do not add pages here unless it is from the standard osC and really should be there. If you have a special page that you don't want with template, // Create a module sts_mypagename.php that returns an empty string as template filename, it will automatically switch off STS for this page. if (strstr($scriptbasename, "popup")|| strstr($scriptbasename, "info_shopping_cart")) { $this->display_template_output = false; return; } Add the additional scriptname that you need STS to ingore so it will not add the header, footer, etc. For example: Your code would end up looking like this if you wanted STS to ignore the login.php script file: if (strstr($scriptbasename, "popup")|| strstr($scriptbasename, "login")|| strstr($scriptbasename, "info_shopping_cart")) { $this->display_template_output = false; return; } You can also add any other filenames if needed. Hope this has helped, Bill Kellum Quote
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.
Note: Your post will require moderator approval before it will be visible.