- This topic has 32 replies, 3 voices, and was last updated 4 years, 1 month ago by
David.
-
AuthorPosts
-
April 20, 2022 at 6:26 am #2194689
Deyson
At this time I have been able to get all links to go to checkout. The one that I am not able to get the icon.
Also, if you may share both recommendations to have everything go to checkout please do as I want to be sure I am doing it correctly.
Thank you and have an amazing day! ๐
April 20, 2022 at 6:41 am #2194696David
StaffCustomer SupportTry this snippet:
add_filter( 'woocommerce_get_cart_url', 'db_custom_cart_url' ); function db_custom_cart_url() { return 'your checkout url here'; }April 20, 2022 at 7:46 am #2194776Deyson
Thank you! ๐
May I use /checkout/ for the “URL here”?
April 20, 2022 at 8:00 am #2195008David
StaffCustomer SupportThat one would require the full url eg.
https://mysite.com/checkout/April 20, 2022 at 10:58 am #2195145Deyson
Thank you.
Also, it seems if the cart is empty and we get directed to the checkout it creates an endless loop.
Please let me know what you think. ๐ค
April 20, 2022 at 11:47 am #2195177David
StaffCustomer SupportDo you have any other codes that is changing Cart links to the Checkout ?
April 20, 2022 at 12:01 pm #2195186Deyson
I guess I did. I am sorry for that.
Thank you for your patience and have an amazing day! ๐
April 20, 2022 at 1:55 pm #2195240David
StaffCustomer SupportNo need to apologise. Did you get the issue resolved ?
April 20, 2022 at 4:37 pm #2195334Deyson
Yes sir! ๐
P.S. I found a great plugin called Query Monitor to help identify the most taxing plugins. ๐April 21, 2022 at 1:04 am #2195618David
StaffCustomer SupportAwesome – glad to hear that!
April 22, 2022 at 7:26 am #2196931Deyson
Hello.
Is it possible to combine your code with this one:
https://stackoverflow.com/questions/63631987/woocommerce-always-redirect-to-checkout-even-if-product-already-exists-in-cartSince I sell digital downloads individually, I would rather my customer heads to checkout instead of seeing a warning if a product is already in the cart.
Please let me know what you think. ๐ค
Thank you and have an amazing day! ๐April 22, 2022 at 7:58 am #2197147David
StaffCustomer SupportSo run me by the logic.
What happens if the product isn’t already in the cart ?
April 22, 2022 at 10:21 am #2197272Deyson
Hello, David! ๐
If the product is or is not in the cart it all goes to the checkout the same.
Currently, with the code, you had shared with me if the product is in the cart we get a Notification message on the product page that reads “You cannot add another “Produce Name” to your cart. View Cart”
With the code I had linked above, it redirects to the Checkout page, but the Mini Icon takes me to the Cart. I would like everything to go to the checkout page.
Please let me know what you think. ๐ค
Thank you and have an amazing day! ๐April 23, 2022 at 3:18 am #2197646David
StaffCustomer SupportIf the cart icon only serves the purpose of taking you to the Checkout ( ie. there is not mini cart submenu ). Then it may be easier to disable the Menu Cart, and use a Block Element to insert your own icon with a link to the checkout.
You can use the
menu_bar_itemshook to position it in the same place.Is that an acceptable solution?
April 23, 2022 at 4:57 am #2197690Deyson
In the future, I may want to turn it back on.
But, I will try that out. I will go look through your documentation to figure out how to do this.Thank you and have an amazing day! ๐
-
AuthorPosts
- You must be logged in to reply to this topic.