Forums Forums Search Search Results for 'woocommerce'

Viewing 10 results - 221 through 230 (of 1,497 total)
  • Author
    Search Results
  • #249080

    Anonymous
    Inactive

    I did it inside scripts tag and inside file.js (add script src to this file like normal), nothing happened, the console is empty.

    I use this on woocommerce shop page, but every js working there – I’d checked hierarchy scripts but nothing change.

    this is my script for the show and hide filters – maybe there is a problem but I can’t find it.

    $(document).ready(function () {
        // show/hide filters in specify buttons
        $("form#search-filter-form-120 ul").first().addClass("all-filters");
        $('p.button-filter').each(function () {
            $(this).on('click', function () {
                $(this).addClass('active').siblings().removeClass(
                    'active');
                if ($(this).hasClass('active') && $(this).hasClass('button-filter-1')) {
                    // if (window.location.href.indexOf('?sort_order=') > 0) {
                    $("form#search-filter-form-120 ul.all-filters .sf-field-sort_order")
                        .toggleClass(
                            'show-filter')
                        .siblings('.show-filter').removeClass(
                            'show-filter');
                    // }
                } else if ($(this).hasClass('active') && $(this).hasClass(
                    'button-filter-2')) {
                    $("form#search-filter-form-120 ul.all-filters .sf-field-taxonomy-product_cat")
                        .toggleClass(
                            'show-filter')
                        .siblings('.show-filter').removeClass(
                            'show-filter');
                } else if ($(this).hasClass('active') && $(this).hasClass(
                    'button-filter-3')) {
                    $("form#search-filter-form-120 ul.all-filters .sf-field-taxonomy-pa_family")
                        .toggleClass(
                            'show-filter')
                        .siblings('.show-filter').removeClass(
                            'show-filter');
                } else if ($(this).hasClass('active') && $(this).hasClass(
                    'button-filter-4')) {
                    $("form#search-filter-form-120 ul.all-filters .sf-field-taxonomy-pa_finish")
                        .toggleClass(
                            'show-filter')
                        .siblings('.show-filter').removeClass(
                            'show-filter');
                } else if ($(this).hasClass('active') && $(this).hasClass(
                    'button-filter-5')) {
                    $("form#search-filter-form-120 ul.all-filters .sf-field-taxonomy-pa_colour")
                        .toggleClass(
                            'show-filter')
                        .siblings('.show-filter').removeClass(
                            'show-filter');
                } else if ($(this).hasClass('active') && $(this).hasClass(
                    'button-filter-6')) {
                    $("form#search-filter-form-120 ul.all-filters .sf-field-taxonomy-pa_material")
                        .toggleClass(
                            'show-filter')
                        .siblings('.show-filter').removeClass(
                            'show-filter');
                } else if ($(this).hasClass('active') && $(this).hasClass(
                    'button-filter-7')) {
                    $("form#search-filter-form-120 ul.all-filters .sf-field-taxonomy-pa_size")
                        .toggleClass(
                            'show-filter')
                        .siblings('.show-filter').removeClass(
                            'show-filter');
                } else if ($(this).hasClass('active') && $(this).hasClass(
                    'button-filter-8')) {
                    $("form#search-filter-form-120 ul.all-filters .sf-field-post-meta-_price")
                        .toggleClass(
                            'show-filter')
                        .siblings('.show-filter').removeClass(
                            'show-filter');
                } else if ($(this).hasClass('active') && $(this).hasClass(
                    'button-filter-9')) {
                    $("form#search-filter-form-120 ul.all-filters .sf-field-taxonomy-pa_availibility")
                        .toggleClass(
                            'show-filter')
                        .siblings('.show-filter').removeClass(
                            'show-filter');
                }
            })
    
        });
    });
    

    here is my results.php page

    
    <?php
    /**
     * Search & Filter Pro 
     *
     * Sample Results Template
     * 
     * @package   Search_Filter
     * @author    Ross Morsali
     * @link      https://searchandfilter.com
     * @copyright 2018 Search & Filter
     * 
     * Note: these templates are not full page templates, rather 
     * just an encaspulation of the your results loop which should
     * be inserted in to other pages by using a shortcode - think 
     * of it as a template part
     * 
     * This template is an absolute base example showing you what
     * you can do, for more customisation see the WordPress docs 
     * and using template tags - 
     * 
     * http://codex.wordpress.org/Template_Tags
     *
     */
    
    // If this file is called directly, abort.
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    }
    
    if ( $query->have_posts() )
    {
    	?>
    
    <div id="ajax-reload" class="row">
    
        <?php
    	while ($query->have_posts())
    	{
    		$query->the_post();
    		
    		?>
        <?php
                    global $product;
    	$pid = $product->get_id();
    	// Get wishlist for current user. ?>
        <div class="col-md-6 col-xl-4 product-block">
    
            <div class="container-img">
                <a href="<?php the_permalink(); ?>">
                    <?php 
    				if ( has_post_thumbnail() ) {
    
    					//the_post_thumbnail("small");
    
    					 $url = wp_get_attachment_url( get_post_thumbnail_id($post->ID) );
                                echo '<div style="background: url('. $url.');" class="img-product-item">'; ?>
    
                    <a
                        id="wish-list-icon"><?php echo do_shortcode('[yith_wcwl_add_to_wishlist product_id=' . $pid . ']' )?></a>
    
            </div>
    
            <div class="overlay">
                <img src="<?php the_field('pictogram_products') ?>" alt="" class="pictogram-img">
                <div class="text">
                    <h2 class="name-product-overlay"><a href="<?php the_permalink()  ?>"><?php the_title(); ?></a></h2>
    
                    <?php $price = get_post_meta( get_the_ID(), '_regular_price', true); 
                    
    
                    $price_sale = get_post_meta( get_the_ID(), '_sale_price', true); // Retrive products sale price
      // Formatted price by adding decimal
      $formatted_price_sale = wc_price( $price_sale );
      $formatted_price = wc_price( $price ); // Formatted price by adding decimal ?>
    
                </div>
                <div class="cart-area-product">
                    <?php echo '<a class="disabled-link">
    	
    	<div class="like-price-buy">
    		<a href="'. do_shortcode('[add_to_cart_url id=' . $pid . ']' ) .'" data-product_id="'. $pid .'" data-quantity="1" class="button product_type_simple add_to_cart_button ajax_add_to_cart">
            <svg xmlns="http://www.w3.org/2000/svg" width="18.417" height="22.521" viewBox="0 0 18.417 22.521">
            <g id="Group_22" data-name="Group 22" transform="translate(1 1)">
              <path id="Path_104" data-name="Path 104" d="M663.582,1530.458v-4.788a3.42,3.42,0,0,1,3.42-3.42h0a3.42,3.42,0,0,1,3.42,3.42v4.788" transform="translate(-658.794 -1522.25)" fill="none" stroke="#636363" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"/>
              <path id="Path_105" data-name="Path 105" d="M666,1542.25v13.681H649.582V1542.25h17.095" transform="translate(-649.582 -1535.41)" fill="none" stroke="#636363" stroke-miterlimit="10" stroke-width="2"/>
              <line id="Line_4" data-name="Line 4" x2="8.795" transform="translate(3.664 12.459)" fill="none" stroke="#636363" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"/>
              <line id="Line_5" data-name="Line 5" x2="8.795" transform="translate(3.664 15.391)" fill="none" stroke="#636363" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"/>
            </g>
          </svg>
          <span class="order-now-products">Order now</span>
            </a>
            <span class="price">'. do_shortcode('[product_price id='. $pid. ']' ).'</span>
    
    	</div>
    	</a>'; // Print new html with title and price ?>
                </div>
            </div>
            </a>
        </div>
    
        <div class="product-info-small">
            <h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
        </div>
    
        <?php }	?>
        <p><?php the_category(); ?></p>
    </div>
    
    <?php
    	}
    	?>
    </div>
    
    <div class="pagination">
    
        <div class="nav-previous"><?php next_posts_link( 'Load more', $query->max_num_pages ); ?>
        </div>
    
        <div class="nav-next"><?php previous_posts_link( 'Load previous' ); ?></div>
        <?php
    			/* example code for using the wp_pagenavi plugin */
    			if (function_exists('wp_pagenavi'))
    			{
    				echo "<br />";
    				wp_pagenavi( array( 'query' => $query ) );
    			}
    		?>
    </div>
    <?php
    }
    else
    {
    	echo "No Results Found";
    }
    ?>
    

    if it helps will great.

    #248971

    Anonymous
    Inactive

    Yes. I use the acf fields for products Woocommerce. I added a couple of products with data in those fields. My issue is the acf_ variables/fields are not showing in the backend of S&F so I cannot even create a search form with the acf_ fields.

    #248866

    Ross
    Keymaster

    Hi Claudio

    Actually I see, the woocommmerce pagination just fine, but it’s hidden by some custom CSS? I see this when I view source of your page:

    <style id='woocommerce-layout-inline-css' type='text/css'>
    
    	.infinite-scroll .woocommerce-pagination {
    		display: none;
    	}
    </style>

    Thanks

    #248717

    In reply to: Oxygen Builder


    Ross
    Keymaster

    Hi Katherine

    I would start by doing the following in your search form:

    1) Disable Ajax for testing (this can be found the display results tab)
    2) Making sure display method is set to WooCommerce Shop

    Let me know when you’ve done that, and if still not working, could you provide a link?

    Please use the “private reply” feature for any sensitive information.

    Thanks

    #248689

    Anonymous
    Inactive

    I have created a template in Oxygen Builder which displays all the Woocommerce products under a category. I have added a sidebar to this template and have listed the sub categories there so customers can select the sub category they want to view and for the products to update/filter. I have not been able to achieve this and am clearly missing something integral to the process despite having read through the documentation. I am not a programmer and may be missing something in the terminology. If someone could point me in the right direction, I’d appreciate it.

    #248666

    Anonymous
    Inactive

    Hi there,

    We manage a WooCommerce Store and we only have variable products and we are dealing with a problem we can’t solve.

    Want to creat a filter for our product only with stock, example:
    -T-shirt Model A – only have stock of size M and XL so when some one filter by size L that product don’t show in the result.

    Some one can help?

    #248647

    Anonymous
    Inactive

    I add these details to help you visualize the problem:

    On the page with the filter that manages woocommerce there is the problem I have indicated.

    https://uniqstore.dev-test.it/shop/

    while in the template that uses the search-filter template, no error comes out, but it cannot make the pagination. Here are 75 products instead I only see 7, without showing me the other results

    https://uniqstore.dev-test.it/categoria-prodotto/abbigliamento/giacche-e-cappotti/

    #248139

    Anonymous
    Inactive

    My form has:

    Search
    Taxonomy: product_cat
    Sort Order
    Post Per Page
    Post Meta: _price
    Reset Button
    Submit Button

    The search seems broken, but that is mostly due to one single reason.

    For this explanation I disabled AJAX and use only Submit manual, my settings are as recommended, Woocommerce Shop display results, correct post metas etc. The search I think works good. Let me start saying that the price widget, doesn’t work, at all. It firstly worked when I had 20 products, but then it stopped (not 20 products as in time frame when testing this website, not in correlation), I haven’t changed anything, I only added 30-40 products by duplication, I added more since than with import, but it does not work. I change/slide it, the link changes, I submit it, nothing.

    Categories work half the time, and this is mostly because the filter form switches from the default shop archive-page.php to taxonomy-product_cat.php. So when I visit the store the first time, it is on archive-page.php, I use the filter, select category – switches to taxonomy-product_cat.php with the correct results, but when I search again, for example I change my category from the drop-down, it first goes to archive-product.php, resetting my search results, like clicking reset and ignoring what I selected, and if I then just click again on the submit button, it works correctly. Of course this is not an intuitive/nor I think intended way of working.

    Last thing is the results per page, when the price filter worked, the result page did not count properly – not that the price slider does not work, I cannot tell.

    It would be great to get these stuff resolved, thank you!

    #248022

    Trevor
    Participant

    The Yith WooCommerce Wishlist plugin/functionality adds the ‘hearts’ to each post using JavaScript on page load. When an Ajax refresh is made, this code is not called. We have some JavaScript that allows other scripts/functions to be called after an Ajax refresh ash been done, but you would need to know from Yith what that line(s) of code would be:

    <script>(function ( $ ) {
      "use strict";
      $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
        // call your script or function here
      });
    }(jQuery));</script>
    #247902

    Anonymous
    Inactive

    Thanks Trevor – ah, the subtleties of S&F Pro!

    For posts – I was following your documentation for Elementor Pro.

    For products – I was following your documentation for woocommerce. However, I should instead have stuck with the Elementor pro docs for products too. Doh!

    So, I have now done that for https://d.xmarksthespot.co.uk/team-building-events/

    The product grid is responding correctly but the counts in the search form aren’t keeping pace. If you go to https://d.xmarksthespot.co.uk/online-shop you’ll see what they *should* be.

    Thoughts? I’ve probably missed something obvious.

Viewing 10 results - 221 through 230 (of 1,497 total)