Hello,
I am making this website that will only have one product with variations so I don’t really need the shop page but only a product page. Is there a way to skip the grid shop page and set the shop page to a product immediately?
For now I have created a custom link in the menu and added the link of the product page but with this way I am having other issues. For example if I have an empty cart there is a button (“Return to Shop”) that takes you to the shop page which I don’t want people to see.
Is there a way to change the shop in a different way? If not can you help me change the redirect button of shop to my product page?
I have already installed a child theme and I found that the redirect button is located in plugins/woocommerce/templates/cart/empty.php
I am guessing I need to add this to my child theme and change the part of the button redirection.
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
wc_print_notices();
?>
<p class="cart-empty">
<?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 esc_url( apply_filters( 'woocommerce_return_to_shop_redirect', wc_get_page_permalink( 'shop' ) ) ); ?>">
<?php _e( 'Return To Shop', 'woocommerce' ) ?>
</a>
</p>
I am guessing what I need to change is the ‘shop’ page in line 16 but I am not really sure how to achieve this. The link of my product page now is “http://www.elefante-boa.com/product/elefante-boa/”
password to see page is the same as your login.
Could you help me with this?
Thanks in advance.