Guest Posted January 16, 2006 Share Posted January 16, 2006 ...Now another question: how can I use meta tags within this STS, I tried some dynamic things but didn't get it to work and even with the standard <title>Test</title> in the HEAD nothing happens...........??? I've got NO clue were to do this right, do you?! thanks in advance, Chris If you are using Header Tags Controller (contribution 207), get the STS PLUS module from there and follow the instructions. If you are using another contribution, look anyway at this module to see how it works. Why HTC does not work: this contribution adds text in the header of the page, between <head> and </head>, but STS does not care of it as it takes the header from the html template. How it works in STS PLUS: The STS variable $headertags ($sts->template['headertags'] in the code) contains by default the TITLE meta tag (like in standard osC) and it will be automatically added to the header of your html templates (no need to put it yourself). You can now add code in sts_user_code.php, or create a module like the one for HTC, to overwrite or modify this variable like you want. It will be automatically displayed on your pages. Note 1: as mentionned, you do not need to place $headertags on your template, but the <!--$headcontent--> is needed! See template examples delivered with the contribution. Note 2: you do not need to modify all files in the catalog to call the HTC file, as STS PLUS will ignore the result! Hello, I've been trying to evaluate OSCommerce and Zen Cart for a while now. STS Plus makes me think OSCommerce is the system to go with I would be proud if you choose osCommerce because of STS PLUS! I've just tried adding STS Plus to a fresh OSCommerce install. In the Modules section of the Admin interface I clicked the Install button. It seems that nothing happened; however, when I view the cart I receive an error message: Warning: main(includes/classes/sts.php): failed to open stream: No such file or directory in /home/.hawthorn/dogsrule/dogsruleshop.com/test2/includes/application_top.php on line 508 In the STS Plus docs it said to enable the STS module, but I haven't seen an option to do that. It seems that you have missed something during installation, because at least one file is missing. Take the last release 4.0.6, copy the files from the 'upload' folder to your application, if you have a fresh install od osC you can also copy the files from the 'clean_osc' folder. Then you should see the 3 STS PLUS modules in your admin panel. I defined a own ALT-Tag for the Logo..Mow its overwrited with OSCOMMERCE again.. Can?t find where its declared.. It is declared in includes/modules/sts_inc/general.php. Find the line: $sts->template['cataloglogo'] = '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'oscommerce.gif', 'osCommerce') . '</a>'; Quite stupid piece of code, text should come from a language file! In fact it is same as in stock osC. One way is to modify this tag, the other way is to not use $cataloglogo on your template but place the logo yourself. Ouch, long reply, need coffee... - Rigadin Quote Link to comment Share on other sites More sharing options...
Guest Posted January 16, 2006 Share Posted January 16, 2006 Thanx..! Now I?m including Your STS - P Module.. I?m including it in the Adminsettings in DEFAULT and PRODUCT.. (takes no effect!) When i put it in the INDEX - Settings i get a : Fatal error: Cannot redeclare tep_get_header_tag_products_title() (previously declared in /homepages/11/d3x**/htdocs/art42/shop/includes/functions/header_tags.php:8) in /homepages/11/d3x**/htdocs/art42/shop/includes/functions/header_tags.php on line 8 Have i to modify anything in da "header_tags.php" too..? Quote Link to comment Share on other sites More sharing options...
Guest Posted January 17, 2006 Share Posted January 17, 2006 Thanx..! Now I?m including Your STS - P Module.. I?m including it in the Adminsettings in DEFAULT and PRODUCT.. (takes no effect!) When i put it in the INDEX - Settings i get a : Fatal error: Cannot redeclare tep_get_header_tag_products_title() (previously declared in /homepages/11/d3x**/htdocs/art42/shop/includes/functions/header_tags.php:8) in /homepages/11/d3x**/htdocs/art42/shop/includes/functions/header_tags.php on line 8 Have i to modify anything in da "header_tags.php" too..? I've just tried with default, index and product info modules without problem. The error you have is because you have modified index.php (and probably other pages in catalog too) to include header_tags.php, and now STS PLUS includes it again. Solution: remove the include of header_tags.php from each file in catalog, or add a condition for it: if ($sts->display_template_output==false) { ... If you add the condition, you'll still have Header Tags Controller working when STS PLUS is turned off. - Rigadin Quote Link to comment Share on other sites More sharing options...
medusacross Posted January 17, 2006 Share Posted January 17, 2006 (edited) Hi there, at first many compliments for your work on this contribution!!! I need a (I Think) simple help: I'm using "STS" v 4.6 and "Extra pages-info box w/ admin". How can I put news in the right column? Which is the variable's name for this box? By default it's placed in the middle of the page.... but I've put the code in catalog/right_colum.php...??? http://www.tonimusic.com/website/shop/catalog/ Tnx in advance. Medusacross Edited January 17, 2006 by medusacross Quote Link to comment Share on other sites More sharing options...
Guest Posted January 17, 2006 Share Posted January 17, 2006 Hi there, at first many compliments for your work on this contribution!!! I need a (I Think) simple help: I'm using "STS" v 4.6 and "Extra pages-info box w/ admin". How can I put news in the right column? Which is the variable's name for this box? By default it's placed in the middle of the page.... but I've put the code in catalog/right_colum.php...??? http://www.tonimusic.com/website/shop/catalog/ Tnx in advance. Medusacross If I remember correctly, your contribution adds an infobox in one of the columns, and from this box you have links to extra pages that will display in the middle of the page. To add an infobox with STS PLUS, look in the file sts_user_code.php, there is an example. You have to choose a variable's name for your box, like 'extrapagesbox' and you can then use the placeholder $extrapagesbox on your templates. There should be nothing to do for the content part. Thanks for the compliments, Rigadin Quote Link to comment Share on other sites More sharing options...
medusacross Posted January 17, 2006 Share Posted January 17, 2006 OK, thanks for the suggestion but I had this message: Warning: main(includes/boxes/info_page.php): failed to open stream: No such file or directory in /web/htdocs/www.tonimusic.com/home/website/shop/catalog/includes/modules/sts_inc/sts_user_code.php on line 20 Fatal error: main(): Failed opening required 'includes/boxes/info_page.php' (include_path='.:/php/lib/php/') in /web/htdocs/www.tonimusic.com/home/website/shop/catalog/includes/modules/sts_inc/sts_user_code.php on line 20 And this is my code for sts_user_code.php: // The following code is a sample of how to add new boxes easily. // Just uncomment block below and tweak for your needs! // Use as many blocks as you need and just change the block names. $sts->start_capture(); require(DIR_WS_BOXES . 'info_page.php'); $sts->stop_capture('infopage', 'extrapagesbox'); // If $sts->stop_capture('newthingbox', 'box') is followed by $sts->start_capture, you can replace both by $sts->restart_capture('newthingbox', 'box') Do you understand what is happening? Ciao. Medusacross Quote Link to comment Share on other sites More sharing options...
lelijk Posted January 17, 2006 Share Posted January 17, 2006 it has to be: $sts->start_capture(); require(DIR_WS_BOXES . 'info_page.php'); $sts->stop_capture('infopagebox', 'box'); to create a new box On sts_template.html call the box with: $infopagebox greetings, Chris Quote Link to comment Share on other sites More sharing options...
medusacross Posted January 17, 2006 Share Posted January 17, 2006 Thank you for fast reply but with your code I had the same problem: Warning: main(includes/boxes/info_pages.php): failed to open stream: No such file or directory in /web/htdocs/www.tonimusic.com/home/website/shop/catalog/includes/modules/sts_inc/sts_user_code.php on line 20 Fatal error: main(): Failed opening required 'includes/boxes/info_pages.php' (include_path='.:/php/lib/php/') in /web/htdocs/www.tonimusic.com/home/website/shop/catalog/includes/modules/sts_inc/sts_user_code.php on line 20 Any suggestions?? Medusacross Quote Link to comment Share on other sites More sharing options...
ViPeRII Posted January 17, 2006 Share Posted January 17, 2006 Rigadin.. I have a question, How can I disable the newproducts for ...month... below my content? I can't remove it with a variable, because it's in the content Quote Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2006 Share Posted January 18, 2006 I've just tried with default, index and product info modules without problem. The error you have is because you have modified index.php (and probably other pages in catalog too) to include header_tags.php, and now STS PLUS includes it again. Solution: remove the include of header_tags.php from each file in catalog, or add a condition for it: if ($sts->display_template_output==false) { ... If you add the condition, you'll still have Header Tags Controller working when STS PLUS is turned off. - Rigadin Hi Rigadin..! I dont know the correct syntax to input/ add Your / the new condition.. So i removed (comment it out) all HTC rows.. But its dont work.. :blush: Now i found the helping words in the HTC - Doc: NOTE for STS Users: The above also applies to STS shops but does not always work for some reason. If your STS shop fails, in your sts_output.php file, FIND require(DIR_WS_FUNCTIONS . 'clean_html_comments.php'); require(DIR_WS_FUNCTIONS . 'header_tags.php'); CHANGE TO require_once(DIR_WS_FUNCTIONS . 'clean_html_comments.php'); require_once(DIR_WS_FUNCTIONS . 'header_tags.php'); I Modify Your HTC STS-Plus Modul to "require_once".. and now its works... Unfortunatly there is now a smal new problem: The H1 and H2 Style in the Categories dont work correctly: The defination in the stylesheet is ignored...! :blush: In the Product-View its works OK.. Some suggestions..? :-" ;) Peace! --h- Quote Link to comment Share on other sites More sharing options...
Ryangel Posted January 18, 2006 Share Posted January 18, 2006 TEXT_CLICK_TO_ENLARGE is the text, shown by going over the picture in the product description.TEXT_DATA_AVAILABLE is the text, shown by new products that are not avaibable now for the store, but comming soon. You can add these in the admin menu under Catalog -> Expected products -> Date avaiable /ViPerii Thanks for your help. I have added a date though, but it does not show. and i cant seem to find where TEXT_CLICK_TO_ENLARGE can be modified? I've checked product_info.php but it is not in there. hmm Quote Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2006 Share Posted January 18, 2006 Oh.. i see that the stylesheets.css was totally ignored in the category-view.. :blush: And only if SPS-P is on... :huh: --h- Quote Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2006 Share Posted January 18, 2006 Warning: main(includes/boxes/info_pages.php): failed to open stream: No such file or directory in /web/htdocs/www.tonimusic.com/home/website/shop/catalog/includes/modules/sts_inc/sts_user_code.php on line 20 Looks like your file includes/boxes/info_pages.php does not exist. Verify the name. Are you using Infobox Skin Manager? - Rigadin Quote Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2006 Share Posted January 18, 2006 Thanks for your help. I have added a date though, but it does not show. and i cant seem to find where TEXT_CLICK_TO_ENLARGE can be modified? I've checked product_info.php but it is not in there. hmm The both texts you are searching for are in the language file of product_info.php, located here: \catalog\includes\languages\english\product_info.php They are in the original 2.2MS2 and STS PLUS does not modify them. - Rigadin Quote Link to comment Share on other sites More sharing options...
Ryangel Posted January 18, 2006 Share Posted January 18, 2006 Curious! This is my current product_info.php <?php /* $Id: products_new.php,v 1.3 2002/11/19 01:48:08 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ define('NAVBAR_TITLE', 'New Products'); define('HEADING_TITLE', 'New Products'); define('TEXT_DATE_ADDED', 'Date Added:'); define('TEXT_MANUFACTURER', 'Manufacturer:'); define('TEXT_PRICE', 'Price:'); ?> i checked the original code which was <?php /* $Id: product_info.php,v 1.15 2002/11/19 01:48:08 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2002 osCommerce Released under the GNU General Public License */ define('TEXT_PRODUCT_NOT_FOUND', 'Product not found!'); define('TEXT_CURRENT_REVIEWS', 'Current Reviews:'); define('TEXT_MORE_INFORMATION', 'For more information, please visit this products <a href="%s" target="_blank"><u>webpage</u></a>.'); define('TEXT_DATE_ADDED', 'This product was added to our catalog on %s.'); define('TEXT_DATE_AVAILABLE', '<font color="#ff0000">This product will be in stock on %s.</font>'); define('TEXT_ALSO_PURCHASED_PRODUCTS', 'Customers who bought this product also purchased'); define('TEXT_PRODUCT_OPTIONS', 'Available Options:'); define('TEXT_CLICK_TO_ENLARGE', 'Click to enlarge'); ?> I must have changed it somehow. >_< though i never touched this file before... thanks for pointing me to the right direction. And again, thanks for the awesome contribution! Quote Link to comment Share on other sites More sharing options...
gerda Posted January 18, 2006 Share Posted January 18, 2006 Hi I have a problem with STS 4.0.6 If dutch is my default language then I get to see the English names for day's en month's instead of the dutch. If STS 4.0.6 is not true then I get the day?s and month?s in dutch Most I do something else to get the dutch version for the month en day?s or have 4.0.6 a little bug? Regards Quote Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2006 Share Posted January 18, 2006 Hi I have a problem with STS 4.0.6 If dutch is my default language then I get to see the English names for day's en month's instead of the dutch. If STS 4.0.6 is not true then I get the day?s and month?s in dutch Most I do something else to get the dutch version for the month en day?s or have 4.0.6 a little bug? Regards If it works without STS PLUS... then there is a problem with STS PLUS. But what? The language of the date and time is set in the language file (english.php, dutch.php) with the call of the @setlocale function. After this call, the server knows how to display date and time. STS PLUS does not use this function and build the $date variable after the call of this function. Try to copy the line with setlocale from your dutch.php to the beginning of application_top.php and tell me the result. When searching for this, I found another difference: STS and STS PLUS do not put the constant HTML_PARAMS inside the <html> tag in page header. The writing direction as well as language of the page is defined in this constant and it can be useful for indexing in search engines. Patch coming soon.. - Rigadin Quote Link to comment Share on other sites More sharing options...
carbonman Posted January 18, 2006 Share Posted January 18, 2006 just a quick question, hope someone can help. Is it easier to adjust and set fixed page widths using STS than BTS>>?? help please Quote Link to comment Share on other sites More sharing options...
Guest Posted January 18, 2006 Share Posted January 18, 2006 Hi Rigadin..! (... ) Unfortunatly there is now a smal new problem: The H1 and H2 Style in the Categories dont work correctly: The defination in the stylesheet is ignored...! :blush: In the Product-View its works OK.. Some suggestions..? :-" ;) Peace! --h- Hi.. Today i tried out to include a own Link for my Stylesheet into the Template.. Now i got this Situation: The Stylesheet works well only on the Catalog-Page and the Categories-Page.. On all other Pages (like Product-Preview, Conditions...) it will be ignored / not found.. But its only if STS-P is on.. :blush: What i?m making wrong..? Thx! Quote Link to comment Share on other sites More sharing options...
Guest Posted January 19, 2006 Share Posted January 19, 2006 Hi.. Today i tried out to include a own Link for my Stylesheet into the Template.. Now i got this Situation: The Stylesheet works well only on the Catalog-Page and the Categories-Page.. On all other Pages (like Product-Preview, Conditions...) it will be ignored / not found.. But its only if STS-P is on.. :blush: What i?m making wrong..? Thx! I guess the problem is this one: - In your template you include the stylesheet like that: <link rel="stylesheet" type="text/css" href="stylesheet.css"> So when editing your template, the stylesheet in use is catalog/includes/sts_templates/YourFolder/stylesheet.css but when viewing pages, the stylesheet will be catalog/stylesheet.css - You have changed the link to the css file on your index template, but not on the default template => only categories are ok now. Solutions: 1) You can use an absolute link http://www......../stylesheet.css 2) You can put the css file in the same folder as your template and use the $templatedir or $templatepath (they are same) to tell where is your sts_templates dir, example: <link rel="stylesheet" type="text/css" href="$templatepath/stylesheet.css"> 3) For development, you can have a copy of your stylesheet in 2 folders (catalog + same as your template), so it allows to edit the template as well as see store pages correctly, then later change to solution 1 or 2. Note that you have same problem with images when using relative links. - Rigadin Quote Link to comment Share on other sites More sharing options...
Guest Posted January 19, 2006 Share Posted January 19, 2006 just a quick question, hope someone can help.Is it easier to adjust and set fixed page widths using STS than BTS>>?? help please With STS PLUS the layout of your pages are made in an html template, so you fix the width of your store by editing this template with your preferred html editor. Easy. The other good point is that STS PLUS does not modify many php files. With BTS the logic code (db queries, ...) is separated from the layout code, but you still have to edit php files if you want to change the layout. So basically it is same as with stock osC. If you use BTS, you also have to modify all files in catalog folder, which makes install of other contributions more tricky as there is less support. Anyway, I think I'm not the best person to compare as I'm much involved in STS PLUS and I like it! I've seen some other posts where people compare the solutions, maybe you can have a look there too. - Rigadin Quote Link to comment Share on other sites More sharing options...
gerda Posted January 19, 2006 Share Posted January 19, 2006 If it works without STS PLUS... then there is a problem with STS PLUS. But what? The language of the date and time is set in the language file (english.php, dutch.php) with the call of the @setlocale function. After this call, the server knows how to display date and time. STS PLUS does not use this function and build the $date variable after the call of this function. Try to copy the line with setlocale from your dutch.php to the beginning of application_top.php and tell me the result. When searching for this, I found another difference: STS and STS PLUS do not put the constant HTML_PARAMS inside the <html> tag in page header. The writing direction as well as language of the page is defined in this constant and it can be useful for indexing in search engines. Patch coming soon.. - Rigadin Hi Rigadin, Ok i have try to copy from my dutch.Php to application_top.php First I have copy this: // look in your $PATH_LOCALE/locale directory for available locales.. setlocale(LC_TIME, 'nl_NL'); define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'd/m/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); the result where the same: dutch language / English name of de mounth and day?s then I have copy this from dutch.php: // look in your $PATH_LOCALE/locale directory for available locales.. setlocale(LC_TIME, 'nl_NL'); define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'd/m/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } And I get a error: Fatal error: Cannot redeclare tep_date_raw() (previously declared in C:\Program Files\xampp\htdocs\webshop\includes\application_top.php:23) in C:\Program Files\xampp\htdocs\webshop\includes\languages\dutch.php on line 24 regards gerda Quote Link to comment Share on other sites More sharing options...
ViPeRII Posted January 19, 2006 Share Posted January 19, 2006 Hi Rigadin, Ok i have try to copy from my dutch.Php to application_top.php First I have copy this: // look in your $PATH_LOCALE/locale directory for available locales.. setlocale(LC_TIME, 'nl_NL'); define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'd/m/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); the result where the same: dutch language / English name of de mounth and day?s then I have copy this from dutch.php: // look in your $PATH_LOCALE/locale directory for available locales.. setlocale(LC_TIME, 'nl_NL'); define('DATE_FORMAT_SHORT', '%d/%m/%Y'); // this is used for strftime() define('DATE_FORMAT_LONG', '%A %d %B, %Y'); // this is used for strftime() define('DATE_FORMAT', 'd/m/Y'); // this is used for date() define('DATE_TIME_FORMAT', DATE_FORMAT_SHORT . ' %H:%M:%S'); //// // Return date in raw format // $date should be in format mm/dd/yyyy // raw date is in format YYYYMMDD, or DDMMYYYY function tep_date_raw($date, $reverse = false) { if ($reverse) { return substr($date, 3, 2) . substr($date, 0, 2) . substr($date, 6, 4); } else { return substr($date, 6, 4) . substr($date, 0, 2) . substr($date, 3, 2); } } And I get a error: Fatal error: Cannot redeclare tep_date_raw() (previously declared in C:\Program Files\xampp\htdocs\webshop\includes\application_top.php:23) in C:\Program Files\xampp\htdocs\webshop\includes\languages\dutch.php on line 24 regards gerda Well obviously you have 2 times declared the function: tep_date_raw() Delete the one from application_top.php Quote Link to comment Share on other sites More sharing options...
gerda Posted January 19, 2006 Share Posted January 19, 2006 Well obviously you have 2 times declared the function: tep_date_raw()Delete the one from application_top.php Hi, I delete what you ask but de same result, dutch language / English names of the month and day?s I have only installed OSC 2.2 ,Dutch language and STS 4.0.6 nothing else. If I set STS in admin on, and I open the web shop then I have de problem. It look like that also if you switch between English en German language that you get the English version of the month and day?s (left under on the default page from STS) Regards Gerda Quote Link to comment Share on other sites More sharing options...
brucelim Posted January 19, 2006 Share Posted January 19, 2006 hi guys, after i use manual install, i face 2 error 1 in catalog n another 1 is in admin/modules, i had check compare the file the file i download is the same code in the install.html. i also follow all instruction, as below 1.) CATALOG ERROR Warning: main(includes/classes/sts.php): failed to open stream: No such file or directory in /home/theshop/domains/theshop.com.my/public_html/catalog/includes/application_top.php on line 508 Warning: main(includes/classes/sts.php): failed to open stream: No such file or directory in /home/theshop/domains/theshop.com.my/public_html/catalog/includes/application_top.php on line 508 Warning: main(includes/classes/sts.php): failed to open stream: No such file or directory in /home/theshop/domains/theshop.com.my/public_html/catalog/includes/application_top.php on line 508 Fatal error: main(): Failed opening required 'includes/classes/sts.php' (include_path='.:/usr/local/lib/php') in /home/theshop/domains/theshop.com.my/public_html/catalog/includes/application_top.php on line 508 2.) ADMIN/Modules PArt error that show in Payment modules page Warning: main(/home/theshop/domains/theshop.com.my/public_html/catalog/includes/languages/english/modules/payment/paypal_ipn.php): failed to open stream: No such file or directory in /home/theshop/domains/theshop.com.my/public_html/catalog/admin/modules.php on line 136 Warning: main(/home/theshop/domains/theshop.com.my/public_html/catalog/includes/languages/english/modules/payment/paypal_ipn.php): failed to open stream: No such file or directory in /home/theshop/domains/theshop.com.my/public_html/catalog/admin/modules.php on line 136 Warning: main(): Failed opening '/home/theshop/domains/theshop.com.my/public_html/catalog/includes/languages/english/modules/payment/paypal_ipn.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/theshop/domains/theshop.com.my/public_html/catalog/admin/modules.php on line 136 what happen? Please help... thanks.. 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.