Changing cart properties (hyperlink and return to store)
-
Hello,
I have searched through Google for both issues:
1. I desired to remove the ‘Return to Store’ button within the cart when it was empty. I modified the cart_empty.php file to no avail:
<?php /** * Empty cart page * * @author WooThemes * @package WooCommerce/Templates * @version 2.0.0 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly wc_print_notices(); ?> <p><?php _e( 'Your cart is currently empty.', 'woocommerce' ) ?></p> <?php do_action( 'woocommerce_cart_is_empty' ); ?> <p class="return-to-shop"><a class="button wc-backward" href="<?php echo apply_filters( 'woocommerce_return_to_shop_redirect', home_url() ); ?>"><?php _e( 'Return To Shop', 'woocommerce' ) ?></a></p>
2. I also tried to remove the link to the individual items for each product within the cart. Now when you add items, the link text turns white. This is part of the code in cart.php
<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_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', 'woocommerce' ) . '</p>'; ?> </td>
The website: Pastora Studio
- The topic ‘Changing cart properties (hyperlink and return to store)’ is closed to new replies.