8theme Products Element / captcha - by EE Eric

This topic has 7 replies, 2 voices, and was last updated 6 years ago ago by Rose Tyler

  • Avatar: EE Eric
    EE Eric
    Participant
    November 21, 2018 at 12:45

    Hi,
    can I change the “move forwards arrows” in the products element? I want them to be always visible.
    Now it is like that: https://prnt.sc/ll3p2q
    And I want them to be like that: https://prnt.sc/ll3qli

    Also can I delete the captcha from contact form? Or can I make them bigger? Now it is nearly visible for old people.

    6 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 21, 2018 at 14:46

    Hello,

    1) Please try to use this code in Global custom css:

    .carousel-area .owl-nav {
        opacity: 1;
    }

    2. To remove captcha, please copy et_send_msg_action function (framework/theme-functions.php) and et_contact_form function (framework/shortcodes) into functions.php file of child theme and delete this code http://prntscr.com/ll5kj1 http://prntscr.com/ll5k73

    Regards

    Avatar: EE Eric
    EE Eric
    Participant
    November 23, 2018 at 11:41

    Hi there,
    1) I did that and it works great for desktop, on the mobile it didn’t work.
    2) should I copy all of these functions: https://prnt.sc/llz5l8 and https://prnt.sc/llz6d2 (it goes down till the end of that functions), to functions.php?

    Avatar: EE Eric
    EE Eric
    Participant
    November 23, 2018 at 11:45

    I didn’t know what happened, but know I’ve got problem with single product gallery: https://prnt.sc/llz89y

    It was great, I have updated the theme today and then I add this to Global CSS:

    .carousel-area .owl-nav {
    opacity: 1;
    }

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 23, 2018 at 12:11

    Hello,

    1) Please change the previous code to:

    .carousel-area .owl-nav {
        opacity: 1;
    }
    @media only screen and (max-width: 768px) {
        .carousel-area .owl-nav {
            display: block !important;
        }
    }

    2) This code needs to be added in functions.php of the child theme:

    function et_contact_form($atts) {
        extract( shortcode_atts( array(
          'class' => ''
        ), $atts ) );
    
        $captcha_instance = new ReallySimpleCaptcha();
        $captcha_instance->bg = array( 244, 80, 80 );
        $word = $captcha_instance->generate_random_word();
        $prefix = mt_rand();
        $img_name = $captcha_instance->generate_image( $prefix, $word );
        $captcha_img = ETHEME_CODE_URL.'/inc/really-simple-captcha/tmp/'.$img_name;
    
        ob_start();
        ?>
            <div id="contactsMsgs"></div>
            <form action="<?php the_permalink(); ?>" method="get" id="contact-form" class="contact-form <?php echo $class; ?>">
    
                <div class="form-group">
                  <p class="form-name">
                    <label for="name" class="control-label"><?php esc_html_e('Name and Surname', 'woopress') ?> <span class="required">*</span></label>
                    <input type="text" name="contact-name" class="required-field form-control" id="contact-name">
                  </p>
                </div>
    
                <div class="form-group">
                    <p class="form-name">
                      <label for="contact-email" class="control-label"><?php esc_html_e('Email', 'woopress') ?> <span class="required">*</span></label>
                      <input type="text" name="contact-email" class="required-field form-control" id="contact-email">
                    </p>
                </div>
    
                <div class="form-group">
                  <p class="form-name">
                    <label for="contact-website" class="control-label"><?php esc_html_e('Website', 'woopress') ?></label>
                    <input type="text" name="contact-website" class="form-control" id="contact-website">
                  </p>
                </div>
    
                <div class="form-group">
                  <p class="form-textarea">
                    <label for="contact_msg" class="control-label"><?php esc_html_e('Message', 'woopress'); ?> <span class="required">*</span></label>
                    <textarea name="contact-msg" id="contact-msg" class="required-field form-control" cols="30" rows="7"></textarea>
                  </p>
                </div>
    
                <?php if ( etheme_get_option( 'privacy_contact' ) ): ?>
    		        <p class="form-row privacy-policy">
    		            <?php echo etheme_get_option( 'privacy_contact' ); ?>
    		        </p>
    		    <?php endif ?>
    
                <p class="pull-right">
                  <input type="hidden" name="contact-submit" id="contact-submit" value="true" >
                  <span class="spinner"><?php esc_html_e('Sending...', 'woopress') ?></span>
                  <button class="btn btn-black big" id="submit" type="submit"><?php esc_html_e('Send message', 'woopress') ?></button>
                </p>
    
                <div class="clearfix"></div>
            </form>
        <?php
        $output = ob_get_contents();
        ob_end_clean();
    
        return $output;
      }
    
       function et_send_msg_action() {
    
            $captcha_instance = new ReallySimpleCaptcha();
    
            if(isset($_GET['contact-submit'])) {
                header("Content-type: application/json");
                $name = '';
                $email = '';
                $website = '';
                $message = '';
                $reciever_email = '';
                $return = array();
    
                if( trim( $_GET['contact-name'] ) === '') $return['msg'][] = esc_html__( 'fill in the "Name and Surname" field.', 'woopress' );
    
                if( trim( $_GET['contact-email'] ) === '' || !isValidEmail( $_GET['contact-email'] ) ) $return['msg'][] = esc_html__( 'Please enter a valid email.', 'woopress' );
    
                if( trim( $_GET['contact-msg'] ) === '') $return['msg'][] = esc_html__( 'fill in the "Message" field.', 'woopress' );
    
                // Check if we have errors
    
                if( ! isset( $return['msg'] ) ) {
                    $name = trim($_GET['contact-name']);
                    $email = trim($_GET['contact-email']);
                    $message = trim($_GET['contact-msg']);
                    $website = stripslashes(trim($_GET['contact-website']));
    
                    // Get the received email
                    $reciever_email = etheme_get_option('contacts_email');
    
                    $subject = 'You have been contacted by ' . $name;
    
                    $body = "You have been contacted by $name. Their message is: " . PHP_EOL . PHP_EOL;
                    $body .= $message . PHP_EOL . PHP_EOL;
                    $body .= "You can contact $name via email at $email";
                    if ($website != '') {
                        $body .= " and visit their website at $website" . PHP_EOL . PHP_EOL;
                    }
                    $body .= PHP_EOL . PHP_EOL;
    
                    $headers = "From $email ". PHP_EOL;
                    $headers .= "Reply-To: $email". PHP_EOL;
                    $headers .= "MIME-Version: 1.0". PHP_EOL;
                    $headers .= "Content-type: text/plain; charset=utf-8". PHP_EOL;
                    $headers .= "Content-Transfer-Encoding: quoted-printable". PHP_EOL;
    
                    if(wp_mail($reciever_email, $subject, $body, $headers)) {
                        $return['status'] = 'success';
                        $return['msg'] = esc_html__('All is well, your email has been sent.', 'woopress');
                    } else{
                        $return['status'] = 'error';
                        $return['msg'] = esc_html__('Error while sending a message!', 'woopress');
                    }
                    $captcha_instance->remove( $_GET['captcha-prefix'] );
    
                }else{
                    // Return errors
                    $return['status'] = 'error';
                    //$return['msg'] = __('Please, fill in the required fields!', ETHEME_DOMAIN);
                }
    
                echo json_encode($return);
                die();
            }
        }

    Regards

    Avatar: EE Eric
    EE Eric
    Participant
    November 23, 2018 at 12:48

    I didn’t know what happened, but know I’ve got problem with single product gallery: https://prnt.sc/llz89y

    I have added the code in Global Custom CSS and also I have updated theme today.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 23, 2018 at 12:52

    Hello,

    Theme Options > Single product page > Enable slider for gallery images > On.

    Regards

  • Viewing 7 results - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.