Support » Theme: Customizr » WooCommerce functionality

  • I’ve been looking for the page.php in order to copy and Woocommerce to my site. As of yet, I haven’t been able to locate a simple page.php file. Does anyone know if one exists? Or how to make this theme compatible with Woocommerce?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Nevermind. I found a post by Nikeo indicating there wasn’t a e-commerce plugin as of yet. Guess I’ll have to find a different theme 🙁

    I guess I don’t understand – I have the Woo plugs running, and while I am barely fluent in all of this, they do seem to be there and operating… What exactly were you trying to accomplish that you couldn’t?

    decoy3339, what is the website you have Customizr working with WooCommerce? I’d like to take a look to see if you’ve got it working the way I need it to.

    I’m pretty sure I don’t have it working at all – I’m just trying to anticipate the problems down the road.

    Ok so the short answer to make the woocommerce.php put in to it the following code but that’s not quite all of it.

    <?php
    /*
    Template Name: Woocommerce Page
    */
    get_header();
       do_action( '__fp_block' );
       do_action( '__breadcrumb' );?>
         <div class="container" role="main">
           <div class="row">
             <?php do_action( '__sidebar' , 'left' );?>
             <div class="<?php echo tc__f( '__screen_layout' , tc__f ( '__ID' ) , 'class' ) ?> article-container">
               <?php woocommerce_content(); ?>
             </div>
    	 <?php    do_action( '__sidebar' , 'right' );?>
           </div><!--#row -->
         </div><!-- #container -->
       <?php
    get_footer();
    ?>

    you also need to add this line to the functions.php
    remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);

    And the fun way To do this so that you wont loose anything when you upgrade the theme is to create a child theme its easy, if you don’t know how look here then add the following to the functions.php in your child theme.

    /*
     * Adding WooCommerce theme support to this theme.
     */
    remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
    remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
    
    remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);
    
    function my_theme_wrapper_start() {
     do_action( '__fp_block' );
        do_action( '__breadcrumb' );
          ?>
            <div class="container" role="main">
                <div class="row">
                    <?php
                        do_action( '__sidebar' , 'left' );?>
    		  <div class="<?php echo tc__f( '__screen_layout' , tc__f ( '__ID' ) , 'class' ) ?> article-container">
    			  <?php
    }
    
    function my_theme_wrapper_end() {
      ?></div><!--.article-container --><?php
       do_action( '__sidebar' , 'right' );
                    ?>
                </div><!--#row -->
            </div><!-- #container -->
        <?php
    }
    
    add_theme_support( 'woocommerce' );

    It works good for me.

    With a little modification works with Jigoshop too. I abandoned the functions side of things and went editing the plugin’s actions directly as i didn’t thin kthe PHP from loop would parse easily.
    It’s a start but needs lot of CSS tweaking

    Ok! I already have my child theme created. So where do I put these codes? Do I need to revert to my original theme to make the changes? Please advise. Thank you. Oh I am still on CSS for dummies:)

    put the first box of code into a new file called woocommerce.php, upload to your child theme.
    Put the second box of code into your child theme’s function.php at the bottom and reupload/save.

    With all that done switch wordpress to use your child theme and see how that looks.

    You may have to select woocommerce page as the page type to get it to work on certain pages.
    I found replacing
    <div class="<?php echo tc__f( '__screen_layout' , tc__f ( '__ID' ) , 'class' ) ?> article-container">
    with
    <div class="<?php span6 article-container">
    worked for me in function.php as another plugin was possibly stripping/disrupting the PHP and showing the result as ‘Array’

    Ok there are three pieces of code in the post i wrote.

    do one of either create the woocommerce.php file from the first box

    OR

    put the second box into your functions.php file

    If woocommerce.php file exists it will not look in the functions.php file for the answer so the functions file will be redundant.

    I found that woocommerce still puts in its own sidebar and that was messing with the layout so i added

    remove_action( 'woocommerce_sidebar', 'woocommerce_get_sidebar', 10);
    to fix that.

    Oh also DeaJae, The line
    <div class="<?php echo tc__f( '__screen_layout' , tc__f ( '__ID' ) , 'class' ) ?> article-container">
    is the line if coad that i traced down is responsible for creating the line
    <div class="<?php span6 article-container">
    It will also work for all other types of screenlayout that the theme might generate.

    Might add MarketPress eCommerce from wpmu dev. Integrates well without php tweaks. One drawback .. the plugin doesn’t respond to grid view settings for the shop. Think it’s due to the Twitter bootstrap underneath.

    What? I am more confused than before tee hee. Ok I am going to give it a try and see. Thanks for helping..

    @happysage – thank you for your explanation. I’ve successfully integrated WooCommerce with Customizr child theme.

    I have another question I’m wondering if you or anyone could help me with?

    For the featured page option, instead of page, how could I insert a WooCommerce product page?

    I’m trying to achieve this look: http://www.gbvalley.com/store

    Thanks.

    You’ll find a very easy to follow explanation how to incorporate Woocommerce into any theme here:
    http://docs.woothemes.com/document/third-party-custom-theme-compatibility/

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘WooCommerce functionality’ is closed to new replies.