Forum Replies Created

Viewing 15 replies - 1 through 15 (of 70 total)
  • Thread Starter mitchellk

    (@mitchellk)

    Sorry though it was your plugin, my bad. It’s called Tm Extra product options

    Thread Starter mitchellk

    (@mitchellk)

    Make no mistake, I only use Code Snippets on all my sites even though I am advanced in WordPress and PHP, I simply detest having a lengthy uncontrollable functions.php so I always recommend each and every person I assist to use Code Snippets while as I say I use it myself on every site I own.

    This started last week with a function given to me by one of the devs of the theme which would not work until I wrapped it in a if(!function_exists.

    The function does actually exist which is why he said I should not have to wrap it in and additional if(!function_exists. After had had admin access to my site he confirmed his snippet worked without doing this when placed directly into functions.php

    As for me it’s not an issue as it works with the above snippets just perfectly but just thought I would report what the dev said to me. Keep up the great work, I cannot live without your plugin !!!!

    Thread Starter mitchellk

    (@mitchellk)

    Hi Elias, thanks for a quick response here’s an example snippet. If this is added directly to functions.php without wrapping it inside if(!function_exists('flatsome_next_post_link_product')) it works but I have to do as below for it to work in Code Snippets and Dev’s of the theme say it’s unneccesary.

    
    if(!function_exists('flatsome_next_post_link_product')) {
      function flatsome_next_post_link_product() {
          global $post;
          $next_post = get_next_post(true,'','product_cat');
          if ( is_a( $next_post , 'WP_Post' ) ) { ?>
             <li class="prod-dropdown has-dropdown">
                   <a>ID ); ?>" title="View Previous Product" rel="next" class="button icon is-outline circle">
                      <?php echo get_flatsome_icon('icon-angle-left'); ?>
                  </a>
              </li>
          <?php }
      }
    }
    
    if(!function_exists('flatsome_previous_post_link_product')) {
      function flatsome_previous_post_link_product() {
          global $post;
          $prev_post = get_previous_post(true,'','product_cat');
          if ( is_a( $prev_post , 'WP_Post' ) ) { ?>
             <li class="prod-dropdown has-dropdown">
                   <a>ID ); ?>" title="View Next Product" rel="next" class="button icon is-outline circle">
                      <?php echo get_flatsome_icon('icon-angle-right'); ?>
                  </a>
              </li>
          <?php }
      }
    }
    
    • This reply was modified 2 years, 8 months ago by mitchellk.

    I have the same problem, did you ever solve it?

    Console is giving an error

    Uncaught TypeError: a(...).find(...).andSelf is not a function
        at e.<anonymous> (wcfmmp-script-owl-carousel.min.js?ver=3.4.9:2)
        at HTMLUListElement.i (jquery.min.js?ver=3.6.0:2)
        at HTMLUListElement.dispatch (jquery.min.js?ver=3.6.0:2)
        at HTMLUListElement.v.handle (jquery.min.js?ver=3.6.0:2)
        at Object.trigger (jquery.min.js?ver=3.6.0:2)
        at HTMLUListElement.<anonymous> (jquery.min.js?ver=3.6.0:2)
        at Function.each (jquery.min.js?ver=3.6.0:2)
        at S.fn.init.each (jquery.min.js?ver=3.6.0:2)
        at S.fn.init.trigger (jquery.min.js?ver=3.6.0:2)
        at e.trigger (wcfmmp-script-owl-carousel.min.js?ver=3.4.9:1)
    Thread Starter mitchellk

    (@mitchellk)

    Update: the breaking of the admin bar was being caused by Asset Cleanup plugin even without any rules configured

    I can confirm my solution works and it’s really not a pain either. Just disable the plugin work on your new products, publish them and then re-enable the plugin.

    Thread Starter mitchellk

    (@mitchellk)

    Hi Antonio, my apologies I forgot to update this. Yes indeed all the layout shifts are gone. It turns out the problem is with Bunny CDN the moment I turn the CDN on I get layout shifts up to 0.8 so I have Bunny disabled. I think one or more CSS files needs to be bypassed through the CDN but it kinda defeats the object as my scores are higher with it turned off. Go figure but you can close this, many thanks.

    • This reply was modified 3 years, 7 months ago by mitchellk.

    WP-Rocket has a setting to add missing image sizes which is what I have but it’s important to make sure you have them set properly wherever possible. I dont get any errors anymore about image sizes but it took some time.

    Any chance YITH could adopt SVG icons in the future and do away with Font awesome for good?

    Thread Starter mitchellk

    (@mitchellk)

    Hi @danielinhou that’s correct I change the button text in the template file and that works but a new plugin I am using is also correctly doing it now versus my PHP snippet I had. So … for now, all is good and the way it should be ??

    Thread Starter mitchellk

    (@mitchellk)

    Hi @danielinhou temporary solution for now was to rename that in class-wc-product-variable.php and disable the snippet.

    Thread Starter mitchellk

    (@mitchellk)

    Hi @danielinhou thanks for the reply. I switched to StoreFront and the missing button problem persisted. I did some digging and discovered this snippet I use to change the button text for all my variable products is the cause. I’ve been using this snippet for a very long time and it never caused a problem before in a button on a Gutenburg Product Block but now it does. So something has changed.

    
    add_filter( 'woocommerce_product_add_to_cart_text' , 'custom_woocommerce_product_add_to_cart_text' );
    function custom_woocommerce_product_add_to_cart_text() {
        global $product;    
        $product_type = $product->product_type;  
        switch ( $product_type ) {
    case 'variable':
                return __( 'Buy Now', 'woocommerce' );
            break;
    }
    } 
    

    The issue with rows not displaying properly is indeed caused by the Theme so I will raise that with them or try and bypass some parts of their JS / CSS on certain pages.

    Hi @allegrojane what code did you use to fix the rows? I have the same issue.

    Thread Starter mitchellk

    (@mitchellk)

    Hi Mike, @mikedmoore this is most undesirable behaviour. Each product has 65 variations, 63 are set to sync and 2 are not as they are virtual and cannot be synced into the facebook stores.

    So this would mean I first need to create a product with everything set to disabled sync, then create a new product and go manually through 63 variations enabling sync before publishing it?

    It’s purely bad programming as it’s this plugin causing the problem. How can you sync a product that is a draft and not even published yet?

    My current workflow:
    – Disable this poorly coded plugin
    – Duplicate my product, edit it, apply new images, tags, description etc
    – Publish product
    – Enable plugin
    – Update product

    My workflow works but it not how things should work, this plugin should just obey what “state” a product is in ie. “published” “draft” “pending review” etc etc. Pure and simply a bad piece of coding on this plugin.

    • This reply was modified 3 years, 8 months ago by mitchellk.

    Good luck getting a reply here. I have an issue too when I duplicate a product that the new “unpublished” product is synced with the word (Copy) in the title making an absolute mess of the store.

Viewing 15 replies - 1 through 15 (of 70 total)