Jump to content

PandA.nl

Members
  • Content count

    312
  • Joined

  • Last visited

Posts posted by PandA.nl


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


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


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


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


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


  6. Hi Simon,

     

    I had the same problem and I made a fix for it. I posted it to the support thread, and it's also uploaded to the contribution itself in a text file.

     

    Btw: I'm told that the tax is added before the payment is finalized at PayPal (even without the fix),

     

    hth

     

    Paul


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


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


  9. I need some help,

     

    I have it up and running, but it seems to display odd font sizes (not obeying css)

    it looks like you haven't set the font-size

     

    if you add:

    td {
    font-size: 9pt;
    }

    to your stylesheet, the size changes accordingly

     

    Not sure if its related, but I noticed that you have quite some styles under #products in the stylesheet, but I don't see any id="products" in your HTML source


  10. The HTML template for the BTS is targetted at users that have the BTS pre-installed but, for whatever reason, would rather edit an HTML template (in stead of a PHP enabled template).

     

    requires at least the BTSv1.5x (=> any BTSv.1.5 version will do) to be installed

    affected files: none (drop in template)

    estimated time needed for installation: < 1 minute

     

    It's an STS alike addon, it even uses the same tag names as much as possible, so (hopefully) switching and converting templates between the two will be easy.

     

    download: http://www.oscommerce.com/community/contributions,3126


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


  12. Hi TJ,

     

    I've just installed BTS v1.5f over a virgin installation of osCommerce 2.2-ms2, on Windows 2003 Advanced Server with IIS, using PHP 5.0.3 and MySQL 4.1.7-nt.

    Unfortunately the current osCommerce version (2.2ms2) is not compatible with both PHP5.x and MySQL4.1x, so this is not a BTS problem but an ms2 problem.

     

    One of the problems is that $HTTP_POST_VARS and $HTTP_GET_VARS are depricated, and support for it is disabled by default in PHP5.

     

    I tried to start a dicussion about this once but didn't get any feedback. I might release a PHP5 contribution soon (not because I'm an expert on the subject, only because nobody else seems to be prepared to do it, and we really do need a spot to gather and spread the info ).


  13. sorry, I've got a bit lost in amongst all the updates! I'm changing from 1.4 to 1.5, em, what update do I use?

    I can see what you mean, it's not as clear as I thought/hoped it would be.

     

    The 1.5 updates only contain the latest changed files, and are only to be used on top of the previous full 1.5 version.

     

    To upgrade from v1.4 the best way to go is to download the latest full version first (currently BTSv1.5d), and apply (=copy) the 1.5f update after installing or upgrading to 1.5d. The full 1.5 versions include upgrade instructions for 1.4 to 1.5.


  14. Hoi Carine!

     

    So the world should get prepared ...

    Q: "What template system do you have ?"

    A: "Both ! "

    :lol:

     

    And with a little luck it will soon be:

     

    Q: "What template system do you have ?"

    A: "All three !"

     

    :P

     

    I am working on a HTML template for the BTS now (w.o. the STS), and the first tests seem promising.

     

    PHP is fun :)


  15. I am very interested in this. Has anyone installed it yet?

    I have :D

     

    What BTS version do you have?

     

    B.t.w. installing it won't do any harm (and will only cost a minute) since no files are overwritten or changed, only some sts files are added and a special STS template is added next to the others. It won't work as it is on older (<1.5) BTS versions though. With the BTSv1.5a to 1.5e you have to overwrite (or edit) the configure_bts.php file, so you should be safe by backing that one up if needed.


  16. The STS-for-the-BTS is targetted at users that have the BTS pre-installed but, for whatever reason :'( , would rather use the STS to edit or add their template(s).

     

    First (and maybe last ;) ) version, so please beware of bugs and backup before installation!

     

    Please note that I'm not an STS user myself, I really don't know much about the STS, I only copied and pasted its code to make it easy to install on top of the BTSv1.5f (installing on other BTSv1.5, and even older, verions should be quite easy too).

     

    Surely it's possible some or several STS features won't work as they should or even won't work at all (as I don't know how the STS should work I really would not know).

     

    B.t.w. only basic php knowledge is required to do the same, and more, using the BTS as is possible with the STS.

     

    Feedback welcome, but please don't ask me anything about the STS itself!

     

    download link will follow...


  17. He Philippe,

     

    so you are still a BTS fan ? :D

     

    <?php if (bts_select('stylesheets', $PHP_SELF)) { // if a specific stylesheet exists for this page it will be loaded ?>

    :blush:

     

    that's an error, it should read:

    <?php if (bts_select('stylesheets', $PHP_SELF)) { // if a specific stylesheet exists for this page it will be loaded ?>
    <link rel="stylesheet" type="text/css" href="<?php echo (bts_select('stylesheets', $PHP_SELF)); // BTSv1.5f ?>">
    <?php } ?>

    corrected and uploaded as update v1.5f


  18. Hi Haydur,

     

    all differences between the templates on how those "large center boxes" appear, are done by different stylesheet settings per template. Even much more is possible using css only, but to do it right and to really change the layout for example, changes to the box class are needed.

     

    A quite easy hack to have some more control over these boxes would be to surround these by a div having a CSS class and/or id assigend (by adding the divs to the appr. places in the content/ templates). That way the styling becomes easyer and more powerfull (you need to know some CSS of course).

     

    The corner gifs are not removed but only hidden, since I didn't feel like making changes to the core for this, at the time I created the templates (long time ago :) ).

     

    look for something like this in the stylesheet(s):

    /* hide corner gif's */
    td.infoBoxHeading img {
    display: none;
    }


  19. New note: it's also possible/likely that $_SESSION['cartID'] actually should have a value at the time it's checked by the PaylPal module. And that would mean detecting the null value as true is an error!

     

    Anybody around that knows more about this cartID? Or that is willing to test it's value on another (test)shop?


  20. I've got some trouble i.c.w. the "official PayPal IPN module"and this register_globals patch

    Ok, in case others have the same issue I've found a better fix now

     

    change (inludes/modules/payment/paypal_ipn.php):

         if (tep_session_is_registered('cartID')) {

     

    to

         // if (tep_session_is_registered('cartID')) {
    // PandA.nl: register_globals fix!?
         if (array_key_exists('cartID', $_SESSION)) {

     

    end fix

    /***********************************/

     

    notes:

     

    it appears that

      function tep_session_is_registered($variable) {
       return session_is_registered($variable);
     }

    returns TRUE if the key for $variable exists in the SESSION array, even if $variable does not have a value assigend

     

    but

      function tep_session_is_registered($variable) {
       return isset($_SESSION[$variable]);
     }

    returns FALSE if the key exists for $variable, but $variable does not have a value assigend

     

    Of course it's quite rare that a SESSION variable exists and does not have a value at the same time.

    This seems like a bug/flaw to me, allthough I'm not sure if it's a osC bug (to add an empty var to the session array, and check for the existence later), and/or if the sessions.php function of the register_globals patch should be updated like this:

     

    change:

      function tep_session_is_registered($variable) {
       return isset($_SESSION[$variable]);
     }

    to:

      function tep_session_is_registered($variable) {
       return array_key_exists($variable,$_SESSION);
     }

    ?? or something like that?

    so that empty session vars will be detected as registered too


  21. If you don't mind, can you tell me which template file. The file named "products_new" is for the new products page, not for the infobox. So which one is it?

    There are no separate templates for those infoboxes unfortunately, you will need to modify the box class for that (includes/classes/boxes.php)

    (or write some other alternative code for it).

×