Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2007
    Location
    Mount Maunganui, New Zealand
    Posts
    419
    Plugin Contributions
    0

    Default Add a personal note in a php file

    Hi,
    I'd simply (and cleanly) like to add a personal note when I attempt to edit a php file.

    Eg.
    // "I added the below code when trying to install xsell module"
    require($template->get_template_dir('tpl_modules_xsell_products.php',

    (the // is just a wild shot. What should I use that so the comment doesn't affect the code?)

    Thanks

  2. #2
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,267
    Plugin Contributions
    3

    Default Re: Add a personal note in a php file

    Yes... this COMMENTS OUT php code - but be aware that in many files, the php is interspersed with html markup.

    You can use the // comment tags, when the strings you are working with are enclosed in:

    <?php

    code here...

    ?>

    When it breaks to HTML, you use <!-- html here... -->
    20 years a Zencart User

  3. #3
    Join Date
    Jan 2007
    Location
    Mount Maunganui, New Zealand
    Posts
    419
    Plugin Contributions
    0

    Default Re: Add a personal note in a php file

    Ah perfect. That's why it hadn't worked for me a while back.
    Thanks for explaining.

  4. #4
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    10,532
    Plugin Contributions
    127

    Default Re: Add a personal note in a php file

    Also note that // is a single line comment. If you want multiline comments, you can enclose them in /* and */

    /*
    This is a
    multiline
    comment
    */

    is the same as

    // This is a
    // multiline
    // comment
    That Software Guy. My Store: Zen Cart Support
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

 

 

Similar Threads

  1. Replies: 16
    Last Post: 11 Feb 2009, 08:59 AM
  2. Add custom note to product?
    By z3n in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 21 May 2008, 06:08 PM
  3. Add note to my Checkout_Payment
    By kevinmc3 in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 16 Dec 2006, 03:01 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg