Archived topic
Simplifying a single product Woocommerce website
13 replies · Started by Jeff on September 2, 2020
This is not a topic where any responsibility lies with GeneratePress. It's more a Woocommerce issue and I'm throwing it out here because I simply can't figure it out and numerous searches online have not amounted to anything. I don't mind if I get put on the back burner on this one. I hope you find my issue somewhat interesting and something that will be helpful to others - assuming there's a solution.
My website is for a single product with several customizations including color and engraving information. For that reason, I added the Flexible Products Fields plugin which works great for my needs.
However, I feel that I've ended up with one step too many for the customer and I'd like to simplify things for them. I have a "Shop" page which then lists my one product and asks them to press a button to customize the one item. IOW, my "Shop" page is nothing more than a request for the customer to hit another button in order to customize the single product that I offer (which they must do).
I could modify the menu such that selecting the Shop page takes them directly to the modification page but there's a problem. If the cart is cleared there's a button they can select which takes them back to the "real" Shop page - not the modification page. That would create confusion.
What I would like to do is this: Hitting the Shop button brings the customer directly to the customization page. Not two pages with unnecessary steps - just one. And from there, after the customizations, they go to the Cart page and from there they go to the Check-Out page. And no buttons appear that lead them to the redundant real Shop page where all they do there is hit another button.
I can't figure out how to get rid of the unnecessary Shop page. I would like the Shop page to become the customization page. I'm aware of the $80 Woocommerce one page check-out extension but in spite of it's very high price their documentation states it is not compatible with the Flexible Products Field plugin.
Any thoughts would be appreciated.
Hi there,
add this PHP Snippet to your site:
function wc_empty_cart_redirect_url() {
return 'http://yourdomain.com/your-page/';
}
add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );
It will redirect the Shop link to the URL you add above.
Hi David,
Thank you for the PHP but I can't get it to work. I've tried some variations but every time the "Return to Shop" button in the empty cart is pressed it goes to the true Shop page rather than the customization page.
I've altered the menu so that Shop goes to the customization page and it's in that state now. Can you take a look and see if I'm missing something? Thanks.
Jeff
How was the code added to the site ?
I did it here: Customize > Additional CSS
My code there ends like this:
}
#add_payment_method table.cart img,
.woocommerce-cart table.cart img,
.woocommerce-checkout table.cart img {
width: 200px !important;
}
function wc_empty_cart_redirect_url() {
return 'my url';
}
add_filter ( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );
/* End GeneratePress Site CSS */
Disregard this reply.
Are you all good on this?
David's function here is not CSS:
https://generatepress.com/forums/topic/simplifying-a-single-product-woocommerce-website/#post-1427744
It's PHP and should be added using one of these methods:
Adding PHP: https://docs.generatepress.com/article/adding-php/
Aha. It works. Thanks for the link to Code Snippets. Learned a lot today.
Glad we could be of help
David, I've closed this as solved. Thanks very much for your help. May I ask, what part of Vancouver Island are you located? I'm very familiar. Spent many summers on Nootka Island. But been all over.
You're welcome.
Tom is from the Island - i am not sure where exactly - he likes to move around :)
I actually live and work in the United Kingdom.
Lol. Got it! Thanks for getting back.
And now I know why you're on the "late" shift!
Someone has too :) Lucky for GP i don't sleep much so we still get a lot of team time with the 7-8hr time difference.