BuddyBoss Home – Web Support Forums Themes Boss. theme Child Theme not activating a woocommerce template

Viewing 15 posts - 1 through 15 (of 26 total)
  • Question

    #41274
    @matthewjamesboyd1984

    Hi,

    I’m using a buddyboss child theme for my website physiocourse.com. I’m making a products page using woocommence which is working fine with buddyboss so far. The problem is that I want to use the facetWP plugin to help users drill down through my displayed products, when I set up that plugin to do so the Boss Child theme seems to be ignoring the template file. I’ve had the developer of FacetWP (Matt Gibbs) take a look at it but he hit a brick wall. He asked me to see if you guys could offer any insight.

    This is the problem we are having:
    How do we get WooCommerce to use the archive-product.php template within a BuddyBoss child theme? As of now, it seems to completely ignore it.

    Can you help me with this?

    Thanks,
    Matthew Boyd

    Answers

    #41284

    Alyssa
    Participant
    @alyssa-buddyboss

    @matthewjamesboyd1984 do you have the same issue if you use the twentyfifteen theme?

    #41304
    @matthewjamesboyd1984

    Yeh, I tried it in the twenty fifteen and twenty thirteen themes, they seem to ignore it as well.

    #41313

    Alyssa
    Participant
    @alyssa-buddyboss

    @matthewjamesboyd1984 then this is most likely a WooCommerce issue. You will need to contact them for support.

    #41315
    @matthewjamesboyd1984

    OK, thanks TJ

    #41342

    Alyssa
    Participant
    @alyssa-buddyboss

    Let us know what they figure out or if you need additional support

    #42536
    @bentasm1

    This is *not* a WooCommerce issue. This is an issue in Boss.

    WooCommerce has two ways to handle templates, the right way, and the fast way.

    The right way, is /themes/yourtheme/woocommerce/…… with templates modified from /plugins/woocommerce/templates. By doing it this way, all pages can be properly customized.

    The fast way, is /themes/yourtheme/woocommerce.php. This is what Boss does. The problem with woocommerce.php is it’s a “catch all” for WooCommerce, and does not allow any customization of actual template files. It will break a lot of WooCommerce plugins that rely on customizing the archive-products.php, including the one I author, because you don’t have all the right hooks/actions to play with.

    http://docs.woothemes.com/document/third-party-custom-theme-compatibility/

    So, the problem is Boss related, not WooCommerce related, unfortunately……

    #42537
    @matthewjamesboyd1984

    Thanks for your comments Ben. Why is it that it happens with twenty fifteen though?

    #42539
    @bentasm1

    Most likely because you have copied it into /themes/yourtheme/archive-product.php, which is the wrong location. The correct location would be /themes/yourtheme/woocommerce/archive-product.php. That’s my guess based on your first posts screenshot showing it in the wrong directory.

    Oddly, that’s a completely different problem, but with the way Boss uses woocommerce.php to override it, it wouldnt matter if it was in the right directory for Boss anyway.

    #42556
    @matthewjamesboyd1984

    Hi Ben,

    Thanks for following up. I tried dropping it into that location for twenty thirteen but I’m still not seeing the filters on the archive page. I’ve attached a screenshot.

    Do you still think this is a Boss issue or should I take what you told me back to the FacetWP developer and get him to try again?

    #42565
    @bentasm1

    1.) Test with TwentyFifteen, not TwentyThirteen.

    2.) The issue will always be Boss related, because of Boss using woocommerce.php, which overrides archive-product.php.

    These are two separate issues, they just happen to be the same problem, but with two completely separate reasons why. 🙂

    If you cant get it to work with TwentyFifteen, you’re either doing it wrong (most likely) or FacetWP has a bug (very unlikely).

    #42569
    @matthewjamesboyd1984

    Hi Ben,

    OK, I see what you mean. I’ve tried it with Twenty Fifteen and it’s still not working. I must be doing something wrong. I’ll take what you’ve said to the FacetWP developer and try and get it to work on Twenty Fifteen then I’ll ask TJ again.

    Thanks for your help Ben, I’ll let you know if we get anywhere.

    #42623

    Alyssa
    Participant
    @alyssa-buddyboss

    @matthewjamesboyd1984 just found this tutorial for placement: https://v4.datafeedr.com/documentation/580
    We also follow the directions here: http://docs.woothemes.com/document/third-party-custom-theme-compatibility/

    You could try removing woocommerce.php from the parent theme and then add this to functions.php:

    remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
    remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
    
    add_action('woocommerce_before_main_content', 'buddyboss_theme_wrapper_start', 10);
    add_action('woocommerce_after_main_content', 'buddyboss_theme_wrapper_end', 10);
    
    function buddyboss_theme_wrapper_start() {
      echo '<div id="primary" class="site-content">
    		<div id="woo-content" role="main">';
    }
    
    function buddyboss_theme_wrapper_end() {
      echo '</div><!-- #content -->
    	</div><!-- #primary -->';
    }

    NOTE: Not tested and you may need to remove the woo-content div.

    #42936
    @matthewjamesboyd1984

    Hi @tjchester,

    Ok, thanks for the advice. But if I remove woocommerce.php from the parent theme will I not just have the same problem every time woocommerce release an update?

    Thanks,
    Mat

    #42952

    Alyssa
    Participant
    @alyssa-buddyboss

    @matthewjamesboyd1984 nope, this is upgrade safe, the only thing you would need to do is remove the woocommerce.php file every time you update the Boss theme, but if this solution does work for you then we can implement it into the theme and remove the woocommerce.php file.

Viewing 15 posts - 1 through 15 (of 26 total)
  • The question ‘Child Theme not activating a woocommerce template’ is closed to new replies.