badget

Biggest Sale! Special Offer!

Get 30% discount on all of our single themes with this coupon code: #30%SALE

Hurry up! *Limited time offer*

Integrating Woocommerce

Tagged: 

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #9063
    haddenjw
    Participant

    All,

    I’m looking to integrate woocommerce into my Attitude Free theme. I’m having a bit of trouble. I would like to edit the correct file in my child theme to replace the loop <?php if ( have_posts() ) : and <?php endif; ?> with woocommerce’s <?php woocommerce_content(); ?>

    However, I can’t find the <?php if ( have_posts() ) : and <?php endif; ?> to edit in my theme.

    Could someone point me in the right direction?

    Thanks!

    #9131
    Rabin Shrestha
    Participant

    Hi haddenjw,

    You can find the content code in attitude->library->structure->content-extensions.php

    #9158
    haddenjw
    Participant

    Rabin,

    Thanks so much for your help. Two questions:
    First, how should I go about overriding content-extensions.php in my child theme? I’m not sure how to add files to my child theme that are in a separate folder in the parent theme (for example, “Library”).
    Second, is this the approach I’ve outlined above the best approach to integrating woocommerce into a themehorse theme? If so, is there a discussion somewhere which outlines how to integrate woocommerce into themehorse step-by-step?

    Thanks!

    #9164

    Hi haddenjw

    You need to make child theme and extract the particular function.
    https://codex.wordpress.org/Child_Themes

    and for your second question there you can study our instruction how to implement theme.

    https://www.themehorse.com/theme-instruction/attitude/

    Regards

    Sunil

    #9239
    haddenjw
    Participant

    Thanks so much for the help. Unfortunately, I’m still having trouble. What I am trying to achieve is outlined on this website underneath “Replace Loop” I can’t seem to find where this code is in the Themehorse Theme. Could someone help me? Or, point me in the direction of a step-by-step instruction?

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

    #9240
    haddenjw
    Participant

    Ok, I did find the right code under content-extensions. Now, could someone help me find exactly which code to remove and replace with <?php woocommerce_content(); ?>

    This would be a tremendous help. My site is here: http://www.thebefreelife.com and, as you can see the SHOP Page looks broken at the moment due to the loop.

    #9380
    Rabin Shrestha
    Participant

    Hi haddenjw,

    Our theme is not woocommerce compatible and you may have to edit and create new files for this to make it compatible. Just replacing the_content with woocommerce_content will not work and possibly will break other pages. So we request you to hire someone who is capable of making such changes.

    #11988
    magenta-heaven
    Participant

    I have a solution. Here are URLs where you need to make changes. And these changes.
    1. In file /wp-content/themes/attitude/library/structure/content-extensions.php add this code:

    /****************************************************************************************/
    add_action( ‘attitude_woo_container’, ‘woo_content’, 10 );
    /**
    * Function to display the content for the single post, single page, archive page, index page etc.
    */
    function woo_content() {

    global $post;
    global $attitude_theme_options_settings;
    $options = $attitude_theme_options_settings;
    if( $post ) {
    $layout = get_post_meta( $post->ID, ‘attitude_sidebarlayout’, true );
    }
    if( empty( $layout ) || is_archive() || is_search() || is_home() ) {
    $layout = ‘default’;
    }

    if( ‘default’ == $layout ) {
    $themeoption_layout = $options[ ‘default_layout’ ];

    get_template_part( ‘content’,’woocommerce’ );
    }
    }
    /****************************************************************************************/

    2. Copy and rename file /wp-content/themes/attitude/content-leftsidebar.php -> /wp-content/themes/attitude/content-woocommerce.php

    3. In file content-woocommerce.php change this:

    <div id=”primary”>
    <?php woocommerce_content(); ?>
    </div><!– #primary –>

    4. In woocommerce.php change this:

    <div id=”container”>
    <?php
    /**
    * attitude_woo_container hook
    *
    * HOOKED_FUNCTION_NAME PRIORITY
    *
    * attitude_content 10
    */
    do_action( ‘attitude_woo_container’ );
    ?>
    </div><!– #container –>

    If you can improve this code – I’ll be grateful

    #11992

    hi magenta-heaven,

    Thanks a lot for you help and support.

    Thank you!

    #17547
    d.fiebig89
    Participant

    Is there also a solution for the interface theme? Many thanks for any help!!

    Dave

    #17587

    Hi d.fiebig89,
    Our interface theme is also not compatible with woo commerce.

    Thank you!

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.