New Landing How can we help? Themeforest Theme Support Dante How to update Woocommerce files in child theme?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Posted in: Dante
  • #227197
    solidsn2004
    Member
    Post count: 208

    Hi,

    I have done a woocommerce update on my site. Since I was using a child theme I am getting a message that my child theme has copies of non updated templates of woocommerce. It also tells me to check with the theme developer before updating.

    Could you please let me know how to update these files from an ftp?

    Do I have to locate the files that need to be updated and replace these or I have to replace the whole woocommerce folder?

    Thanks in advance.

    #227201
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Since you have modified some files you can’t replace them, you need to check in Woocommerce System status what files are different and compare the modified one with our latest version that is in the parent theme and copy the changes across.

    -Rui

    #227206
    solidsn2004
    Member
    Post count: 208

    Thanks for your reply Rui,

    Just to not do any mistake I am getting only the following update from the System Status:

    dante/woocommerce/single-product\price.php version 1.6.4 where the updated version is 2.4.9.

    What I have to do is go to wp-content/plugins/woocommerce/templates/single-product/price.php and copy the code and replace it in wp-content/themes/dante/woocommerce/single-product/price.php ?

    As I said I have dante and dante child installed and I am currently running dante child but the price.php file isn’t modified inside dante-child theme.

    So, do I do what I wrote above or I have to create the path in my dante-child theme like wp-content/themes/dante-child/woocommerce/single-product/price.php?

    In other words, do I replace the price.php file inside dante theme or I create the path inside dante child and drop it in there?

    Please let me know.
    Thanks in advance.

    #227229
    solidsn2004
    Member
    Post count: 208

    Hi Rui,

    Dante theme is using the following code for price.php

    <?php
    /**
     * Single Product Price, including microdata for SEO
     *
     * @author 		WooThemes
     * @package 	WooCommerce/Templates
     * @version     1.6.4
     */
    
    if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
    
    global $post, $product;
    ?>
    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
    
    	<p itemprop="price" class="price"><?php echo $product->get_price_html(); ?></p>
    
    	<meta itemprop="priceCurrency" content="<?php echo get_woocommerce_currency(); ?>" />
    	<link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" />
    
    </div>

    However, the new update is running this version:

    <?php
    /**
     * Single Product Price, including microdata for SEO
     *
     * @author  WooThemes
     * @package WooCommerce/Templates
     * @version 2.4.9
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly
    }
    
    global $product;
    
    ?>
    <div itemprop="offers" itemscope itemtype="http://schema.org/Offer">
    
    	<p class="price"><?php echo $product->get_price_html(); ?></p>
    
    	<meta itemprop="price" content="<?php echo esc_attr( $product->get_price() ); ?>" />
    	<meta itemprop="priceCurrency" content="<?php echo esc_attr( get_woocommerce_currency() ); ?>" />
    	<link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" />
    
    </div>

    Will the functionality of the theme break if I add the updated price.php (version 2.4.9) to child theme or I should wait for a Dante theme update?

    Sorry if I insist but it’s a bit confusing.

    #227237
    solidsn2004
    Member
    Post count: 208

    I did a bit of research and a lot of people are saying not to do any updates and stay with the theme’s files in order to be safe.
    Would you recommend this as well?

    I have also noticed that there are going to be some MAJOR changes in woocommerce plugin and I would like to remind you of this:

    https://woocommerce.wordpress.com/2015/11/09/woocommerce-2-5-beta-1/

    I am sure your developers might be aware of this but these changes look like they will really affect swiftideas themes so I wanted to know if you are planning to work on modifications before the official release on January 2016.

    #227271
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    If you didn’t changed that file in your child theme then we probably need to update our version according to the latest Woocommerce plugin.

    Will forward the topic to the development team.

    Let’s wait for the reply.

    -Rui

    #227326
    solidsn2004
    Member
    Post count: 208

    Thanks a lot Rui,

    I actually just added the price.php in child theme and it seems to be working fine for now. If there is a problem I will remove it and start using again the outdated version of dante.

    I guess the most important thing is to be ready for woocommerce 2.5 as according to the developers the changes from 2.4.9 to 2.5 are going to be major and they are going to affect a lot of themes that have woocommerce integrated.

    Thanks again for your time.

    #227327
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Ok no problem

    #284392
    qur12
    Member
    Post count: 5

    Hi Rui, are there an news regarding the topic mentioned above? you wanted to update your version according to the latest Woocommerce plugin and contact your support team.

    My problem is also, that I am getting a message that my child theme has copies of non updated templates of woocommerce. It also tells me to check with the theme developer before updating.

    Thanks for your support. Ben

    #284567
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi @solidsn2004

    Apologies for the delay.

    That price.php file is no longer included in the Dante parent theme, so unless you need to override it then you can remove it from your child theme.

    If you are overriding files in your child theme, then that is fine. The messages you’ve seen about not replacing parent theme files is purely because the changes we have made there are for a reason. If you are planning to make edits, then I’d just suggest to check the parent theme files to see if a template is there, and then copy that down rather than straight from the WooCommerce template files.

    Let us know if you have any more questions.

    – Ed

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register