Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

fredriksk

Pioneers
  • Posts

    60
  • Joined

  • Last visited

Everything posted by fredriksk

  1. Just installed the addon and got almost everything working. One thing though. If a cetegory both contains products and categories the products are not showing. Why? they are shown in the "normal" category/product entry in admin.
  2. I also have trouble with garbage signs when using TinyMCE on special pages. Everytime i Insert a table and save the document I get br-tags verywhere in the table. Like this <table> <tr> <br> <td>hello</td><br> <td>hi</td><br> </tr><br> </table> this causes IE and Firefox to push the table to the bottom om the page. Does anyone know what causes this?
  3. Hello. Just installed the Product Extra Fields Contribution and I can't seem to find the contrib official thread here in the forum (is there any?) Well. It seems to be working but I wan't to use my product attribute in alla Categories. I have over 200 categories so I realy can't specify them all in 'category' -field in admin. Can I specify something like 'all categories' here? Thanks for all help here.
  4. But it IS a content template.I have made up my own placeholders that implements the various parts of the welcome page. I have a index.php_0.html file in my root template folder and it contains a $content placeholder. Now I want it to use the ../content(index.php_0.html template. How do I do this?
  5. I have created a index.php_0.html file in the content folder. Why doesn't sts template system recognize this and use it? What do I need to do to make this work?
  6. Im trying to make a content template for the welcome page (index.php_0.html) I have created the placeholders and a template that uses them but where do I put the code that makes sts read the content insted of the code located in catalog/index.php i.e where do I put the $sts->script->content_template_file = STS_TEMPLATE_DIR . "content/mypage.php.html"; Or do I need to make a module to get this working?
  7. I did a post in another STS thread so sorry for my double post. Ok I read the post you suggested but i still don't quite get it.. This is what I want to do (first) I use a contrib that makes it posible to edit the welcome text and other infopages from admin. Therefore I can't make a template file for index.php_0.html since I don't wan't it to be static (later on I would like to change the content of some infoboxes to so I realy want to learn this). Now. I want to make a content file for the startpage (homepage) and some placeholders for "welcome text" and "please login/create account" etc that you can find in the normal startpage. I know I need to create placeholders in includes/modules/sts_inc/sts_user_code.php or in a separate file in this folder. I also know I need to create a content template file in /sts_templates/myTemplate/content folder But where and how do I make the index.php_0.html (i.e index.php) know how to use the content template?
  8. Ok. So i have read the "create content template" like a thousand times and google my head off but I have trouble understanding how things comes together here.. If someone have time to explain this with some code it would be great! I read the previous post in this thread on how to create content template for a brand new page but I wan't to create a content template for a existing page and that, I don't get Ok. I want to make content templates for some parts of the shop so I don't need to change the real oscommerce file and so it simplifies changing layout of a shop (I have several). 1) The first thing I wan't to make a content template for is the "homepage". I have done a index.php_0.html template (but I don't even think I need this). What I realy wan't is to make placeholders of the welcome text, "welcome guest..." and title etc. So I realy can change the placing of this. Since I use a contrib that lets med edit information pages It's no good for me to make a static page for the welcome file (index.php_0.html) so the placeholder is the way to go for me. I have peeked at the sts_product_info.php file for sts. But I don't understand how it captures the content from the product_info.php file from oscommerce so thats a dead end for me. I understand that this is done in several steps. First I need to create the content template in /content/ and name it like mystartpage.php.html. second I need to create some placeholders in, say /sts_inc/sts_user_code.php. But how do I get sts to understand how to use the content template for the index.php_0.html? Maby some friendly soul could explain this (like to a child) in some bits of code. 2) Second thing I wan't to change layout for is the infopage box. I need to clean up the content and list the items in this box in a list. Same thing here. How do I make sts understand that it should use the content template for this box?
  9. But does this include the content of boxes to? for instance the product listing box. How does the $content work for this? There is some kind of loop involved in boxes like product listing box or category box but I can't use php code in templates so how does this work? Does the template I create in content/ folder represent the display of one product in product listning box and one category in the categorybox? I read the part about $content tag but as I understood it I can use $content to shange the shape of a box or a sub page like a category but kan I realy change the box content of category box or product listening box? What should I name the file in content/ folder so the template pick it upp to show product list for a specifik product?
  10. Can I change the layout of the Content in a box using STS template system? Like the productListning and thereby avoid the need of a contrubution that, say lists product in columns instead of rows? How would i do that?
  11. Hello all I'm new to STS and I'm trying to understand the template-part. I have done a template for default (sts_template.html) and index.php (index.php.html) and product_list box (infobox_product_listing.php.html) and it seems to be working fine. Now, I want to change the layout of the product list that is visible after choosing a category. I want to change the table that list the product to just show picture and product name. I don't want the header that displays productname etc. and I want to remove the "buy now" button What's the best way of styling the product list? Should I use some features in STS or chould I style it directly in the OScommerce code? I'm all for not changing the actual OScommerce code to mutch but instead doing as much as posible in the STS templateing. Can I use the sts_user_code.php in some way? any hints?
  12. WOW! It worked when I turned it off. Why does this problem arise when I use Gzip compression? Wont my site be slower now when I turn Gzip off?
  13. OK, Now I realy need help here guys. I have installed STS 4.2 (the one without HTC). Now, When I turen on STS 4.2 in my Admin panel I end up with a blank page and when I look at the source code in IE I can see the following: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD> <BODY></BODY></HTML> If I turn STS off in admin The page displays correctly. The strange thing is that if I run W3c validator on my index.php with STS turned on in admin it validates the hwole page (including the code that doesn't show up in IE, that is). Does anyone have any Id?a on this? Is there some problem with STS 4.2 since it workes if I turn it off? Thanks! Fredrik
  14. OK, Now I realy need help here guys. I have installed STS 4.2 (the one without HTC). Now, When I turen on STS 4.2 in my Admin panel I end up with a blank page. If I turn STS off in admin The page displays correctly. When I look at the code in IE I can see the following: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD> <BODY></BODY></HTML> If I look in my template file I have NOT included a <!DOCTYPE> so I don't know where this come from... The funny thing is that if I run the W3c validator on my index.php with STS turned on in admin it validates it. (the code that doesn't show up in IE that is). Does anyone have any Id?a on this? Is there some problem with STS 4.2 since it workes if I turn it off? Thanks! Fredrik
  15. Wohooo! I found a solution to the STS 4.x problem. Here it is.... 1. Install the contributions like it says in the redme files. 2. copy meta_tags.php to the following path: includes/modules/sts_inc 3. Rename it to header_tags.php 4. edit this file acording to this: I. find: if ($meta_cache_code){ echo $meta_cache_code; }else if ($cache_type == 2 && file_exists($meta_cache_file_full)) { echo base64_decode(gzinflate(file_get_contents($meta_cache_file_full))); }else{ ob_start(); and replace it with: if ($meta_cache_code){ $sts_template['headertags'] = $meta_cache_code; } else if ($cache_type == 2 && file_exists($meta_cache_file_full)) { $sts_template['headertags'] = base64_decode(gzinflate(file_get_contents($meta_cache_file_full))); } else{ //ob_start(); you dont need to cache output here II find this: ##################################### OUTPUT THE DATA ########################################## echo ' <title>'.$metatitle.'</title>' . "\n"; echo ' <META NAME="Description" Content="' .$metadescription. '">' . "\n"; echo ' <META NAME="Keywords" Content="' . $metakeywords . '">' . "\n"; ################################################################################ ##################### ################################### BELOW IS CACHE INFO ######################################### $meta_cache_output = ob_get_contents(); ob_end_flush(); and replace it with ##################################### OUTPUT THE DATA ########################################## //echo ' <title>'.$metatitle.'</title>' . "\n"; //echo ' <META NAME="Description" Content="' .$metadescription. '">' . "\n"; //echo ' <META NAME="Keywords" Content="' . $metakeywords . '">' . "\n"; $sts->template['headertags'] = '<title>'.$metatitle.'</title>' . "\n"; $sts->template['headertags'] .= '<META NAME="Description" Content="' .$metadescription. '">' . "\n"; $sts->template['headertags'] .= '<META NAME="Keywords" Content="' . $metakeywords . '">' . "\n"; ################################################################################ ##################### ################################### BELOW IS CACHE INFO ######################################### //$meta_cache_output = ob_get_contents(); $meta_cache_output = $sts_template['headertags']; //ob_end_flush(); //you dont need this anymore 5. don't forget to upload the modified file to: includes/modules/sts_inc again! 6. Go to your admin panel -> modules -> STS. For each module installed, add 'headertags.php' to the list of files to include. Example: for the default module, you have a parameter named 'Files for normal template'. By default it contains only 'sts_user_code.php'. Put ';header_tags.php' after it and do so in all STS modules. This makes use of the STS headertags feature and puts the title and metadata AFTER the <!DOC>, <HTML><HEAD> tags.Hopes this help you guys that want to run this great contribution with STS 4.x /Fredrik
  16. I've got the same problem. It should be a simple thing to make it work with STS 4.2. I have read threw all posts in this thread and there is one suggestion (http://www.oscommerce.com/forums/index.php?act=ST&f=7&t=134546&hl=&view=findpost&p=925675) on how to get it to work but it doesn't get the job done. You end up with a header that lookes like this: <title>My title</title> <META NAME="Description" Content="my description."> <META NAME="Keywords" Content="my, keywords"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html dir="LTR" lang="sv"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <base href="http://www.mystore.int/"> <!-- start get_javascript(applicationtop2header) //--> <!-- end get_javascript(applicationtop2header) //--> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> The title and metadata gets outputed before the !doc and <html><head> tags. I have tried to fiddle with the this file: includes\modules\sts_inc\general.php The following line controlls the title-tag: //$sts->template['headertags']= "<title>" . TITLE ."</title>"; And I have tried to change it to this: $sts->template['headertags'] = require(DIR_WS_INCLUDES . 'meta_tags.php'); But I end upp with the same result (<title> before <html>) so my conclusion is that the problem lies in the meta_tags.php file. And there I?m lost. I can't figure out what makes the title-tag come before the html-tag.
  17. Well, my template looks exactly like that. but when I look at the result in the source in my webbrowser it still comes out like this: <title>teststore</title> <html dir="LTR" lang="sv"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <base href="http://www.mystore.int/"> <!-- start get_javascript(applicationtop2header) //--> <!-- end get_javascript(applicationtop2header) //--> <link rel="stylesheet" type="text/css" href="stylesheet.css"> </head> Can't figure out why? I have fiddled with another metatag contribution called cDynamic_Meta_Tags v1.4 (http://www.oscommerce.com/community/contributions,2895/) because the Header Tags Controller contribution gave me to extensive parsetimes (even with the cash turned on). The cdynamic_metatag sutes me better. Anyhow, I reinstalled the STS template 4.2 and removed the cDynamic_meta_tags 1.4 still ends up with the same problem. Maby I'm doing something wrong? /Fredrik
  18. Have been fiddling with this great contribution for some time now, updated from 2.1 to 4.2 and got almost everything working. One thing though. When I look in my sourcecode in a browser the title-tagg comes before the <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html dir="LTR" lang="sv"#> <head> Like this: -- 8< ------- <title>my store</title> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html dir="LTR" lang="sv"#> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <base href="http://www.mystore.xx/"> <!-- start get_javascript(applicationtop2header) //--> <!-- end get_javascript(applicationtop2header) //--> <link href="../stylesheet.css" rel="stylesheet" type="text/css"> </head> ------------ Have I done something wrong?
  19. Thanks man! Now, I'm almost done. One thing left though Can I have different templates for the categories that includes other categories and the categories that only includes products?
  20. Posted this question before but did not get an answer. And now, When I think about it. I could have made myself at bot more clear. So I give it a go again =) Just installed STS 4.2. Can you have diffrent templates for the startpage (index.php.html) and (all) the category pages? How should I name them?
  21. Hello. I have just upgraded from STS 2.00 to STS 4.2. It realy made a difference in parsing time! Great contribution. the main reason for upgrading was that I wanted to fiddle with templates for the category pages. In my shop I have approx. 20 main categories with 1-5 sub-categories each. There is never any products mixed with the sub-categories. Now, I want: one template for the mainpage (index_0.php.html?) one default template for all category pages that displays it's sub-categories. one default template for all sub-categories pages (that list products in this category) Later on I will add specific templates for the category pages and sub-categories. I have tried different approaches but I can't get this to work. I have managed to create templates for individual categories and sub-categories but I can't get a default template to work for the other categories. How should I name my templates? Do I need to do any aditional settings in admin or elsewere? Thanks /Fredrik
  22. hello. I have created a new page (dublicated from the about_us.php) and on this page I dont want any columns to the left and to the right. Can I specify another STS template that aplies just for my new page?
  23. Hello all! I have tried to installed this module 3 times now but I always end up with the same error when I try to browse my categories. the error is as follows: ---- 8< ------- Fatal error: Call to undefined function: read_cache() in /var/www/dinvvsbutik/www/includes/classes/url_rewrite.php on line 157 ---------------- Im running a OSC 2.2 MS2 with the STS module installed. Doesnt this contribution run with STS module?
×
×
  • Create New...