Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22481

    Hi,

    I’m trying to integrate Woocommerce into the Broadscope theme since a few weeks and there is something that is beyond my understanding.

    After looking all over the web , and trying to read the code , i can’t figure out how to make appear the right sidebar widgets on a product page. It seems like the sidebar area is somehow there but there nothing in it.

    In order to fit the woocommerce single product page style to broadscope theme, i had to override the woocomerce single-product.php.

    To do that i took the the page.php removed the broadscope loop and inserted the commerce hooks which gave this. And this worked like a charm , and it gave a pages like this : http://www.depannage-mac-paris.com/produit/reparation-clavier-pour-macbook-pro-aluminium-non-unibody-intel-15-et-17/

    The code of the single-product.php is now like this :

    <?php
    /*
    * if the user wants to display a blog on that page do so by
    * calling the blog template and then exit the script
    */

    if(avia_get_option('avia, frontpage') != "" && avia_get_option('avia, blogpage') == $post->ID && !isset($avia_config['new_query']))
    {
    get_template_part( 'template', 'blog' ); exit();
    }

    /*
    * check if this page was set as a portfolio page by the user
    * in the theme portfolio options
    */

    if($portfolios = avia_get_option('avia, portfolio'))
    {
    if(!empty($portfolios[0]['portfolio_page']) && !empty($portfolios[0]['portfolio_cats']))
    {
    foreach($portfolios as $portfolio)
    {
    if(is_page($portfolio['portfolio_page']))
    {
    $avia_config['new_query'] = array("paged" => get_query_var( 'paged' ), "posts_per_page"=>-1, 'tax_query' => array( array( 'taxonomy' => 'portfolio_entries', 'field' => 'id', 'terms' => explode(',', $portfolio['portfolio_cats']) , 'operator' => 'IN')));
    get_template_part( 'template', 'portfolio' ); exit();
    }
    }
    }
    }

    global $avia_config;

    /*
    * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
    */
    get_header();

    ?>

    <!-- ####### MAIN CONTAINER ####### -->
    <div class='container_wrap' id='main'>

    <div class='container'>

    <div id='template-page' class='content grid9 first'>
    <?php
    /**
    * woocommerce_before_main_content hook
    *
    * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
    * @hooked woocommerce_breadcrumb - 20
    */
    do_action('woocommerce_before_main_content');
    ?>

    <?php while ( have_posts() ) : the_post(); ?>

    <?php woocommerce_get_template_part( 'content', 'single-product' ); ?>

    <?php endwhile; // end of the loop. ?>

    <!--end content-->

    </div>

    <?php

    //get the sidebar

    get_sidebar();

    ?>

    </div><!--end container-->

    </div>
    <!-- ####### END MAIN CONTAINER ####### -->

    <?php
    /**
    * woocommerce_after_main_content hook
    *
    * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
    */
    do_action('woocommerce_after_main_content');
    ?>

    <?php get_footer(); ?>

    But the sidebar doesn’t appear at all…

    I’m not sure if it’s the right place to ask the question , but as the woocommerce support is dead since while i wanted to post it here.

    If anyone has a suggestion to make , i more than glad to hear..

    Thanks in advance.

    #115924

    Hi cosmochaos,

    Unfortunately we aren’t able to offer support for WooCommerce integration for Broadscope. I would suggest using hooks/filters however as replacing with template files tends to cause issues.

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

    Regards,

    Devin

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

The topic ‘Broadscope and woocommerce: Sidebar widgets not appearing on a single product.’ is closed to new replies.