Results 1 to 8 of 8
  1. #1
    Join Date
    Oct 2010
    Location
    Shropshire
    Posts
    174
    Plugin Contributions
    0

    Default Text Attribute comments

    I am feeling particularly dense
    I want the text attribute comment to be after the attribute not before. I can see a variable $options_comment_position used in tpl_modules_attributes.php that can take the value 0 or 1 as a flag to indicate this.

    I cannot see in Admin where to set this flag.

    Please can someone put an old dog out of his misery.

  2. #2
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    6,196
    Plugin Contributions
    0

    Default Re: Text Attribute comments

    Edit your stylesheet.css Find it there or add this declaration..

    .attributesComments {
    float: right;
    }

  3. #3
    Join Date
    Oct 2010
    Location
    Shropshire
    Posts
    174
    Plugin Contributions
    0

    Default Re: Text Attribute comments

    really - I got the impression from the code that an entry in the database is used.
    Code:
    <?php
      if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {
    ?>
    <h3 class="attributesComments"><?php echo $options_comment[$i]; ?></h3>
    <?php
      }
    ?>
    
    <div class="attribsOptions">
    <h4 class="optionName back"><?php echo $options_name[$i]; ?></h4>
    <div class="back"><?php echo "\n" . $options_menu[$i]; ?></div>
    <br class="clearBoth" />
    </div>
    
    <?php if ($options_comment[$i] != '' and $options_comment_position[$i] == '1') { ?>
        <div class="ProductInfoComments"><?php echo $options_comment[$i]; ?></div>
    <?php } ?>

  4. #4
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    13,969
    Plugin Contributions
    96

    Default Re: Text Attribute comments

    Quote Originally Posted by tsrplatelayer View Post
    really - I got the impression from the code that an entry in the database is used.
    While the code might imply that there's a database entry ... there isn't!

  5. #5
    Join Date
    Oct 2010
    Location
    Shropshire
    Posts
    174
    Plugin Contributions
    0

    Default Re: Text Attribute comments

    ah - yes - I see in attributes.php it has
    Code:
    $options_comment_position[] = ($products_options_names->fields['products_options_comment_position'] == '1' ? '1' : '0');
    which always sets to 0

    Perhaps somthing is planned - or was and didnt materialise.

    Ah well - I feel a little override code coming on.

    At least I wasnt just loosing my marbles

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Text Attribute comments

    That apparently was something left unfinished long ago. The db table field is there, ready to use.
    If you want all the comments below the inputs, you can switch the 1 and 0 in these statements

    if ($options_comment[$i] != '' and $options_comment_position[$i] == '0') {

    if ($options_comment[$i] != '' and $options_comment_position[$i] == '1') {

  7. #7
    Join Date
    Oct 2010
    Location
    Shropshire
    Posts
    174
    Plugin Contributions
    0

    Default Re: Text Attribute comments

    Exactly what I had in mind

    Thanks all

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

    Default Re: Text Attribute comments

    Eleven years later, fixed by this PR:
    https://github.com/zencart/zencart/pull/4855
    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. Attribute Comments
    By mattys in forum Templates, Stylesheets, Page Layout
    Replies: 25
    Last Post: 9 Jul 2010, 07:11 AM
  2. attribute options comments
    By artifaxworthing in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 6 Jul 2010, 12:06 PM
  3. moving 'attribute comments'
    By artifaxworthing in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 2 Jul 2010, 04:47 PM
  4. Default text in Order Comments Text Field?
    By Steven300 in forum General Questions
    Replies: 9
    Last Post: 19 May 2009, 03:19 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