Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

BTSv1.2 Support


paulm2003

Recommended Posts

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.

Link to comment
Share on other sites

  • Replies 377
  • Created
  • Last Reply

Top Posters In This Topic

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

IEUFLR2000

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Please Advice

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

 

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 by PandA.nl
Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

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

Link to comment
Share on other sites

....Does the BTS have any bugs in working togehter with chemos new cache contrib?

 

tom

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).

Link to comment
Share on other sites

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!

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

Now I get this beautiful message:

 

Cannot redeclare tep_db_connect().....

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.

Link to comment
Share on other sites

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 by PandA.nl
Link to comment
Share on other sites

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... :-)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...