*

jcarrolo01

  • *****
  • 256 posts
Comments emails not send
« on: January 04, 2021, 08:46:37 AM »
Hello..

On latest osclass version is implemented  the owner of listing will receive a mail when one of the own listings have a new comment..

I setup in admin dashboard-> settings -> comments -> There's a new comment on his listing

But this seems its not working, i make the experiment, comment my own listing, but i never receive the email... i realize also, there is no email template for this option in admin dashboard -> settings -> email templates.

Best regards
Joao carrolo

*

MB Themes

Re: Comments emails not send
« Reply #1 on: January 04, 2021, 11:29:49 AM »
@jcarrolo01
It's been there for a while.
Function that sends email can be found at oc-includes/osclass/email.php on line 1376 and is called fn_email_new_comment_user, using email_new_comment_user email template.
This template seems to be properly added during installation.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots

*

jcarrolo01

  • *****
  • 256 posts
Re: Comments emails not send
« Reply #2 on: January 05, 2021, 12:35:34 AM »
@jcarrolo01
It's been there for a while.
Function that sends email can be found at oc-includes/osclass/email.php on line 1376 and is called fn_email_new_comment_user, using email_new_comment_user email template.
This template seems to be properly added during installation.

Thanks allot for your reply. Usually when i write something on forum is to report an issue, usually i solve the issues i found. I report because if i found something wrong, is wrong for all the ones that use the script


Best regards
Joao carrolo

*

chris

  • **
  • 29 posts
Re: Comments emails not send
« Reply #3 on: February 02, 2021, 12:19:12 AM »
A mail is sent to the listing's owner if the comment's author is a registered member / user (and connected) but if he is not, even if he has properly completed the comments forms including his meail, the listing's owner does not receive an email. It's indeed a problem.

