Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #256203

    allcal
    Participant

    I started a new website from scratch with updated versions of:
    Wordpress Version 4.1.2
    Theme X Version 3.2.3
    WooCommerce Version 3.6.8

    Domain:
    http://wordpresswebsitedesigns.org/

    Error:”Your theme has bundled outdated copies of WooCommerce template files. If you notice an issue on your site, this could be the reason.

    x/woocommerce/cart/cart.php version 2.3.0 is out of date. The core version is 2.3.8, ”

    The cart is showing the subtotal, total, and proceed to checkout in a duplicate manner. How do you fix that?

    #256337

    Rue Nel
    Moderator

    Hello There,

    Thanks for posting in!

    To resolve that issue, please download the file x/woocommerce/cart/cart.php to your local computer and replace it’s content with the code below. After making the changes, please save it and please upload again in the same location.

    <?php
    
    // =============================================================================
    // WOOCOMMERCE/CART/CART.PHP
    // -----------------------------------------------------------------------------
    // @version 2.3.8
    // =============================================================================
    
    if ( ! defined( 'ABSPATH' ) ) {
      exit; // Exit if accessed directly
    }
    
    wc_print_notices();
    
    do_action( 'woocommerce_before_cart' ); ?>
    
    <form action="<?php echo esc_url( WC()->cart->get_cart_url() ); ?>" method="post" class="cart-form">
    
      <?php do_action( 'woocommerce_before_cart_table' ); ?>
    
      <table class="shop_table cart" cellspacing="0">
        <thead>
          <tr>
            <th class="product-remove">&nbsp;</th>
            <th class="product-thumbnail">&nbsp;</th>
            <th class="product-name"><?php _e( 'Product', '__x__' ); ?></th>
            <th class="product-price"><?php _e( 'Price', '__x__' ); ?></th>
            <th class="product-quantity"><?php _e( 'Quantity', '__x__' ); ?></th>
            <th class="product-subtotal"><?php _e( 'Total', '__x__' ); ?></th>
          </tr>
        </thead>
        <tbody>
    
          <?php do_action( 'woocommerce_before_cart_contents' ); ?>
    
          <?php
    
          foreach ( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {
    
            $_product   = apply_filters( 'woocommerce_cart_item_product', $cart_item['data'], $cart_item, $cart_item_key );
            $product_id = apply_filters( 'woocommerce_cart_item_product_id', $cart_item['product_id'], $cart_item, $cart_item_key );
    
            if ( $_product && $_product->exists() && $cart_item['quantity'] > 0 && apply_filters( 'woocommerce_cart_item_visible', true, $cart_item, $cart_item_key ) ) {
    
              ?>
    
              <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_cart_item_class', 'cart_item', $cart_item, $cart_item_key ) ); ?>">
    
                <td class="product-remove">
                  <?php echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf( '<a href="%s" class="remove" title="%s">&times;</a>', esc_url( WC()->cart->get_remove_url( $cart_item_key ) ), __( 'Remove this item', '__x__' ) ), $cart_item_key ); ?>
                </td>
    
                <td class="product-thumbnail">
                  <?php
                    $thumbnail = apply_filters( 'woocommerce_cart_item_thumbnail', $_product->get_image(), $cart_item, $cart_item_key );
                    if ( ! $_product->is_visible() ) {
                      echo $thumbnail;
                    } else {
                      printf( '<a href="%s">%s</a>', $_product->get_permalink( $cart_item ), $thumbnail );
                    }
                  ?>
                </td>
    
                <td class="product-name">
                  <?php
                    if ( ! $_product->is_visible() ) {
                      echo apply_filters( 'woocommerce_cart_item_name', $_product->get_title(), $cart_item, $cart_item_key );
                    } else {
                      echo apply_filters( 'woocommerce_cart_item_name', sprintf( '<a href="%s">%s</a>', $_product->get_permalink( $cart_item ), $_product->get_title() ), $cart_item, $cart_item_key );
                    }
    
                    // Meta data
                    echo WC()->cart->get_item_data( $cart_item );
    
                    // Backorder notification
                    if ( $_product->backorders_require_notification() && $_product->is_on_backorder( $cart_item['quantity'] ) ) {
                      echo '<p class="backorder_notification">' . __( 'Available on backorder', '__x__' ) . '</p>';
                    }
                  ?>
                </td>
    
                <td class="product-price">
                  <?php echo apply_filters( 'woocommerce_cart_item_price', WC()->cart->get_product_price( $_product ), $cart_item, $cart_item_key ); ?>
                </td>
    
                <td class="product-quantity">
                  <?php
                    if ( $_product->is_sold_individually() ) {
                      $product_quantity = sprintf( '1 <input type="hidden" name="cart[%s][qty]" value="1" />', $cart_item_key );
                    } else {
                      $product_quantity = woocommerce_quantity_input( array(
                        'input_name'  => "cart[{$cart_item_key}][qty]",
                        'input_value' => $cart_item['quantity'],
                        'max_value'   => $_product->backorders_allowed() ? '' : $_product->get_stock_quantity(),
                        'min_value'   => '0'
                      ), $_product, false );
                    }
                    echo apply_filters( 'woocommerce_cart_item_quantity', $product_quantity, $cart_item_key );
                  ?>
                </td>
    
                <td class="product-subtotal">
                  <?php echo apply_filters( 'woocommerce_cart_item_subtotal', WC()->cart->get_product_subtotal( $_product, $cart_item['quantity'] ), $cart_item, $cart_item_key ); ?>
                </td>
    
              </tr>
    
              <?php
    
            }
    
          }
    
          do_action( 'woocommerce_cart_contents' );
    
          ?>
    
          <tr>
            <td colspan="6" class="actions">
    
              <?php if ( WC()->cart->coupons_enabled() ) { ?>
                <div class="coupon action-group">
                  <label for="coupon_code"><?php _e( 'Coupon', '__x__' ); ?>:</label> <input name="coupon_code" type="text" class="input-text" id="coupon_code" value="" placeholder="<?php _e( 'Coupon code', '__x__' ); ?>" /> <input type="submit" class="button" name="apply_coupon" value="<?php _e( 'Apply Coupon', '__x__' ); ?>" />
                  <?php do_action( 'woocommerce_cart_coupon' ); ?>
                </div>
              <?php } ?>
    
              <div class="update action-group">
                <input type="submit" class="button" name="update_cart" value="<?php _e( 'Update Cart', '__x__' ); ?>" />
                <?php do_action( 'woocommerce_cart_actions' ); ?>
              </div>
    
              <?php wp_nonce_field( 'woocommerce-cart' ); ?>
    
            </td>
          </tr>
    
          <?php do_action( 'woocommerce_after_cart_contents' ); ?>
    
        </tbody>
      </table>
    
      <?php do_action( 'woocommerce_after_cart_table' ); ?>
    
    </form>
    
    <div class="cart-collaterals">
    
      <?php do_action( 'woocommerce_cart_collaterals' ); ?>
    
    </div>
    
    <?php do_action( 'woocommerce_after_cart' ); ?>

    Please let us know if this works out for you.

    #256438

    allcal
    Participant

    I added that code in wp-content / plugins / woocommerce / templates / cart / cart.php. It didn’t change anything.

    #256442

    Rue Nel
    Moderator

    Hello Again,

    Sorry again if we wasn’t clear enough. You need to upload the file to the same location, x/woocommerce/cart/cart.php

    Putting it in the plugins, wp-content / plugins / woocommerce / templates / cart / cart.php will not do anything.

    Please let us know how it goes.

    #256444

    allcal
    Participant

    I ended up just using an older version of WooCommerce and it works fine now.

    #256445

    Rue Nel
    Moderator

    Hello There,

    Sorry for the inconvenience. We will be releasing a new release updates in the next few days. And that includes some fixes for Woocommerce templates. Please bear with us.

    Thanks for understanding.

    #256449

    Louise C
    Participant

    Thank you – it fixed the duplication but the layout is no good. It doesn’t line up the totals/subtotals and Checkout buttons.

    When is the new release coming out?

    Thanks,
    Wizard247

    #256451

    Paul R
    Moderator

    Hi Wizard247,

    Thanks for writing in! To assist you with this issue, we’ll first need you to provide us with your URL. This is to ensure that we can provide you with a tailored answer to your situation. Once you have provided us with your URL, we will be happy to assist you with everything.

    #256455

    allcal
    Participant

    I am also having the layout issues with the shop, http://wordpresswebsitedesigns.org/shop/, and products category pages with the “add to cart” buttons not working correctly and appearing over the featured images. Will this be solved in the update also?

    #256461

    Rue Nel
    Moderator

    Hello There,

    The add to cart buttons is being placed over the featured image in our Icon stack. Please compare your site to our demo site http://theme.co/x/demo/shop/icon/

    Thank you.