My Courses > CustomizeWoo > Module 4 > Lesson 07: Cart Page: ADD Content
Cart Page: ADD Content
This is how to add content to the cart page by using the visual hook guide. Always start from displaying some simple “TEXT” in the correct position, and then make your functions more complex. A little win is better than hours spent troubleshooting.
Please note: English captions are enabled by default (click on “CC” in the video player to disable). Also, you can click on the “gear” icon to manage quality and playback speed. Enjoy!
If you already enrolled in this course, please LOG IN
Otherwise, please enroll in the FREE / PRO COURSE
For any other queries, feel free to get in touch
WooCommerce Visual Hook Guide: Cart Page
WooCommerce: Add Content to Empty Cart Page
WooCommerce: Display Categories Under Product Name @ Cart
WooCommerce: Display Weight @ Cart & Checkout
WooCommerce: “You Only Need $$$ to Get Free Shipping!” @ Cart
6 thoughts on “Cart Page: ADD Content”
How could we change “Proceed to checkout” button text on the cart, based on the product category? Let’s suppose there is only a product category on the cart, not more. Is it possible?
Of course, but you should watch https://www.businessbloomer.com/lesson/cuwm5l05/ (so you can find the correct “filter” and not an “action” in this case) and then https://www.businessbloomer.com/lesson/cuwm5l02/ (so you can apply “conditional logic”). Let me know how it goes!
I was able to change the “Proceed to checkout” button text (and other strings) on the cart page for a specific product category. But I was not able to imagine where to insert conditionals if another product category is in the cart.
Here is the code snippet I used:
Please give me a hint where should I include in the function above the conditional for the product category “albums”. Where should I add:
and where should I add filter ‘gettext’ for the product category “albums”?
Tried a lot, but with no success. Please advice.
Ok Marcel, let’s see if I can help. First of all, use “elseif” and redefine $cat_in_cart because you have 2 categories now:
Second, take the function bbb_translate_woocommerce_strings() out of the nesting, and leave it on its own. Now you will need two of them:
All it’s left now is to call the right filters, so you’d do this in the existing function:
Does this help?
Thank you very much. Until now, all worked as expected, except the fact I had to use this code:
Without “$translated, $untranslated, $domain” between brackets, the cart shows empty fields. I will dig more, to find why. Anyway, thank you very much!
Sorry yes you definitely need to use those 3 parameters