It should be solved quite easily i think (the listing's owner ought to receive a mail each time a comment has been published on his ad, wether the author is a registred member or not) BUT another thing need to be fix after that : the last comment's author himself ought to receive a mail if/once the listing's author has answered via the comments. (he can also choose to answer by emailing him).
« Last Edit: February 02, 2021, 09:39:25 AM by chris »

*

chris

  • **
  • 29 posts
Re: Comments emails not send
« Reply #4 on: February 02, 2021, 11:58:10 AM »
MB -> I'm trying to modify / improve the system. First, could you tell me if you have changed something in the comments system (in sigma theme) since the 4.2.1 version ? If not, you can read futher :

In my opinion (and it works like this in some other themes like alpha) : comments (if comments are activated and when number of comments >0 ) ought to appear to everyone, even if admin has chosen to allow comments to registered users only, but the posting form should be hidden in that case. RIght ? (right now : comments are hidden)

*

chris

  • **
  • 29 posts
Re: Comments emails not send
« Reply #5 on: February 02, 2021, 12:54:16 PM »
i have done the modifications in that way if someone is interested ...

*

jcarrolo01

  • *****
  • 256 posts
Re: Comments emails not send
« Reply #6 on: February 14, 2021, 01:57:06 AM »
i have done the modifications in that way if someone is interested ...

You you explain how it work your mod?

Best regards
Joao

*

chris

  • **
  • 29 posts
Re: Comments emails not send
« Reply #7 on: May 04, 2021, 03:50:31 PM »
   <!-- COMMENTS-->

  <?php if( osc_comments_enabled() ) { ?>

    <div id="comments">
      <h2><?php _e('Comments', 'sigma'); ?></h2>
     
        <?php if( ( osc_logged_user_id() == osc_item_user_id() ) && osc_logged_user_id() != 0 ) { ?>
        <p class="problem own">
       
      Attention : rédiger de faux avis est un motif de bannissement sans préavis du site
    </p>
       
      <?php }?>
      <ul id="comment_error_list"></ul>
      <?php CommentForm::js_validation(); ?>
     
        <div class="comments_list">
          <?php while ( osc_has_item_comments() ) { ?>
            <div class="comment <?php if(osc_profile_img_users_enabled()) { ?>has-user-img<?php } ?>">
              <?php if(osc_profile_img_users_enabled()) { ?>
                <p class="user-img">
                  <img src="<?php echo osc_user_profile_img_url(osc_comment_user_id()); ?>" alt="<?php echo osc_esc_html(osc_comment_author_name()); ?>"/>
                </p>
              <?php } ?>
              <?php
$datepubli = osc_comment_pub_date();
$datepubli2 = strftime(" %d %m %G - %H:%I", strtotime($datepubli));
?>


              <h3><strong><?php echo osc_comment_title(); ?></strong> <em>(<?php _e("by", 'sigma'); ?> <?php echo osc_comment_author_name(); ?> le <?php echo "$datepubli2"; ?>)</em></h3>

              <?php if(osc_enable_comment_rating()) { ?>
                <p class="comment-rating">
                  <?php for($i = 1; $i <= 5; $i++) { ?>
                    <?php
                      $class = '';
                      if(osc_comment_rating() >= $i) {
                        $class = ' fill';
                      }
                    ?>
                    <i class="fa fa-star<?php echo $class; ?>"></i>
                  <?php } ?>

                  <span>(<?php echo sprintf(__('%d of 5', 'sigma'), osc_comment_rating()); ?>)</span>
                </p>
              <?php } ?>

              <p><?php echo nl2br( osc_comment_body() ); ?> </p>
              <?php if ( osc_comment_user_id() && (osc_comment_user_id() == osc_logged_user_id()) ) { ?>
              <p>
                <a rel="nofollow" href="<?php echo osc_delete_comment_url(); ?>" title="<?php _e('Delete your comment', 'sigma'); ?>"><?php _e('Delete', 'sigma'); ?></a>
              </p>
              <?php } ?>
            </div>
          <?php } ?>
        </div>
         </div>
         
          <?php } ?>
           <?php if( osc_comments_enabled() ) { ?>
           
       
   <?php if(osc_reg_user_post_comments() && osc_is_web_user_logged_in() || !osc_reg_user_post_comments()) { ?>
 <div id="comments">
        <div class="paginate"><?php echo osc_comments_pagination(); ?></div>
     

      <div class="form-container form-horizontal new-comment">
        <div class="header">
          <h3><?php _e('Leave your comment (spam and offensive messages will be removed)', 'sigma'); ?></h3>
        </div>
        <div class="resp-wrapper">
          <form action="<?php echo osc_base_url(true); ?>" method="post" name="comment_form" id="comment_form">
            <fieldset>

              <input type="hidden" name="action" value="add_comment" />
              <input type="hidden" name="page" value="item" />
              <input type="hidden" name="id" value="<?php echo osc_item_id(); ?>" />
              <?php if(osc_is_web_user_logged_in()) { ?>
                <input type="hidden" name="authorName" value="<?php echo osc_esc_html( osc_logged_user_name() ); ?>" />
                <input type="hidden" name="authorEmail" value="<?php echo osc_logged_user_email();?>" />
              <?php } else { ?>
                <div class="control-group">
                  <label class="control-label" for="authorName"><?php _e('Your name', 'sigma'); ?></label>
                  <div class="controls">
                    <?php CommentForm::author_input_text(); ?>
                  </div>
                </div>
                <div class="control-group">
                  <label class="control-label" for="authorEmail"><?php _e('Your e-mail', 'sigma'); ?></label>
                  <div class="controls">
                    <?php CommentForm::email_input_text(); ?>
                  </div>
                </div>
              <?php }; ?>
              <?php if(osc_enable_comment_rating()) { ?>
              <div class="control-group">
                <label class="control-label" for="title"><?php _e('Rating', 'sigma'); ?></label>
                <div class="controls">
                  <?php //CommentForm::rating_input_text(); ?>
                  <input type="hidden" name="rating" value="" />

                  <div class="comment-leave-rating">
                    <i class="fa fa-star is-rating-item" data-value="1"></i>
                    <i class="fa fa-star is-rating-item" data-value="2"></i>
                    <i class="fa fa-star is-rating-item" data-value="3"></i>
                    <i class="fa fa-star is-rating-item" data-value="4"></i>
                    <i class="fa fa-star is-rating-item" data-value="5"></i>
                  </div>
                 
                  <span class="comment-rating-selected"></span>
                </div>
              </div>
              <?php } ?>
              <div class="control-group">
                <label class="control-label" for="title"><?php _e('Title', 'sigma'); ?></label>
                <div class="controls">
                  <?php CommentForm::title_input_text(); ?>
                </div>
              </div>
              <div class="control-group">
                <label class="control-label" for="body"><?php _e('Comment', 'sigma'); ?></label>
                <div class="controls textarea">
                  <?php CommentForm::body_input_textarea(); ?>
                </div>
              </div>
              <div class="actions">
                <button type="submit" class="btn btn-primary"><?php _e('Send', 'sigma'); ?></button>
              </div>

            </fieldset>
          </form>
         
           </div>
        </div>
      </div>

     
   
    <?php } ?>
  <?php } ?>
 
  </div>
   <!-- END COMMENTS-->