addicted Posted October 24, 2006 Share Posted October 24, 2006 (edited) Hi, has anyone used this contrib: http://www.oscommerce.com/community/contributions,4549/ with STS product content templates? or does anyone know whether it will work? I used to use similar one with STS3 in STS 4 modify sts_inc/product_info.php $prod_quantity = tep_get_products_stock($HTTP_GET_VARS['products_id']); if ($prod_quantity > 0) { $template_pinfo['addtocartbutton'] = tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); } else { $template_pinfo['addtocartbutton'] = ''; } this will disable add to cartbutton if stock is 0 I also define $stock image wich is "Sold OUT" $template_pinfo['stock']= ''; } else { $template_pinfo['stock'] = tep_image('images/outofstock.jpg'); } Edited October 24, 2006 by addicted Quote Link to comment Share on other sites More sharing options...
addicted Posted October 24, 2006 Share Posted October 24, 2006 I have problem with product_info button $addtocartbutton not working I mean it not perfmore any actions same is with $reviewsbutton any ideas ? Quote Link to comment Share on other sites More sharing options...
bkellum Posted October 24, 2006 Share Posted October 24, 2006 HI I've just installed STS V4.2 and I have a question: When using the variables ($languagebox, $categorybox, etc...) it displays: . Categories Category 1 Category 2 Etc... Is there any way to remove the ". Categories" at the top? Same goes for the language box, etc... Thanks for any help. Great contribution by the way!! I think this is what you want: To remove the header for the info boxes: Open ./includes/classes/boxes.php Inside the code, you will find this class definition: class infoBoxHeading extends tableBox { Go at the end of the class definition and edit this line: $this->tableBox($info_box_contents, true); Replace it with: $this->tableBox($info_box_contents, false); Hope it helps, 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 Link to comment Share on other sites More sharing options...
amigaman Posted October 24, 2006 Share Posted October 24, 2006 Any ideas for me bkellum? Quote Link to comment Share on other sites More sharing options...
bkellum Posted October 24, 2006 Share Posted October 24, 2006 Any ideas for me bkellum? I do not understand why you would want those pages indexed by the search engines. If your site is setup properly, then the search engines won't list pages like checkout process and create account so it serves no purpose to have header tags code installed in those files. You only need to add the code to the files that will be listed in the search engine listings. If you absolutely need to have those pages indexed, it would probably be easier to add the meta tags and page title manually in the HTML of your specific template for those individual pages. 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...
amigaman Posted October 24, 2006 Share Posted October 24, 2006 Thanks. Quote Link to comment Share on other sites More sharing options...
Atelier Posted October 24, 2006 Share Posted October 24, 2006 I've just installed the newest STS version on my website along with header tags, error free. I then added PWA to my site as well. Now I get this error at any part of my site (except admin): Fatal error: Call to a member function on a non-object in /nfsn/content/atelier/htdocs/includes/header.php on line 14 I don't have the exact line of code this refers too, but if one of you look at yours its one or two lines of code right at the beginning of header.php and has something like \\STS start and \\STS end before and after it. When i disable this line of code (add a \\) then the site works again, but STS evidently is not working. Any help would be appreciated becuase I am not very fluent with php (just know how to get around) and would like to start using STS. Thanks! Quote STUFF TO DO: -change boxes on left side to desired style -remove default mini pictures (cartoon ones) -modify some of the text colors -change text headings ("Whats new here" etc.) -add shipping modules -add credit card module that allows to stay on my site -remove all or all but 3 of the "new products" at bottom of main screen -change button styles -add SSL -add the products from TIGI Link to comment Share on other sites More sharing options...
addicted Posted October 24, 2006 Share Posted October 24, 2006 (edited) when I use $content instead product inflo template everything works perfekt when swtich to product_info template buton add to cart do nothing and reviews do nothing too http://www.atrakcia.com/product_info.php?products_id=1 this is my test site, pls ignore mess with styles images first buton is review second is add to card any ideas where is the problem. Second issue (I think it was answered earlier) is how to avoid modifications of the boxes like advance search when using STS Infobox addon how will act STS if I don't have default template for infobox, but template for every single box, will this bring normal look of advance search ? Any help would be appreciated Thank you for your support Edited October 24, 2006 by addicted Quote Link to comment Share on other sites More sharing options...
philipp Posted October 24, 2006 Share Posted October 24, 2006 Hello, I've just installed oscommerce for the first time on my FreeBSD machine, together with the latest version of STS. Oscommerce works great, except that I can't enable STS! I go to the STS modules page, click the Default line and set the 'Do you want to use Simple Template System?' option to 'true'. Then I click Update, and when I'm returned to the STS modules page, it says 'false'. No errors seem to occur, it just refuses to enable :-) Please could you advise? Thanks, Philip. Quote Link to comment Share on other sites More sharing options...
addicted Posted October 24, 2006 Share Posted October 24, 2006 Hello, I've just installed oscommerce for the first time on my FreeBSD machine, together with the latest version of STS. Oscommerce works great, except that I can't enable STS! I go to the STS modules page, click the Default line and set the 'Do you want to use Simple Template System?' option to 'true'. Then I click Update, and when I'm returned to the STS modules page, it says 'false'. No errors seem to occur, it just refuses to enable :-) Please could you advise? Thanks, Philip. file permisions ? I think that sts settings are not stored in database Quote Link to comment Share on other sites More sharing options...
philipp Posted October 24, 2006 Share Posted October 24, 2006 I suppose it's possible there's a file permissions problem. Which files should I check, and what should their permissions be, please? Thanks, Philip. Quote Link to comment Share on other sites More sharing options...
addicted Posted October 24, 2006 Share Posted October 24, 2006 I suppose it's possible there's a file permissions problem. Which files should I check, and what should their permissions be, please? Thanks, Philip. apache web server was installed from freebsd ports? defaul user is www group www chown to www, should be OK Quote Link to comment Share on other sites More sharing options...
philipp Posted October 24, 2006 Share Posted October 24, 2006 Yep, everything chown'ed to www, but the behaviour is still the same. Any more ideas please? Thanks, Philip. Quote Link to comment Share on other sites More sharing options...
addicted Posted October 24, 2006 Share Posted October 24, 2006 Yep, everything chown'ed to www, but the behaviour is still the same. Any more ideas please? Thanks, Philip. hmm f you are experiencing problems getting the STS module to activate in the admin and you are using osCommerce update 060817, use this patch to get it working. Also: The official support forum for STSv4.2 can be found at: http://www.oscommerce.com/forums/index.php?s=&...st&p=913548 Please use this forum to post all related topics to STSv4.2. Thanks, Bill Kellum did you try that ? lates in STS contribution ? Quote Link to comment Share on other sites More sharing options...
amigaman Posted October 24, 2006 Share Posted October 24, 2006 May I ask another question? It is regarding category templates. I have searched the thread and read the questions regarding this and I have also read the documentation but I still can't figure it out. I have a music category, the end of the URL for this category is: .com/music-tshirts-c-21.html I want to use an alternative individual template for it. What do I call this template and where do I put it? Also what additions do I make on the admin side and where exactly do I paste the new template? Thanks again and apologies for my ignorance. Quote Link to comment Share on other sites More sharing options...
addicted Posted October 24, 2006 Share Posted October 24, 2006 (edited) May I ask another question? It is regarding category templates. I have searched the thread and read the questions regarding this and I have also read the documentation but I still can't figure it out. I have a music category, the end of the URL for this category is: .com/music-tshirts-c-21.html I want to use an alternative individual template for it. What do I call this template and where do I put it? Also what additions do I make on the admin side and where exactly do I paste the new template? Thanks again and apologies for my ignorance. main (first, index) page must be index.php_0.html usually I use category ID for example index.php_110_132.html. I haven't tasted with STS4 but STS3 also works with index.php_132.html files must be int template directrory, specified in admin panel so try index.php_21.html its seems that you have Ultimate SEO installed Excuse me for my english Edited October 24, 2006 by addicted Quote Link to comment Share on other sites More sharing options...
addicted Posted October 24, 2006 Share Posted October 24, 2006 seems that I need to make template for every infobox, in case I want also purchesed and search to work correctly.. I worry about the performance Quote Link to comment Share on other sites More sharing options...
addicted Posted October 24, 2006 Share Posted October 24, 2006 Can some one give me a glue how to modify shoping_cart php (or sts_incl) to use STS4 for shopping carts. Quote Link to comment Share on other sites More sharing options...
philipp Posted October 24, 2006 Share Posted October 24, 2006 hmmf you are experiencing problems getting the STS module to activate in the admin and you are using osCommerce update 060817, use this patch to get it working. Thanks for the reply Bill, but what patch can I use to get it working? Is there a patch reference or link you can provide? Thanks, Philip. Quote Link to comment Share on other sites More sharing options...
addicted Posted October 24, 2006 Share Posted October 24, 2006 (edited) Thanks for the reply Bill, but what patch can I use to get it working? Is there a patch reference or link you can provide? Thanks, Philip. http://www.oscommerce.com/community/contri...all/search,STS4 I quotet Bill's comment for the patch .. 060817 osCommerce patch for STSv4.2 Edited October 24, 2006 by addicted Quote Link to comment Share on other sites More sharing options...
philipp Posted October 24, 2006 Share Posted October 24, 2006 Thanks, that fixed it :-) Philip. Quote Link to comment Share on other sites More sharing options...
Atelier Posted October 24, 2006 Share Posted October 24, 2006 I've just installed the newest STS version on my website along with header tags, error free. I then added PWA to my site as well. Now I get this error at any part of my site (except admin): Fatal error: Call to a member function on a non-object in /nfsn/content/atelier/htdocs/includes/header.php on line 14 I don't have the exact line of code this refers too, but if one of you look at yours its one or two lines of code right at the beginning of header.php and has something like \\STS start and \\STS end before and after it. When i disable this line of code (add a \\) then the site works again, but STS evidently is not working. Any help would be appreciated becuase I am not very fluent with php (just know how to get around) and would like to start using STS. Thanks! Quote STUFF TO DO: -change boxes on left side to desired style -remove default mini pictures (cartoon ones) -modify some of the text colors -change text headings ("Whats new here" etc.) -add shipping modules -add credit card module that allows to stay on my site -remove all or all but 3 of the "new products" at bottom of main screen -change button styles -add SSL -add the products from TIGI Link to comment Share on other sites More sharing options...
bkellum Posted October 24, 2006 Share Posted October 24, 2006 I've just installed the newest STS version on my website along with header tags, error free. I then added PWA to my site as well. Now I get this error at any part of my site (except admin): Fatal error: Call to a member function on a non-object in /nfsn/content/atelier/htdocs/includes/header.php on line 14 I don't have the exact line of code this refers too, but if one of you look at yours its one or two lines of code right at the beginning of header.php and has something like \\STS start and \\STS end before and after it. When i disable this line of code (add a \\) then the site works again, but STS evidently is not working. Any help would be appreciated becuase I am not very fluent with php (just know how to get around) and would like to start using STS. Thanks! Sorry, but what is PWA? If I was troubleshooting this, I would start with the header.php file from both contributions to see what is conflicting. If I did not find anything there, I would compare both contributions entirely. 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...
bkellum Posted October 25, 2006 Share Posted October 25, 2006 May I ask another question? It is regarding category templates. I have searched the thread and read the questions regarding this and I have also read the documentation but I still can't figure it out. I have a music category, the end of the URL for this category is: .com/music-tshirts-c-21.html I want to use an alternative individual template for it. What do I call this template and where do I put it? Also what additions do I make on the admin side and where exactly do I paste the new template? Thanks again and apologies for my ignorance. STS template structure: It is best to save your default template file as sts_template.html. Then, you would stipulate this in the STS ?Default? module in the admin panel. The ?sts_template.html? file would be used for all pages in your shop that you have not created a custom template for. Now, to answer your question about custom templates for specific pages: First you need to understand how STS ?searches? to see if a custom template is available. A flow chart is available in the STS manual to show how this works. As an overview of the process, it works like this: ? If you wanted to create a template for Category 3, which is the ?out of the box? osCommerce ?Hardware? category, you would create a template and save it as ?index.php_3.html?. ? Now if you wanted to create a template for a sub-category within a category you would do the following (using the example above): Create a template and save it as ?index.php_3_9.html? to be used as a template for the ?out of the box? category ?Hardware? and sub-category ?Mice?. Now this template will be used each time a visitor opens up the ?mice? sub-category (sub-category 9) in your store. Keep in mind that the template for Category ?Hardware? (Category 1) is totally independent of the template you just created for sub-category 9. ? Now following the above two examples, let?s create a custom template for a specific product in Category 1, sub-category 9, product ID 26. This is the ?out of the box? osCommerce ?Microsoft IntelliMouse Explorer? product. You would need to create a template and save it as ?index.php_1_9_26.html?. I hope by now you are seeing the pattern that STS uses to find templates. So when a visitor opens a page in your store, such as a product page for product ID 26, STS will first see if there is a ?index.php_1_9_26? template. If there is such a template, STS will use it. If not, STS will continue the search but this time look for the next higher up template which would be ?index.php_1_9.html?. If there is such a template, STS will use it. If not, STS will continue the search but this time look for the next higher up template which would be ?index.php_1.html?. If there is such a template, STS will use it. If not, STS will end it?s search and use the ?default? template, which unless you have changed the default settings would be ?sts_template.html?. The same procedure goes for any ?content? templates you would have created. Please use the above ?mini-tutorial? to guide you through the ?content? template process. :thumbsup: I hope this has helped you in understanding how the templating structure works with STS. Bill Kellum Sounds Good Productions 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...
bkellum Posted October 25, 2006 Share Posted October 25, 2006 STS template structure: It is best to save your default template file as sts_template.html. Then, you would stipulate this in the STS "Default" module in the admin panel. The "sts_template.html" file would be used for all pages in your shop that you have not created a custom template for. Now, to answer your question about custom templates for specific pages: First you need to understand how STS "searches" to see if a custom template is available. A flow chart is available in the STS manual to show how this works. As an overview of the process, it works like this: ? If you wanted to create a template for Category 3, which is the "out of the box" osCommerce "Hardware" category, you would create a template and save it as "index.php_3.html". ? Now if you wanted to create a template for a sub-category within a category you would do the following (using the example above): Create a template and save it as "index.php_3_9.html" to be used as a template for the "out of the box" category "Hardware" and sub-category "Mice". Now this template will be used each time a visitor opens up the "mice" sub-category (sub-category 9) in your store. Keep in mind that the template for Category "Hardware" (Category 1) is totally independent of the template you just created for sub-category 9. ? Now following the above two examples, let's create a custom template for a specific product in Category 1, sub-category 9, product ID 26. This is the "out of the box" osCommerce "Microsoft IntelliMouse Explorer" product. You would need to create a template and save it as "index.php_1_9_26.html". I hope by now you are seeing the pattern that STS uses to find templates. So when a visitor opens a page in your store, such as a product page for product ID 26, STS will first see if there is a "index.php_1_9_26" template. If there is such a template, STS will use it. If not, STS will continue the search but this time look for the next higher up template which would be "index.php_1_9.html". If there is such a template, STS will use it. If not, STS will continue the search but this time look for the next higher up template which would be "index.php_1.html". If there is such a template, STS will use it. If not, STS will end it's search and use the "default" template, which unless you have changed the default settings would be "sts_template.html". The same procedure goes for any "content" templates you would have created. Please use the above "mini-tutorial" to guide you through the "content" template process. :thumbsup: I hope this has helped you in understanding how the templating structure works with STS. Bill Kellum Sounds Good Productions Be sure to activate the Index and Product Info modules in the admin to use the above features. 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...
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.