Home Forums WoodMart support forum Alerts not showing anymore

Alerts not showing anymore

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #376377

    EDEN
    Participant

    Hello, we did not do the last theme update by choice, because it breaks almost all the website unluckily,

    but for some reasons unexplained the alert like the success message of CF7 do not show up anymore

    i tried on a clone they come back after the theme update

    can you please help me ? thanks !

    #376486

    Hello,

    Can you please share the WP admin login details of your site so I will check and solve the issue on the site? Please take the complete backup of your site as well so I will update the theme on the site to check why the theme update breaks your site.

    Best Regards.

    #376642

    EDEN
    Participant

    ok here are details of a clone with updated theme

    on homepage you will see that my customized filter search does not work anymore because you drastically changed all the theme (you can compare with official url)

    i am one of your very first customer and must confess to be really sad because the development of this code costed me a LOOT of money energy and time, and for something probably small it doesnt work anymore

    and avbout the cf7 alert you can test it on the page DEVIS EN LIGNE

    thanks for all the help

    #376643

    EDEN
    Participant

    just for info, the alert issue is fixed now, there is a bug with a plugin called confetti, i contacted the dev, if you can take a look at my filter search i would be owing you forever !

    #376792

    Hello,

    We are Glad that your issue has been Resolved.

    Could you please elaborate what issue you are facing with the search to check it myself and help you out accordingly.

    Best Regards

    #376798

    EDEN
    Participant

    Hi Aizaz, very easy, look on official url on top how the search on top with the three drop downs work

    and see on the clone how it looks after the theme update

    thanks so much i put all our hope on you cause we really want to enjoy the update as everyone, we pay new licence of woodmart every every year since 4 or 5 years

    #376856

    Hello,

    Please try re adding the filter on the clone site then check back.

    If the problem still continues then deactivate all the third party plugins and tell me then we will troubleshoot with the theme plugins.

    Best Regards

    #376871

    EDEN
    Participant

    The filter is on the clone, this is all the text that you see

    the problem is not caused by plugins, it is because you changed all the way attributs work in the new theme update

    please find attached how my filter plugin did work

    #376873

    EDEN
    Participant

    sorry here it is

    #376874

    EDEN
    Participant

    i cant copy paste it

    #376875

    EDEN
    Participant

    i try again

    <?php
    /**
     * Enqueue script and styles for child theme
     */
    function woodmart_child_enqueue_styles() {
        wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'wd-style' ), woodmart_get_theme_info( 'Version' ) );
    
        //code by Code father starts here
        wp_enqueue_script('cf-custom', get_stylesheet_directory_uri() . '/js/cf-custom.js', array('jquery'),  '', true); 
        wp_localize_script( 'cf-custom', 'cf_ajax', array('ajaxUrl' => admin_url('admin-ajax.php')) );
        //code by Code father ends here
    }
    add_action( 'wp_enqueue_scripts', 'woodmart_child_enqueue_styles', 1000 );add_filter( 'woodmart_ajax_search_symbols_count', function (){	return 2;} );
    
    //code by Code father starts here
    add_action('wp_ajax_cf_model_filter', 'cf_model_filter');
    add_action('wp_ajax_nopriv_cf_model_filter', 'cf_model_filter');
    
    function cf_model_filter(){
        $type   = $_POST['type'];
        $html   =   '';
        if($type == 'marque'){
            
    
            $args   =   array(
                "post_type"         =>   "product",
                "posts_per_page"    => -1,
                'tax_query' => array(
                    array(
                        'taxonomy' => 'pa_marque',
                        'field'    => 'term_id',
                        'terms'    => (int)$_POST['model']
                    )
                )
    
            );
    
            $objects   = new WP_Query( $args );
            while($objects->have_posts()): $objects->the_post();
                    $pID = get_the_ID();
                    $objects_ids[] = $pID;
            endwhile;
            $collections = wp_get_object_terms( $objects_ids, 'pa_modele' );
    
            if( count($collections) > 0 )
            {
                foreach($collections as $cf_cat){
                    $cat_id      =   $cf_cat->term_id;
                    $cat_name    =   $cf_cat->name;
                    $cat_slug    =   $cf_cat->slug;
                    $cat_img     =   get_term_meta($cat_id, 'image', true);
    				if(is_array($cat_img))
                    {
                        $cat_img = $cat_img['url'];
                    }
                    $html   .=   '<li class="wd-pf-'. $cat_id .' with-swatch-image with-swatch-text">
                                    <span class="swatch-inner pf-value" data-id="'. $cat_id .'" data-val="'.$cat_slug.'" data-type="model" data-title="'. $cat_name .'">
                                        <span class="filter-swatch"><span style="background-image: url('. $cat_img .');" class=""></span></span>
                                        <span class="layer-term-name">'. $cat_name .'</span>
                                    </span>
                                    </li>';
                }
            }
    }
        if($type == 'model'){
            $args   =   array(
                "post_type"         =>   "product",
                "posts_per_page"    => -1,
                'tax_query' => array(
                    array(
                        'taxonomy' => 'pa_modele',
                        'field'    => 'term_id',
                        'terms'    => (int)$_POST['model']
                    )
                )
            );
            $objects   = new WP_Query( $args );
            while($objects->have_posts()): $objects->the_post();
                    $pID = get_the_ID();
                    $objects_ids[] = $pID;  
            endwhile;
            $collections = wp_get_object_terms( $objects_ids, 'pa_cylindree' );
    
            if( count($collections) > 0 )
            {
                foreach($collections as $cf_cat){
                    $cat_id      =   $cf_cat->term_id;
                    $cat_name    =   $cf_cat->name;
                    $cat_slug    =   $cf_cat->slug;
                    $cat_img     =   get_term_meta($cat_id, 'category_icon', true); 
                    $html   .=   '<li class="wd-pf-'. $cat_slug .'">
                                    <span class="swatch-inner pf-value" data-val="'. $cat_slug .'" data-title="'. $cat_name .'"><span class="layer-term-name">'. $cat_name .'</span></span>
                                </li>';
                }
            }
        }
        wp_send_json( array(
            'html'  =>  $html,
            'type' => $_POST['type']
        ) );
        die;
    }
    add_shortcode('cf_search_form', 'cf_ajax_search');
    
    function cf_ajax_search(){
        ob_start();
        $marque_attrs    = get_terms('pa_marque'); 
        ?>
        <style>
            .cf-disable {
        background: #e6e6e6 !important;
        color: #b1b0b0 !important;
    }
    
    .cf-disable:after{
        display: none !important;
    }
    
        </style>
        <form action="https://eden-boites.com/blog/boutique/" class="wd-product-filters color-scheme-dark woodmart-product-filters" method="GET">
        <div class="wd-pf-checkboxes wd-pf-attributes cf_marque cf_click wd-checkbox-1">
            <input class="result-input" name="filter_marque" type="hidden" value="" />
            <div class="wd-pf-title">
                <span class="title-text">Marque</span>
                <ul class="wd-pf-results"></ul>
            </div>
            <div class="wd-pf-dropdown wd-scroll has-scrollbar">
                <ul class="wd-scroll-content show-labels-on swatches-large swatches-brands" tabindex="0">
                <?php
                
                   foreach($marque_attrs as $cf_cat){
                       $cat_id      =   $cf_cat->term_id;
                       $cat_name    =   $cf_cat->name;
                       $cat_slug    =   $cf_cat->slug;
                       $cat_img     =   get_term_meta($cat_id, 'image', true); 
    				if(is_array($cat_img))
                    {
                        $cat_img = $cat_img['url'];
                    }
                       echo '
                       <li class="wd-pf-'.$cat_slug.' with-swatch-image">
                        <span class="swatch-inner pf-value" data-id="'.$cat_id.'" data-type="marque" data-val="'.$cat_slug.'" data-title="'.$cat_name.'">
                            <span class="filter-swatch"><span style="background-image: url('.$cat_img.');" class="">'.$cat_name.'</span></span><span class="layer-term-name">'.$cat_name.'</span>
                        </span>
                       ';
                   }
                    
                ?>
                </ul>
                <div class="wd-scroll-pane" style="display: none;"><div class="wd-scroll-slider" style="height: 20px; transform: translate(0px, 0px);"></div></div>
            </div>
        </div>
    
        <div class="wd-pf-checkboxes wd-pf-attributes cf_model cf_click wd-checkbox-2">
        <input class="result-input" name="filter_modele" type="hidden" value="">
            <div class="wd-pf-title cf-disable">
                <span class="title-text">Modèle</span>
                <ul class="wd-pf-results"></ul>
            </div>
            <div class="wd-pf-dropdown wd-scroll has-scrollbar">
                <ul class="wd-scroll-content show-labels-on swatches-large model-list" tabindex="0">
                </ul>
                <div class="wd-scroll-pane" style="display: none;"><div class="wd-scroll-slider" style="height: 20px; transform: translate(0px, 0px);"></div></div>
            </div>
        </div>
    
        <div class="wd-pf-checkboxes wd-pf-attributes cf_attr wd-checkbox-3">
            <input class="result-input" name="filter_cylindree" type="hidden" value="" /><input name="query_type_cylindree" type="hidden" value="and" />
            <div class="wd-pf-title cf-disable">
                <span class="title-text">Cylindrée</span>
                <ul class="wd-pf-results"></ul>
            </div>
            <div class="wd-pf-dropdown wd-scroll has-scrollbar">
                <ul class="wd-scroll-content show-labels-on swatches-large" tabindex="0">
                </ul>
                <div class="wd-scroll-pane" style="display: none;"><div class="wd-scroll-slider" style="height: 20px; transform: translate(0px, 0px);"></div></div>
            </div>
        </div>
        <div class="wd-pf-btn"><button type="submit">COMMANDER MAINTENANT</button></div>
    </form>
    
        
        <?php
    
        return ob_get_clean();
    }
    /*//code by Code father ends here
    add_filter( 'weglot_get_dom_checkers', 'custom_weglot_dom_check' );
    function custom_weglot_dom_check( $dom_checkers  ) {
    
    	class Div_Slide_Title extends Weglot\Parser\Check\Dom\AbstractDomChecker {
    		const DOM       = 'select';
    		const PROPERTY  = 'data-placeholder';
    		const WORD_TYPE = Weglot\Client\Api\Enum\WordType::TEXT;
    	}
    	$dom_checkers[] = '\Div_Slide_Title'; //You add your class to the list because you want the parser to also detect it
    	return $dom_checkers ;
    }*/
    
    function photoswipe_html() {
    	global $post;
    	if ($post->ID !== 21801) {
    		return;
    	}
    	echo <<<'EOD'
    	<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    	   <div class="pswp__bg"></div>
    	   <div class="pswp__scroll-wrap">
    	      <div class="pswp__container">
    	         <div class="pswp__item"></div>
    	         <div class="pswp__item"></div>
    	         <div class="pswp__item"></div>
    	      </div>
    	      <div class="pswp__ui pswp__ui--hidden pswp__ca_center">
    	         <div class="pswp__top-bar">
    	            <div class="pswp__counter"></div>
    	            <span class="pswp__button pswp__button--close" title="Fermer (Echap)"></span>
    	            <span class="pswp__button pswp__button--share" title="Partager"></span>
    	            <span class="pswp__button pswp__button--fs" title="Basculer en plein écran"></span>
    	            <span class="pswp__button pswp__button--zoom" title="Zoom"></span>
    	            <div class="pswp__preloader">
    	               <div class="pswp__preloader__icn">
    	                  <div class="pswp__preloader__cut">
    	                     <div class="pswp__preloader__donut"></div>
    	                  </div>
    	               </div>
    	            </div>
    	         </div>
    	         <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
    	            <div class="pswp__share-tooltip"></div>
    	         </div>
    	         <span class="pswp__button pswp__button--arrow--left" title="Précédent (flèche gauche)"></span>
    	         <span class="pswp__button pswp__button--arrow--right" title="Suivant (flèche droite)"></span>
    	         <div class="pswp__caption">
    	            <div class="pswp__caption__center"></div>
    	         </div>
    	      </div>
    	   </div>
    	</div>
    EOD;
    }
    add_action( 'wp_footer', 'photoswipe_html' );
    #377193

    Artem Temos
    Keymaster

    Hello,

    We are sorry that you faced problems with this. But, unfortunately, we don’t know how this code is supposed to work and why it doesn’t work with the latest version of the theme. You need to contact the developer who created the code and ask him to check it. Or you don’t need to update anything on your website to not break it.

    Kind Regards

    #378137

    EDEN
    Participant

    problem solved

Viewing 13 posts - 1 through 13 (of 13 total)

The topic ‘Alerts not showing anymore’ is closed to new replies.