April 27, 2013 at 11:17 am #22481
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 :
* 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['portfolio_page']) && !empty($portfolios['portfolio_cats']))
foreach($portfolios as $portfolio)
$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();
* get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
<!-- ####### MAIN CONTAINER ####### -->
<div class='container_wrap' id='main'>
<div id='template-page' class='content grid9 first'>
* woocommerce_before_main_content hook
* @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
* @hooked woocommerce_breadcrumb - 20
<?php while ( have_posts() ) : the_post(); ?>
<?php woocommerce_get_template_part( 'content', 'single-product' ); ?>
<?php endwhile; // end of the loop. ?>
//get the sidebar
<!-- ####### END MAIN CONTAINER ####### -->
* woocommerce_after_main_content hook
* @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the 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.April 28, 2013 at 6:10 pm #115924
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.
The topic ‘Broadscope and woocommerce: Sidebar widgets not appearing on a single product.’ is closed to new replies.