Guest Posted April 17, 2005 Share Posted April 17, 2005 I've been running osCommerce 2.2-M2 in its 'vanilla' out-of-the-box configuraiton without any problems with Windows 2003/IIS/PHP 5.0.3/MySQL 4.1.7-nt (with the hacks mentioned previously) without a problem for a year now. It was only when I installed BTS (hoping to make it easier to customise the look-n-feel) that I ran into this problem. I guess I'll just have to go back to the vanilla installation. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 17, 2005 Share Posted April 17, 2005 I've discovered the reason for the failure of the BTS templates... After installing them and doing an initial run-through, I re-enabled the osCommerce cache. Checking the Admin->Tools->Cache Control I noticed that two 'boxes' listed were the two showing problems with BTS - Catagories and Manufacturers. I tried clearing the caches for these, and the help template again showed the CSS developer info but not all the Categories or Manufacturers. I then disabled caching in Admin->Configuration->Cache "Use Cache"=false and the site appears to be working correctly. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 17, 2005 Share Posted April 17, 2005 I've discovered a logic error in one of the Javascript functions. \includes\javascript\form_check.js.php In check_input(field_name, field_size, message) if (field_value == '' || field_value.length < field_size) { error_message = error_message + "* " + message + "\n"; error = true; The condition in the if clause doesn't allow for field_size being set to 0 (zero) in the osCommerce Admin->Configuration->Minimum Values. It should read: if ((field_size > 0 && field_value == '') || field_value.length < field_size ) { error_message = error_message + "* " + message + "\n"; error = true; Its an issue that affects many, many applications where the designers arbitarily assume that everyone will have an Anglo-Saxon-style first-name last-name. My name in particular often causes such applications to refuse data or get confused - its simply "TJ" - not an abbreviation, and only one word. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 17, 2005 Share Posted April 17, 2005 Hi TJ, thanks for the feedbcak. I think you are right about the cache problem. It's also interesting to hear about the other fixes, I do want to make clear however that the other two issues ($HTTP_... and the javascript) are not caused by the BTS itself! It's stock osC code (including most issues and bugs), it only has been moved to another location. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 18, 2005 Share Posted April 18, 2005 Hi TJ, I uploaded a fix (suggestion) for the cache problem ( to http://www.oscommerce.com/community/contributions,1263 ), could you try it, and maybe also review the code? It seems to work ok on my test system. Quote Link to comment Share on other sites More sharing options...
ieuflr2000 Posted April 18, 2005 Share Posted April 18, 2005 Bonjour Paul, J?ai fait la mise a jour avec ? BTS-cache-fix-suggestion ? . Il est vrai que j?avais un probl?me avec le Panier apr?s suppressions des articles. Je vous tien au courant. Philippe -------------- Hello Paul, I made the update with "BTS-mask-fix-suggestion". It is true that I had a problem with the Basket after removals of thearticles. I you tien with the current. Philippe Hi TJ, I uploaded a fix (suggestion) for the cache problem ( to http://www.oscommerce.com/community/contributions,1263 ), could you try it, and maybe also review the code? It seems to work ok on my test system. <{POST_SNAPBACK}> Quote IEUFLR2000 Link to comment Share on other sites More sharing options...
Guest Posted April 19, 2005 Share Posted April 19, 2005 Half of the cache problem appeared to be an osC bug (actually just a typo in the osC cache class) which I did not know about and overlooked. :rolleyes: I think the cache should work fine now, any comments/suggestions are welcome of course. B.t.w. for the ones that are stuck with the BTS (you have to use it, for whatever reason, but you don't like that the template contains PHP): I've recently released the first version of an HTML template for the BTS. It allows you to make most layout changes by editting one HTML file, it's an STS alike feature (I guess). download: http://www.oscommerce.com/community/contributions,3127 If you don't have problems with PHP templates, it won't be of much use to you, it might be fun to try it out though :) It only takes one minute to install and no files are overwritten with the current version, so nothing can go wrong. Quote Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2005 Share Posted April 20, 2005 Please Advice ---------------- I am installing a webshop and will be using a lot of different osc contributions. one of the contribution should either be BTS or STS Template System. Has any of you guys experiences of both these modules and if so what makes BTS better then STS!? Also, is there alot of contributions that i won?t be able to use together with BTS or should most of them be compatible? Thank you so much for your advices!! Prince tom Quote Link to comment Share on other sites More sharing options...
Guest Posted April 20, 2005 Share Posted April 20, 2005 Please Advice <{POST_SNAPBACK}> Hi tom, what you asked has been asked before of course, allthough I don't recall it has been asked in this thread, so I will try to answer anyway. Most catalog contri's won't be compatible with the BTS (changes will have to be made to other files, and sometimes even to other code), some will be easy some might be difficult (depending a lot on your skills). The BTS has no influence on the admin, so admin contribs should be no problem at all. It's difficult to say which one is better. The BTS results in lower parse times, the STS is a lot easyer to combine with most catalog contribs (except for the issues with some contribs maybe, see the STS support thread). With the STS you will have to learn the STS tags and system (seems not so difficult), and with the BTS you will mainly have to learn about PHP and osC itself. The BTS uses the same structure as MS3 will have, not sure if that's a real advantage though. I don't think this will make updating to MS3 a lot easyer, maybe a little. Also search the forums for: +STS* +BTS* to find a lot more posts about the subject. cheers, Paul Quote Link to comment Share on other sites More sharing options...
tom22 Posted April 21, 2005 Share Posted April 21, 2005 Hi, I've just installed BTSv1.5d and ccgv_5_11. For running the ccgv_5_11 contrib there has to be putted some small importend code - something like: <?php echo $order_total_modules->credit_selection();//ICW ADDED FOR CREDIT CLASS SYSTEM ?> to get the coupon form field in checkout_payment.php. I don't know were to put this code now. Any idea? tom Quote Link to comment Share on other sites More sharing options...
Guest Posted April 21, 2005 Share Posted April 21, 2005 (edited) For running the ccgv_5_11 contrib there has to be putted some small importend code - something like: <?php echo $order_total_modules->credit_selection();//ICW ADDED FOR CREDIT CLASS SYSTEM ?> to get the coupon form field in checkout_payment.php. I don't know were to put this code now. Any idea? <{POST_SNAPBACK}> Hi tom, open templates/your_template/content/checkout_payment.tpl.php and look for (approx. linr 175-184): <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td> </tr> </table></td> </tr> and replace with: <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php echo $order_total_modules->credit_selection();//ICW ADDED FOR CREDIT CLASS SYSTEM ?> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td class="main"><b><?php echo TABLE_HEADING_COMMENTS; ?></b></td> </tr> </table></td> </tr> Edited April 21, 2005 by PandA.nl Quote Link to comment Share on other sites More sharing options...
tom22 Posted April 21, 2005 Share Posted April 21, 2005 open templates/your_template/content/checkout_payment.tpl.php and look for (approx. Hi Paul, I don't have anything in templates/your_template/content/ !!! I was surprised. I know the old BTS. The old one has plenty files in templates/your_template/content/ but not the new one. So I have to create a file particulary for checkout_payment.php and call it checkout_payment.tpl.php like the old BTS files? Is that the right way of using the BTS? tom Quote Link to comment Share on other sites More sharing options...
tom22 Posted April 21, 2005 Share Posted April 21, 2005 I'copied an old tpl-file in content/. Thats the only one now. But it works. Great. Thanx. If everything would be so easy, I could be happy all the time :-) tom Quote Link to comment Share on other sites More sharing options...
tom22 Posted April 21, 2005 Share Posted April 21, 2005 ....Does the BTS have any bugs in working togehter with chemos new cache contrib? tom Quote Link to comment Share on other sites More sharing options...
Guest Posted April 21, 2005 Share Posted April 21, 2005 Hi Paul, I don't have anything in templates/your_template/content/ !!! I was surprised. I know the old BTS. The old one has plenty files in templates/your_template/content/ but not the new one. So I have to create a file particulary for checkout_payment.php and call it checkout_payment.tpl.php like the old BTS files? Is that the right way of using the BTS? tom <{POST_SNAPBACK}> Hi Tom, you are right, that's one of those things that's so obvious to me, that I probably never explained it very well in the docs, but meanwhile it's logical it's not so obvious to others. The way I would do it, is take the checkout_payment.tpl.php from the fallback template (the template where the content dir has all the files) and copy it to your template and edit as yo like. After you've copied the checkout_payment.tpl.php file to your template, this new checkout_payment.tpl.php will be used instead of the fallback checkout_payment.tpl.php file. This fallback system has many advantages, two of which are: That you can easyly go back to the fallback (by deleting or renaming your editted copy). And it's very easy to track what files you've editted, because those are the only files in your template dir. edit: while writing this I see you already figured it out yourself :D Quote Link to comment Share on other sites More sharing options...
Guest Posted April 21, 2005 Share Posted April 21, 2005 ....Does the BTS have any bugs in working togehter with chemos new cache contrib? tom <{POST_SNAPBACK}> That really depends mostley on how this cache contrib works (which I don't know). If it follows the osC standards I would not expect any serious problems, because the BTS isn't very different from a vanilla osC install. The main difference is that a lot of the code has moved (combining most duplicate code into main_page). B.t.w. wheater you really need caching depends a lot on how many products and categories you are going to have. With a couple of hundreds of products and a reasonable amount of categories the total avarage parse time (without caching) should easyly stay below 0.2 seconds anyway, which usually is only a very small part of the total page load time (mainly determined by the images and HTML). Quote Link to comment Share on other sites More sharing options...
tom22 Posted April 21, 2005 Share Posted April 21, 2005 Hi Paul, I've made a gv_send.tpl.php file and put it in /content/ but without an effect. The same with gv_reedem.tpl.php - no template is used! What's wrong? tom Quote Link to comment Share on other sites More sharing options...
Guest Posted April 21, 2005 Share Posted April 21, 2005 I've made a gv_send.tpl.php file and put it in /content/ but without an effect.The same with gv_reedem.tpl.php - no template is used! <{POST_SNAPBACK}> That's probably because catalog/gv_reedem.php and catalog/gv_send.php do not exist yet (or do not have the right content). It only works for existing pages, and those gv pages probably do not exist yet. I do not know the gv contrib very well, but I assume it involves the creation of some new pages. With the BTS you wil have to create the same new pages. And to do it right, most none output related code should be added to "catalog/your_file.php" and the output (as you already found out) should be added to the template file. I never really tried to add the gv myself, but it seems not to be the easyest. I will PM you a link to an example on how someone else installed it. Quote Link to comment Share on other sites More sharing options...
tom22 Posted April 21, 2005 Share Posted April 21, 2005 That's probably because catalog/gv_reedem.php and catalog/gv_send.php do not exist yet (or do not have the right content). It only works for existing pages, and those gv pages probably do not exist yet. Right, filenames.php needs to get the specification of new a new file and the depending content. Now I get this beautiful message: Cannot redeclare tep_db_connect()..... And no Idea where to go. It's right to put this: $content = CONTENT_CHECKOUT_PAYMENT; $javascript = $content . '.js.php'; include (bts_select('main', $content_template)); // BTSv1.5 require(DIR_WS_INCLUDES . 'application_bottom.php'); in place of the html code in the original file - in the tpl file I have to put only the html stuff, is'nt it? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 21, 2005 Share Posted April 21, 2005 Now I get this beautiful message: Cannot redeclare tep_db_connect()..... <{POST_SNAPBACK}> I think application_top.php (which indirectley loads the tep_db_connect function) is being loaded twice now About the new gv pages, as far as I know there's more than one, so it depends on what gv page you're currently trying to add. The idea is to add most non output related code to the root files (directly under catalog/), and to add most output related (HTML and some PHP) code the the template file. But wherever you put it, you will allways have to strip the main_page code rom the files, because it's already outputted by main_page.tpl.php. You could take specials.php as an example on how to add new pages, just copy it (and re-define the filename) replacing some of it's code with the code you need for the new page. Quote Link to comment Share on other sites More sharing options...
tom22 Posted April 21, 2005 Share Posted April 21, 2005 Now I see the template - jeahbut only in parts . The right, left colums and the footer are missing. Why? Quote Link to comment Share on other sites More sharing options...
Guest Posted April 21, 2005 Share Posted April 21, 2005 (edited) I think that you don't see the templates output, but only the the output of some code you put in your new page, so it seems to me that main_page is not being loaded anymore now. Better just start with an existing page, like specials.php, make a copy (both root and content template file) and rename it to the filename you want and define it in filenames. And then remove the specific specials code, and replace it by the code you need. Edited April 21, 2005 by PandA.nl Quote Link to comment Share on other sites More sharing options...
tom22 Posted April 22, 2005 Share Posted April 22, 2005 I have put this : $breadcrumb->add(NAVBAR_TITLE, tep_href_link(FILENAME_GV_SEND)); $content = CONTENT_GV_SEN; $content_template = TEMPLATENAME_STATIC; include (bts_select('main', $content_template)); // BTSv1.5 require(DIR_WS_INCLUDES . 'application_bottom.php'); in the php file. Now I see everything but no content from the middle colum. When I taking off that line: [COLOR=red]#[/COLOR]$content_template = TEMPLATENAME_STATIC; I'll see only the middle content but everything else is missing. It seems funny but... I can't see my mistake - maybe another mistake is not to sleep. I will go to have a dream now, a dream with an idea to resolve every difficulties... :-) Quote Link to comment Share on other sites More sharing options...
nyrsimon Posted April 22, 2005 Share Posted April 22, 2005 Has anybody had any luck getting the category tabs to work with BTS? I'm trying to play with it, but not getting too far just yet...So far loaded the category files up under templates/Original, changed the stylesheet etc. I'm sorry I'm a newbie to OSC (but not PHP) and am hacking my way thorugh but would appreciate some pointers from the more experienced folks out there!!!! Many thanks in advance, Simon Quote Link to comment Share on other sites More sharing options...
Guest Posted April 22, 2005 Share Posted April 22, 2005 @tom22: I assume you are able to figure it out with the info I sent you @nyrsimon: there seem to be more than one category tabs contri's, are you talking about this one: http://www.oscommerce.com/community/contributions,751 ? ? 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.