Empty-cart.php untranslatable? Cannot translate to dutch

This topic has 4 replies, 3 voices, and was last updated 7 months, 3 weeks ago ago by Tony Rodriguez

  • Avatar: Nancy
    Nancy
    Participant
    September 7, 2023 at 15:49

    I have copied empty-cart.php to my child theme, and fixed the back to the shop button. But I now have this problem: whatever I do, use loco translate, directly translating the template file (ofcourse I refreshed cache in between), it just won’t translate. Only the button is in dutch.

    This is my code so far (as you can see, I only changed the url of the button to home_url() ).

    <?php
    /**
     * Empty cart page
     *
     * This template can be overridden by copying it to yourtheme/woocommerce/cart/cart-empty.php.
     *
     * HOWEVER, on occasion WooCommerce will need to update template files and you
     * (the theme developer) will need to copy the new files to your theme to
     * maintain compatibility. We try to do this as little as possible, but it does
     * happen. When this occurs the version of the template file will be bumped and
     * the readme will list any important changes.
     *
     * @see 	    https://docs.woothemes.com/document/template-structure/
     * @author  WooThemes
     * @package WooCommerce/Templates
     * @version 7.0.1
     */
    
    if ( ! defined( 'ABSPATH' ) ) {
    	exit; // Exit if accessed directly
    }
    ?>
    
    <?php 
    
    wc_print_notices();
    
    $empty_cart_content = etheme_get_option('empty_cart_content', '<h1 style="text-align: center;">YOUR SHOPPING CART IS EMPTY</h1><p style="text-align: center;">We invite you to get acquainted with an assortment of our shop. Surely you can find something for yourself!</p> ');
    
    $woo_new_7_0_1_version = etheme_woo_version_check();
    $button_class = '';
    if ( $woo_new_7_0_1_version ) {
        $button_class = wc_wp_theme_get_element_class_name( 'button' );
    }
    
    ?>
    
    <?php do_action('woocommerce_cart_is_empty'); ?>
    
    <div class="cart-empty empty-cart-block">
    	<?php if( empty( $empty_cart_content ) ): ?>
    		<h1 style="text-align: center;"><?php esc_html_e('Your shopping cart is empty', 'xstore') ?></h1>
    		<p style="text-align: center;"><?php esc_html_e('We invite you to get acquainted with an assortment of our shop. Surely you can find something for yourself!', 'xstore') ?></p>
    	<?php else: ?>
    		<?php echo do_shortcode( $empty_cart_content ); ?>
    	<?php endif; ?>
    	<?php if ( wc_get_page_id( 'shop' ) > 0 ) : ?>
    		<p><a class="btn black<?php echo esc_attr( $button_class ? ' ' . $button_class : '' ); ?>" href="<?php echo home_url(); ?>"><span><?php esc_html_e('Return To Shop', 'xstore') ?></span></a></p>
    	<?php endif; ?>
    </div>
    Please, contact administrator
    for this information.
    3 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 7, 2023 at 20:16

    Hello, Nancy,

    Thank you for contacting us and for using XStore.

    Please navigate to the following path: Theme Options > WooCommerce (Shop) > Cart page > Empty cart > Content > Text tab > edit content of the tab https://prnt.sc/YXmhOgzeX6bu

    Kind Regards,
    8theme team

    Avatar: Nancy
    Nancy
    Participant
    September 8, 2023 at 08:49

    Thank you! Epic service as always.

    Avatar: Tony Rodriguez
    Tony Rodriguez
    Support staff
    September 8, 2023 at 08:52

    Hello, @Nancy,

    We appreciate your recent contact with us and your use of our theme and support services. Your feedback is invaluable to us and we are delighted to hear of your satisfaction with our product and services.

    We would like to kindly request your consideration in leaving a 5-star rating for our theme, as well as our customer and technical support services. You can do this by visiting http://themeforest.net/downloads. Your feedback and positive reviews will not only aid us in improving our product but also motivate us to provide superior support in the future. Your support is greatly appreciated and means a great deal to us.

    Should you have any further inquiries or concerns, please do not hesitate to contact us at any time. We are always available to assist you.

    We thank you once again for choosing our product and services.

    Please note, this topic is now closed.

    Best Regards,
    8Theme’s Team

  • Viewing 4 results - 1 through 4 (of 4 total)

The issue related to '‘empty-cart.php untranslatable? Cannot translate to dutch’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.